> 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.

# Adds an export to a database

POST https://meta.feedonomics.com/api.php/dbs/{db_id}/exports

Reference: https://docs.feedonomics.com/developer/api-reference/rest/platform-api/exports/adds-an-export-to-a-database

## Authentication

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

## Request

### Path parameters

- `db_id` (integer, required) — ID of the database

### Headers

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

## Response

### 200

Successful operation

- `http_body` (DbsDbIdExportsPostResponsesContentApplicationJsonSchemaHttpBody, optional) — escaped json

## Types

### DbsDbIdExportsPostResponsesContentApplicationJsonSchemaHttpBody

escaped json

## Examples

### webhook

**Response**

```json
{
  "compression": "",
  "deduplicate_field_name": {},
  "delimiter": "tab",
  "destination": "target",
  "destination_region": "en-US",
  "enclosure": "'",
  "escape": "\\\\",
  "export_encoding": "",
  "export_format": "delimited",
  "file_footer": "",
  "file_header": "",
  "file_name": "exercitation in m",
  "host": "",
  "include_column_names": 1,
  "max_attempts": 1,
  "name": "consectetur",
  "password": "",
  "protocol": "webhook",
  "protocol_info": {
    "http_body": "escaped json",
    "http_headers": "Content-Type: application/json",
    "http_method": "POST",
    "http_url": "http://imports.feedonomics.com/export/run_webhook.php"
  },
  "quoted_fields": 0,
  "show_empty_tags": 0,
  "strip_characters": [
    "\\\\r",
    "\\\\n",
    "\\\\t"
  ],
  "threshold": 0,
  "time_between_attempts": 1,
  "use_cdata": 0,
  "username": "",
  "xml_write_document_tag": 0,
  "zip_inner_file_name": ""
}
```

**SDK Code**

```python webhook
import requests

url = "https://meta.feedonomics.com/api.php/dbs/69600146/exports"

headers = {
    "x-api-key": "commodo consequat reprehe",
    "Authorization": "Bearer <token>"
}

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

print(response.json())
```

```javascript webhook
const url = 'https://meta.feedonomics.com/api.php/dbs/69600146/exports';
const options = {
  method: 'POST',
  headers: {'x-api-key': 'commodo consequat reprehe', Authorization: 'Bearer <token>'}
};

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

```go webhook
package main

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

func main() {

	url := "https://meta.feedonomics.com/api.php/dbs/69600146/exports"

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

	req.Header.Add("x-api-key", "commodo consequat reprehe")
	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

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

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

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = 'commodo consequat reprehe'
request["Authorization"] = 'Bearer <token>'

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

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

HttpResponse<String> response = Unirest.post("https://meta.feedonomics.com/api.php/dbs/69600146/exports")
  .header("x-api-key", "commodo consequat reprehe")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://meta.feedonomics.com/api.php/dbs/69600146/exports', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'x-api-key' => 'commodo consequat reprehe',
  ],
]);

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

```csharp webhook
using RestSharp;

var client = new RestClient("https://meta.feedonomics.com/api.php/dbs/69600146/exports");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "commodo consequat reprehe");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift webhook
import Foundation

let headers = [
  "x-api-key": "commodo consequat reprehe",
  "Authorization": "Bearer <token>"
]

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

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

**Response**

```json
{
  "blocked": "0",
  "compression": "",
  "created_at": "2021-11-15 18:51:37",
  "cron": null,
  "cxn_id": "0",
  "db_id": "136",
  "deduplicate_field_name": {},
  "delimiter": "tab",
  "destination": "target",
  "destination_region": "en-US",
  "enclosure": "",
  "escape": "",
  "export_encoding": "",
  "export_fields": {
    "field1": {
      "export_field_name": "additional_image_link",
      "export_id": "72",
      "field_name": "additional_image_link",
      "id": "512",
      "sort_order": "0"
    },
    "field2": {
      "export_field_name": "availability",
      "export_id": "72",
      "field_name": "availability",
      "id": "513",
      "sort_order": "0"
    }
  },
  "export_format": "delimited",
  "export_index_field": "",
  "export_selector": "true",
  "file_footer": "",
  "file_header": "",
  "file_name": "filename.txt",
  "ftp_url": "",
  "host": "host.com",
  "id": "72",
  "include_column_names": "1",
  "json_minify_type": "full",
  "legacy_workers": "1",
  "max_attempts": "3",
  "name": "export_name",
  "next_run_time": null,
  "password": "password",
  "protocol": "ftp",
  "protocol_info": {},
  "quoted_fields": "0",
  "row_limit": "0",
  "row_order": "ASC",
  "row_sort": "",
  "running": "0",
  "show_empty_parent_tags": "1",
  "show_empty_tags": "0",
  "strip_characters": {
    "char1": "\\r",
    "char2": "\\n",
    "char3": "\\t"
  },
  "threshold": "0",
  "time_between_attempts": "30",
  "timeout": "1200",
  "timestamp": "0000-00-00 00:00:00",
  "use_cdata": "0",
  "username": "username",
  "worker_hostname": null,
  "worker_pid": null,
  "xml_write_document_tag": "1",
  "zip_inner_file_name": ""
}
```

**SDK Code**

```python ftp
import requests

url = "https://meta.feedonomics.com/api.php/dbs/69600146/exports"

headers = {
    "x-api-key": "commodo consequat reprehe",
    "Authorization": "Bearer <token>"
}

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

print(response.json())
```

```javascript ftp
const url = 'https://meta.feedonomics.com/api.php/dbs/69600146/exports';
const options = {
  method: 'POST',
  headers: {'x-api-key': 'commodo consequat reprehe', Authorization: 'Bearer <token>'}
};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://meta.feedonomics.com/api.php/dbs/69600146/exports"

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

	req.Header.Add("x-api-key", "commodo consequat reprehe")
	req.Header.Add("Authorization", "Bearer <token>")

	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/69600146/exports")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = 'commodo consequat reprehe'
request["Authorization"] = 'Bearer <token>'

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/69600146/exports")
  .header("x-api-key", "commodo consequat reprehe")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://meta.feedonomics.com/api.php/dbs/69600146/exports', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'x-api-key' => 'commodo consequat reprehe',
  ],
]);

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

```csharp ftp
using RestSharp;

var client = new RestClient("https://meta.feedonomics.com/api.php/dbs/69600146/exports");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "commodo consequat reprehe");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift ftp
import Foundation

let headers = [
  "x-api-key": "commodo consequat reprehe",
  "Authorization": "Bearer <token>"
]

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

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()
```