> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.feedonomics.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.feedonomics.com/_mcp/server.

# Create Import

POST https://meta.feedonomics.com/api.php/dbs/{db_id}/imports
Content-Type: application/json

Reference: https://docs.feedonomics.com/developer/api-reference/rest/platform-api/imports/create-import

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `db_id` (double, required)

### Headers

- `x-api-key` (string, required)

### Body (application/json)

This endpoint expects an object.

- `name` (string, required) — The name of the import
- `join_type` (string, required) — The join type
- `file_name` (string, required) — The file name
- `tags` (DbsDbIdImportsPostRequestBodyContentApplicationJsonSchemaTags, required) — Tags associated with the import
- `timeout` (double, optional) — The timeout duration
- `url` (string, optional) — The URL for the import
- `CURLOPT_USERAGENT` (string, optional) — The user agent

## Response

### 200

Import Created

## Types

### DbsDbIdImportsPostRequestBodyContentApplicationJsonSchemaTags

Tags associated with the import

## Examples

### url

**Request**

```json
{
  "name": "new url",
  "join_type": "product_feed",
  "file_name": "file.txt",
  "tags": {
    "platform": "BigCommerce"
  },
  "timeout": 900,
  "url": "https://google.com/file.txt",
  "CURLOPT_USERAGENT": "Google",
  "file_location": "url"
}
```

**Response**

```json
{
  "backup_failures": "0",
  "clean_file_headers": "0",
  "cxn_id": "23935",
  "db_id": "132",
  "download_activity_timeout": "0",
  "file_location": "preprocess_script",
  "file_map": {
    "enclosure": "",
    "encoding": "",
    "escaper": "",
    "maps": {
      "body-html": "body_html",
      "id": "id",
      "title": "title"
    },
    "separator": "t"
  },
  "file_type": "delimited",
  "force_encoding": "0",
  "ftp_allow_minio_direct": "0",
  "id": "135",
  "ignore_lines": "1",
  "import_info": {
    "CURLOPT_USERAGENT": "",
    "preprocess_info": {
      "actions": {},
      "connection_info": {
        "host": "ftp2.feedonomics.com",
        "password": "password",
        "protocol": "ftp",
        "username": "username"
      },
      "file_info": {
        "directory": "/FEED110",
        "file_match": "",
        "file_type_name": "File Name",
        "filename": "1_import_practical.txt",
        "keep_files_count": "",
        "request_type": "get"
      }
    },
    "url": "https://haproxy-preprocess.feedonomics.com/preprocess/run_preprocess.php?connection_info"
  },
  "join_type": "product_feed",
  "last_download_status": "success",
  "limits": "",
  "line_terminator": "",
  "load_threshold": "1",
  "max_attempts": "1",
  "name": "ftp",
  "name_based_maps": "1",
  "needs_backup": "1",
  "running": "0",
  "status": "0",
  "time_between_attempts": "1",
  "timeout": "900",
  "update_threshold": "1",
  "xml_force_parse": "0",
  "xmlreader": "0"
}
```

**SDK Code**

```python url
import requests

url = "https://meta.feedonomics.com/api.php/dbs/1.1/imports"

payload = {
    "name": "new url",
    "join_type": "product_feed",
    "file_name": "file.txt",
    "tags": { "platform": "BigCommerce" },
    "timeout": 900,
    "url": "https://google.com/file.txt",
    "CURLOPT_USERAGENT": "Google",
    "file_location": "url"
}
headers = {
    "x-api-key": "x-api-key",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript url
const url = 'https://meta.feedonomics.com/api.php/dbs/1.1/imports';
const options = {
  method: 'POST',
  headers: {
    'x-api-key': 'x-api-key',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"name":"new url","join_type":"product_feed","file_name":"file.txt","tags":{"platform":"BigCommerce"},"timeout":900,"url":"https://google.com/file.txt","CURLOPT_USERAGENT":"Google","file_location":"url"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go url
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://meta.feedonomics.com/api.php/dbs/1.1/imports"

	payload := strings.NewReader("{\n  \"name\": \"new url\",\n  \"join_type\": \"product_feed\",\n  \"file_name\": \"file.txt\",\n  \"tags\": {\n    \"platform\": \"BigCommerce\"\n  },\n  \"timeout\": 900,\n  \"url\": \"https://google.com/file.txt\",\n  \"CURLOPT_USERAGENT\": \"Google\",\n  \"file_location\": \"url\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "x-api-key")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby url
require 'uri'
require 'net/http'

url = URI("https://meta.feedonomics.com/api.php/dbs/1.1/imports")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = 'x-api-key'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"new url\",\n  \"join_type\": \"product_feed\",\n  \"file_name\": \"file.txt\",\n  \"tags\": {\n    \"platform\": \"BigCommerce\"\n  },\n  \"timeout\": 900,\n  \"url\": \"https://google.com/file.txt\",\n  \"CURLOPT_USERAGENT\": \"Google\",\n  \"file_location\": \"url\"\n}"

response = http.request(request)
puts response.read_body
```

