# Create Export

Attention

Please note that records of every export type can be exported only for the current month and the 2 previous months.

Creates a single Export of call or message records. DIDWW performs deletion of the Export in 1 month after completion.

## Request

HTTP Method: `POST`

URI Path: `/v3/exports`

### Request Body Object Attributes

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| export\_type | `string` | False | Yes | Type of records to export. Possible values: `cdr_in` - inbound call records, `cdr_out` - outbound call records, `sms_in` - inbound message records, `sms_out` - outbound message records. |
| filters | [Export Filters Object](export-filters-object.html#export-filters-object-v35) | False | Yes | Filters. The accepted keys depend on `export_type`. |
| callback\_url | `string` | True | No | The HTTP or HTTPS endpoint to where events related to export will be delivered. Send it together with `callback_method`. |
| callback\_method | `string` | True | No | The HTTP Method used for export events. `post` and `get` are supported methods. Send it together with `callback_url`. |
| external\_reference\_id | `string` | True | No | Optional identifier for the export in the customer's external system. Maximum length is 100 characters. |

See [Export callback details](../callbacks-details.html#callbacks-export-v35) for information about
`callback_url`, `callback_method`, and the Export callback payload.

### Filters by Export Type

`from` and `to` are required for every export type. Send them as `YYYY-MM-DD HH:MM:SS`
in UTC. `from` must be earlier than `to`, both must fall within the current month or the
2 previous months, and neither can be in the future. The Export returns them normalized to
`YYYY-MM-DD HH:MM:SS`.

Every other filter is optional and matched exactly unless its description says otherwise.
A filter that is sent must not be blank, and only the filters listed for the selected
export type are accepted. Filters that accept several values take a single value or an
array of values.

cdr\_incdr\_outsms\_insms\_out

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| from | `string` | Yes | Start date and time of the CDR range. |
| to | `string` | Yes | End date and time of the CDR range. |
| did\_number | `string` | No | CDR export for a specified DID number. If the 'did\_number' parameter is not used, CDRs are exported for all owned DID numbers. |
| source\_number | `string` | No | CDR export for calls from this caller number, as it reached DIDWW. |
| source\_number\_out | `string` | No | CDR export for calls from this caller number, as delivered to the trunk. |
| source\_country\_iso | `string` | No | CDR export for calls from the country with this upper-case ISO 3166-1 alpha-2 code, for example `GB`. |

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| from | `string` | Yes | Start date and time of the CDR range. |
| to | `string` | Yes | End date and time of the CDR range. |
| voice\_out\_trunk.id | `string` | No | ID of outbound trunk. |
| source | `string` | No | CDR export for calls from this source number. |
| cli | `string` | No | CDR export for calls presenting this caller ID (CLI). |
| destination | `string` | No | CDR export for calls to this destination number. |

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| from | `string` | Yes | Start date and time of the SMS record range. |
| to | `string` | Yes | End date and time of the SMS record range. |
| source\_address\_eq | `string` | No | Messages from exactly this sender address. |
| source\_address\_cont | `string` | No | Messages whose sender address contains this value. |
| destination\_address\_eq | `string` | No | Messages to exactly this recipient address. |
| destination\_address\_cont | `string` | No | Messages whose recipient address contains this value. |
| status | `string` | No | Messages in this state. Possible values: `success`, `failed`, `queued`. |
| trunk\_type | `string` or Array of `strings` | No | Messages delivered through SMS trunks of this type, or of any of these types. Possible values: `smpp_smsc`, `smpp_esme`, `sms_to_email`, `http_in`. |
| sms\_trunk.id | `string` or Array of `strings` | No | Messages delivered through this SMS trunk of the account, or any of these SMS trunks. |
| sms\_id | `string` | No | The message with this SMS ID. |

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| from | `string` | Yes | Start date and time of the SMS record range. |
| to | `string` | Yes | End date and time of the SMS record range. |
| source\_address\_eq | `string` | No | Messages from exactly this sender address. |
| source\_address\_cont | `string` | No | Messages whose sender address contains this value. |
| destination\_address\_eq | `string` | No | Messages to exactly this recipient address. |
| destination\_address\_cont | `string` | No | Messages whose recipient address contains this value. |
| status | `string` | No | Messages in this state. Possible values: `routing_error`, `in_progress`, `queued`, `failed`, `success`. |
| sms\_trunk.id | `string` or Array of `strings` | No | Messages sent through this SMS trunk of the account, or any of these SMS trunks. |
| sms\_id | `string` | No | The message with this SMS ID. |
| service\_type | `string` | No | Person-to-person (`p2p`) or application-to-person (`a2p`) traffic. Possible values: `a2p`, `p2p`. |
| sender\_id\_verification.id | `string` or Array of `strings` | No | Messages sent under this sender ID verification of the account, or any of these sender ID verifications. |

## Examples

Inbound CDR ExampleInbound CDR Example with CallbackOutbound CDR ExampleOutbound CDR Example with CallbackInbound SMS
ExampleOutbound SMS Example with Callback

[[DIDWW-API-EXAMPLE-START]]

http

```
 1POST /v3/exports HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "type": "exports",
10    "attributes": {
11      "export_type": "cdr_in",
12      "filters": {
13        "from": "2026-09-01 00:00:00",
14        "to": "2026-09-30 23:59:59",
15        "did_number": "123456789"
16      }
17    }
18  }
19}
```

curl

```
1curl -i -X POST https://api.didww.com/v3/exports -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"export_type": "cdr_in", "filters": {"did_number": "123456789", "from": "2026-09-01 00:00:00", "to": "2026-09-30 23:59:59"}}, "type": "exports"}}'
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "33bdfff7-4de3-4c58-8c90-b99930fb984a",
 7    "type": "exports",
 8    "attributes": {
 9      "status": "pending",
10      "created_at": "2026-10-16T06:39:44.465Z",
11      "external_reference_id": null,
12      "url": null,
13      "callback_url": null,
14      "callback_method": null,
15      "export_type": "cdr_in",
16      "filters": {
17        "from": "2026-09-01 00:00:00",
18        "to": "2026-09-30 23:59:59",
19        "did_number": "123456789"
20      }
21    }
22  },
23  "meta": {
24    "api_version": "2026-11-19"
25  }
26}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1POST /v3/exports HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "type": "exports",
10    "attributes": {
11      "callback_url": "http://example.com",
12      "callback_method": "get",
13      "export_type": "cdr_in",
14      "filters": {
15        "from": "2026-09-01 00:00:00",
16        "to": "2026-09-30 23:59:59",
17        "did_number": "123456789"
18      }
19    }
20  }
21}
```

curl

```
1curl -i -X POST https://api.didww.com/v3/exports -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"callback_method": "get", "callback_url": "http://example.com", "export_type": "cdr_in", "filters": {"did_number": "123456789", "from": "2026-09-01 00:00:00", "to": "2026-09-30 23:59:59"}}, "type": "exports"}}'
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "d4f37476-8ece-4add-bbcb-cc72a7908fe2",
 7    "type": "exports",
 8    "attributes": {
 9      "status": "pending",
10      "created_at": "2026-10-16T06:54:30.122Z",
11      "external_reference_id": null,
12      "url": null,
13      "callback_url": "http://example.com",
14      "callback_method": "get",
15      "export_type": "cdr_in",
16      "filters": {
17        "from": "2026-09-01 00:00:00",
18        "to": "2026-09-30 23:59:59",
19        "did_number": "123456789"
20      }
21    }
22  },
23  "meta": {
24    "api_version": "2026-11-19"
25  }
26}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1POST /v3/exports HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "type": "exports",
10    "attributes": {
11      "export_type": "cdr_out",
12      "filters": {
13        "from": "2026-09-01 00:00:00",
14        "to": "2026-09-30 23:59:59",
15        "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"
16      }
17    }
18  }
19}
```

curl

```
1curl -i -X POST https://api.didww.com/v3/exports -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"export_type": "cdr_out", "filters": {"from": "2026-09-01 00:00:00", "to": "2026-09-30 23:59:59", "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"}}, "type": "exports"}}'
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "88a29a27-11fe-4db0-a508-eca1d7cf0b68",
 7    "type": "exports",
 8    "attributes": {
 9      "status": "pending",
10      "created_at": "2026-10-21T07:37:13.085Z",
11      "external_reference_id": null,
12      "url": null,
13      "callback_url": null,
14      "callback_method": null,
15      "export_type": "cdr_out",
16      "filters": {
17        "from": "2026-09-01 00:00:00",
18        "to": "2026-09-30 23:59:59",
19        "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"
20      }
21    }
22  },
23  "meta": {
24    "api_version": "2026-11-19"
25  }
26}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1POST /v3/exports HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "type": "exports",
10    "attributes": {
11      "export_type": "cdr_out",
12      "callback_url": "http://example.com",
13      "callback_method": "get",
14      "filters": {
15        "from": "2026-09-01 00:00:00",
16        "to": "2026-09-30 23:59:59",
17        "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"
18      }
19    }
20  }
21}
```

curl

```
1curl -i -X POST https://api.didww.com/v3/exports -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"callback_method": "get", "callback_url": "http://example.com", "export_type": "cdr_out", "filters": {"from": "2026-09-01 00:00:00", "to": "2026-09-30 23:59:59", "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"}}, "type": "exports"}}'
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "67e4f27f-d5eb-4b80-8924-39486aee6ed4",
 7    "type": "exports",
 8    "attributes": {
 9      "status": "pending",
10      "created_at": "2026-10-21T07:42:02.546Z",
11      "external_reference_id": null,
12      "url": null,
13      "callback_url": "http://example.com",
14      "callback_method": "get",
15      "export_type": "cdr_out",
16      "filters": {
17        "from": "2026-09-01 00:00:00",
18        "to": "2026-09-30 23:59:59",
19        "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"
20      }
21    }
22  },
23  "meta": {
24    "api_version": "2026-11-19"
25  }
26}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1POST /v3/exports HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "type": "exports",
10    "attributes": {
11      "export_type": "sms_in",
12      "external_reference_id": "sms-in-2026-09",
13      "filters": {
14        "from": "2026-09-01 00:00:00",
15        "to": "2026-09-30 23:59:59",
16        "destination_address_eq": "441234567890",
17        "status": "success",
18        "trunk_type": ["http_in", "smpp_esme"]
19      }
20    }
21  }
22}
```

curl

```
1curl -i -X POST https://api.didww.com/v3/exports -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"export_type": "sms_in", "external_reference_id": "sms-in-2026-09", "filters": {"destination_address_eq": "441234567890", "from": "2026-09-01 00:00:00", "status": "success", "to": "2026-09-30 23:59:59", "trunk_type": ["http_in", "smpp_esme"]}}, "type": "exports"}}'
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "b1e0c6b4-2f7d-4a59-9b0e-6a3c51f7d2e8",
 7    "type": "exports",
 8    "attributes": {
 9      "status": "pending",
10      "created_at": "2026-10-21T08:15:27.341Z",
11      "external_reference_id": "sms-in-2026-09",
12      "url": null,
13      "callback_url": null,
14      "callback_method": null,
15      "export_type": "sms_in",
16      "filters": {
17        "from": "2026-09-01 00:00:00",
18        "to": "2026-09-30 23:59:59",
19        "destination_address_eq": "441234567890",
20        "status": "success",
21        "trunk_type": ["http_in", "smpp_esme"]
22      }
23    }
24  },
25  "meta": {
26    "api_version": "2026-11-19"
27  }
28}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1POST /v3/exports HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "type": "exports",
10    "attributes": {
11      "export_type": "sms_out",
12      "callback_url": "https://example.com/didww/exports",
13      "callback_method": "post",
14      "filters": {
15        "from": "2026-10-01 00:00:00",
16        "to": "2026-10-20 23:59:59",
17        "service_type": "a2p",
18        "sms_trunk.id": "0f8f2b76-3c1e-4d2a-8b55-1e9a7c4d6f30"
19      }
20    }
21  }
22}
```

curl

```
1curl -i -X POST https://api.didww.com/v3/exports -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"callback_method": "post", "callback_url": "https://example.com/didww/exports", "export_type": "sms_out", "filters": {"from": "2026-10-01 00:00:00", "service_type": "a2p", "sms_trunk.id": "0f8f2b76-3c1e-4d2a-8b55-1e9a7c4d6f30", "to": "2026-10-20 23:59:59"}}, "type": "exports"}}'
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "5c9a3e1d-7b42-4f86-a0d3-9e2b8c6f1a47",
 7    "type": "exports",
 8    "attributes": {
 9      "status": "pending",
10      "created_at": "2026-10-21T08:21:03.907Z",
11      "external_reference_id": null,
12      "url": null,
13      "callback_url": "https://example.com/didww/exports",
14      "callback_method": "post",
15      "export_type": "sms_out",
16      "filters": {
17        "from": "2026-10-01 00:00:00",
18        "to": "2026-10-20 23:59:59",
19        "service_type": "a2p",
20        "sms_trunk.id": "0f8f2b76-3c1e-4d2a-8b55-1e9a7c4d6f30"
21      }
22    }
23  },
24  "meta": {
25    "api_version": "2026-11-19"
26  }
27}
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 422 | No | [Unprocessable Entity](../../specification/errors/index.html#api-validation-error-object) |
| 400 | No | [Bad Request](../../specification/errors/index.html#api-bad-request) |
| 401 | No | [Unauthorized](../authentication.html#authentication-v35) |
| 403 | No | The access token carries the `read` scope, which does not cover this method (title `Insufficient scope`). The response carries `WWW-Authenticate: Bearer error="insufficient_scope"`. See [Scopes](../authentication.html#authentication-scopes-v35). |
| 429 | No | The request budget of the account for the current window is spent (`too_many_requests`). `Retry-After` gives the number of seconds to wait. |
