# Create Export

Attention

Please note that the Inbound/Outbound CDR export is available for current + 2 last months.

Creates a single Export. DIDWW performs deletion of CDR Export in 1 month after completion.

## Request

HTTP Method: `POST`

URI Path: `/v3/exports`

### Request Body Object Attributes

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| filters | [CDR Export Filters Object](export-filters-object.html#export-filters-object-v34) | False | Yes | Filters |
| callback\_url | `string` | True | No | The HTTP or HTTPS endpoint to where events related to export will be delivered. |
| callback\_method | `string` | True | No | The HTTP Method used for export events. `post` and `get` are supported methods. |
| 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-v34) for information about
`callback_url`, `callback_method`, and the Export callback payload.

### Filters by Export Type

cdr\_incdr\_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. |

| 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 voice out trunk. |

## Examples

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

[[DIDWW-API-EXAMPLE-START]]

http

```
POST /v3/exports HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

{
  "data": {
    "type": "exports",
    "attributes": {
      "export_type": "cdr_in",
      "filters": {
        "from": "2025-12-01T00:00:00Z",
        "to": "2025-12-31T23:59:59Z",
        "did_number": "123456789"
      }
    }
  }
}
```

curl

```
curl -i -X POST https://api.didww.com/v3/exports -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"export_type": "cdr_in", "filters": {"did_number": "123456789", "from": "2025-12-01T00:00:00Z", "to": "2025-12-31T23:59:59Z"}}, "type": "exports"}}'
```

response

```
HTTP/1.1 201 Created
Content-Type: application/vnd.api+json

{
  "data": {
    "id": "33bdfff7-4de3-4c58-8c90-b99930fb984a",
    "type": "exports",
    "attributes": {
      "status": "pending",
      "created_at": "2025-12-16T06:39:44.465Z",
      "external_reference_id": null,
      "url": null,
      "callback_url": null,
      "callback_method": null,
      "export_type": "cdr_in",
      "filters": {
        "from": "2025-12-01T00:00:00Z",
        "to": "2025-12-31T23:59:59Z",
        "did_number": "123456789"
      }
    }
  },
  "meta": {
    "api_version": "2026-04-16"
  }
}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
POST /v3/exports HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

{
  "data": {
    "type": "exports",
    "attributes": {
      "callback_url": "http://example.com",
      "callback_method": "get",
      "export_type": "cdr_in",
      "filters": {
        "from": "2025-12-01T00:00:00Z",
        "to": "2025-12-31T23:59:59Z",
        "did_number": "123456789"
      }
    }
  }
}
```

curl

```
curl -i -X POST https://api.didww.com/v3/exports -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"callback_method": "get", "callback_url": "http://example.com", "export_type": "cdr_in", "filters": {"did_number": "123456789", "from": "2025-12-01T00:00:00Z", "to": "2025-12-31T23:59:59Z"}}, "type": "exports"}}'
```

response

```
HTTP/1.1 201 Created
Content-Type: application/vnd.api+json

{
  "data": {
    "id": "d4f37476-8ece-4add-bbcb-cc72a7908fe2",
    "type": "exports",
    "attributes": {
      "status": "pending",
      "created_at": "2025-12-16T06:54:30.122Z",
      "external_reference_id": null,
      "url": null,
      "callback_url": "http://example.com",
      "callback_method": "get",
      "export_type": "cdr_in",
      "filters": {
        "from": "2025-12-01T00:00:00Z",
        "to": "2025-12-31T23:59:59Z",
        "did_number": "123456789"
      }
    }
  },
  "meta": {
    "api_version": "2026-04-16"
  }
}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
POST /v3/exports HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

{
  "data": {
    "type": "exports",
    "attributes": {
      "export_type": "cdr_out",
      "filters": {
        "from": "2025-12-01T00:00:00Z",
        "to": "2025-12-31T23:59:59Z",
        "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"
      }
    }
  }
}
```

curl

```
curl -i -X POST https://api.didww.com/v3/exports -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"export_type": "cdr_out", "filters": {"from": "2025-12-01T00:00:00Z", "to": "2025-12-31T23:59:59Z", "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"}}, "type": "exports"}}'
```

response

```
HTTP/1.1 201 Created
Content-Type: application/vnd.api+json

{
  "data": {
    "id": "88a29a27-11fe-4db0-a508-eca1d7cf0b68",
    "type": "exports",
    "attributes": {
      "status": "pending",
      "created_at": "2025-12-21T07:37:13.085Z",
      "external_reference_id": null,
      "url": null,
      "callback_url": null,
      "callback_method": null,
      "export_type": "cdr_out",
      "filters": {
        "from": "2025-12-01T00:00:00Z",
        "to": "2025-12-31T23:59:59Z",
        "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"
      }
    }
  },
  "meta": {
    "api_version": "2026-04-16"
  }
}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
POST /v3/exports HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

{
  "data": {
    "type": "exports",
    "attributes": {
      "export_type": "cdr_out",
      "callback_url": "http://example.com",
      "callback_method": "get",
      "filters": {
        "from": "2025-12-01T00:00:00Z",
        "to": "2025-12-31T23:59:59Z",
        "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"
      }
    }
  }
}
```

curl

```
curl -i -X POST https://api.didww.com/v3/exports -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"callback_method": "get", "callback_url": "http://example.com", "export_type": "cdr_out", "filters": {"from": "2025-12-01T00:00:00Z", "to": "2025-12-31T23:59:59Z", "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"}}, "type": "exports"}}'
```

response

```
HTTP/1.1 201 Created
Content-Type: application/vnd.api+json

{
  "data": {
    "id": "67e4f27f-d5eb-4b80-8924-39486aee6ed4",
    "type": "exports",
    "attributes": {
      "status": "pending",
      "created_at": "2025-12-21T07:42:02.546Z",
      "external_reference_id": null,
      "url": null,
      "callback_url": "http://example.com",
      "callback_method": "get",
      "export_type": "cdr_out",
      "filters": {
        "from": "2025-12-01T00:00:00Z",
        "to": "2025-12-31T23:59:59Z",
        "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"
      }
    }
  },
  "meta": {
    "api_version": "2026-04-16"
  }
}
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 422 | No | [Unprocessable Entity](../../specification/errors/index.html#api-validation-error-object) |
| 401 | No | [Unauthorized](../../configuration.html#api-key) |

On this page