```java url
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://meta.feedonomics.com/api.php/dbs/1.1/imports")
  .header("x-api-key", "x-api-key")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"new url\",\n  \"join_type\": \"product_feed\",\n  \"file_name\": \"file.txt\",\n  \"tags\": {\n    \"platform\": \"BigCommerce\"\n  },\n  \"timeout\": 900,\n  \"url\": \"https://google.com/file.txt\",\n  \"CURLOPT_USERAGENT\": \"Google\",\n  \"file_location\": \"url\"\n}")
  .asString();
```

```php url
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://meta.feedonomics.com/api.php/dbs/1.1/imports', [
  'body' => '{
  "name": "new url",
  "join_type": "product_feed",
  "file_name": "file.txt",
  "tags": {
    "platform": "BigCommerce"
  },
  "timeout": 900,
  "url": "https://google.com/file.txt",
  "CURLOPT_USERAGENT": "Google",
  "file_location": "url"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'x-api-key' => 'x-api-key',
  ],
]);

echo $response->getBody();
```

```csharp url
using RestSharp;

var client = new RestClient("https://meta.feedonomics.com/api.php/dbs/1.1/imports");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "x-api-key");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"new url\",\n  \"join_type\": \"product_feed\",\n  \"file_name\": \"file.txt\",\n  \"tags\": {\n    \"platform\": \"BigCommerce\"\n  },\n  \"timeout\": 900,\n  \"url\": \"https://google.com/file.txt\",\n  \"CURLOPT_USERAGENT\": \"Google\",\n  \"file_location\": \"url\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift url
import Foundation

let headers = [
  "x-api-key": "x-api-key",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "new url",
  "join_type": "product_feed",
  "file_name": "file.txt",
  "tags": ["platform": "BigCommerce"],
  "timeout": 900,
  "url": "https://google.com/file.txt",
  "CURLOPT_USERAGENT": "Google",
  "file_location": "url"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://meta.feedonomics.com/api.php/dbs/1.1/imports")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### ftp

**Request**

```json
{
  "name": "new ftp",
  "join_type": "product_feed",
  "file_name": "filename.txt",
  "tags": {
    "platform": "BigCommerce"
  },
  "timeout": 900,
  "file_location": "ftp",
  "host": "host.com",
  "password": "password",
  "protocol": "ftp",
  "username": "username"
}
```

**Response**

```json
{
  "backup_failures": "0",
  "clean_file_headers": "0",
  "cxn_id": "23935",
  "db_id": "132",
  "download_activity_timeout": "0",
  "file_location": "preprocess_script",
  "file_map": {
    "enclosure": "",
    "encoding": "",
    "escaper": "",
    "maps": {
      "body-html": "body_html",
      "id": "id",
      "title": "title"
    },
    "separator": "t"
  },
  "file_type": "delimited",
  "force_encoding": "0",
  "ftp_allow_minio_direct": "0",
  "id": "135",
  "ignore_lines": "1",
  "import_info": {
    "CURLOPT_USERAGENT": "",
    "preprocess_info": {
      "actions": {},
      "connection_info": {
        "host": "ftp2.feedonomics.com",
        "password": "password",
        "protocol": "ftp",
        "username": "username"
      },
      "file_info": {
        "directory": "/FEED110",
        "file_match": "",
        "file_type_name": "File Name",
        "filename": "1_import_practical.txt",
        "keep_files_count": "",
        "request_type": "get"
      }
    },
    "url": "https://haproxy-preprocess.feedonomics.com/preprocess/run_preprocess.php?connection_info"
  },
  "join_type": "product_feed",
  "last_download_status": "success",
  "limits": "",
  "line_terminator": "",
  "load_threshold": "1",
  "max_attempts": "1",
  "name": "ftp",
  "name_based_maps": "1",
  "needs_backup": "1",
  "running": "0",
  "status": "0",
  "time_between_attempts": "1",
  "timeout": "900",
  "update_threshold": "1",
  "xml_force_parse": "0",
  "xmlreader": "0"
}
```

**SDK Code**

```python ftp
import requests

url = "https://meta.feedonomics.com/api.php/dbs/1.1/imports"

payload = {
    "name": "new ftp",
    "join_type": "product_feed",
    "file_name": "filename.txt",
    "tags": { "platform": "BigCommerce" },
    "timeout": 900,
    "file_location": "ftp",
    "host": "host.com",
    "password": "password",
    "protocol": "ftp",
    "username": "username"
}
headers = {
    "x-api-key": "x-api-key",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript ftp
const url = 'https://meta.feedonomics.com/api.php/dbs/1.1/imports';
const options = {
  method: 'POST',
  headers: {
    'x-api-key': 'x-api-key',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"name":"new ftp","join_type":"product_feed","file_name":"filename.txt","tags":{"platform":"BigCommerce"},"timeout":900,"file_location":"ftp","host":"host.com","password":"password","protocol":"ftp","username":"username"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go ftp
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://meta.feedonomics.com/api.php/dbs/1.1/imports"

	payload := strings.NewReader("{\n  \"name\": \"new ftp\",\n  \"join_type\": \"product_feed\",\n  \"file_name\": \"filename.txt\",\n  \"tags\": {\n    \"platform\": \"BigCommerce\"\n  },\n  \"timeout\": 900,\n  \"file_location\": \"ftp\",\n  \"host\": \"host.com\",\n  \"password\": \"password\",\n  \"protocol\": \"ftp\",\n  \"username\": \"username\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "x-api-key")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby ftp
require 'uri'
require 'net/http'

url = URI("https://meta.feedonomics.com/api.php/dbs/1.1/imports")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = 'x-api-key'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"new ftp\",\n  \"join_type\": \"product_feed\",\n  \"file_name\": \"filename.txt\",\n  \"tags\": {\n    \"platform\": \"BigCommerce\"\n  },\n  \"timeout\": 900,\n  \"file_location\": \"ftp\",\n  \"host\": \"host.com\",\n  \"password\": \"password\",\n  \"protocol\": \"ftp\",\n  \"username\": \"username\"\n}"

response = http.request(request)
puts response.read_body
```

```java ftp
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://meta.feedonomics.com/api.php/dbs/1.1/imports")
  .header("x-api-key", "x-api-key")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"new ftp\",\n  \"join_type\": \"product_feed\",\n  \"file_name\": \"filename.txt\",\n  \"tags\": {\n    \"platform\": \"BigCommerce\"\n  },\n  \"timeout\": 900,\n  \"file_location\": \"ftp\",\n  \"host\": \"host.com\",\n  \"password\": \"password\",\n  \"protocol\": \"ftp\",\n  \"username\": \"username\"\n}")
  .asString();
```

```php ftp
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://meta.feedonomics.com/api.php/dbs/1.1/imports', [
  'body' => '{
  "name": "new ftp",
  "join_type": "product_feed",
  "file_name": "filename.txt",
  "tags": {
    "platform": "BigCommerce"
  },
  "timeout": 900,
  "file_location": "ftp",
  "host": "host.com",
  "password": "password",
  "protocol": "ftp",
  "username": "username"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'x-api-key' => 'x-api-key',
  ],
]);

echo $response->getBody();
```

```csharp ftp
using RestSharp;

var client = new RestClient("https://meta.feedonomics.com/api.php/dbs/1.1/imports");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "x-api-key");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"new ftp\",\n  \"join_type\": \"product_feed\",\n  \"file_name\": \"filename.txt\",\n  \"tags\": {\n    \"platform\": \"BigCommerce\"\n  },\n  \"timeout\": 900,\n  \"file_location\": \"ftp\",\n  \"host\": \"host.com\",\n  \"password\": \"password\",\n  \"protocol\": \"ftp\",\n  \"username\": \"username\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift ftp
import Foundation

let headers = [
  "x-api-key": "x-api-key",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "new ftp",
  "join_type": "product_feed",
  "file_name": "filename.txt",
  "tags": ["platform": "BigCommerce"],
  "timeout": 900,
  "file_location": "ftp",
  "host": "host.com",
  "password": "password",
  "protocol": "ftp",
  "username": "username"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://meta.feedonomics.com/api.php/dbs/1.1/imports")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```