> Tychron Atlas API & Provisioning Reference — chapter 23 of 48 as Markdown. Web version: https://docs.tychron.com/api-reference/cdr-export-tasks/
> Source: https://docs.tychron.com/api-reference/ · Updated 2026-11-30 · Generated from the Atlas OpenAPI spec (https://api.atlas.tychron.online/api/v1/openapi is the live contract; this file is a dated snapshot of it).
> Source revision: atlas_api_reference_2026-08-12.md · sha256 1a80314271ee6ef6 · sanitize gate v1 clean · reconciled with OpenAPI 2026.11.23-p02 (spec sha256 42031edc7de10063) on 2026-11-30 · content last modified 2026-11-30 · this chapter's content last changed 2026-11-30
> Scope: the Atlas platform API only. The SMS, MMS, CNAM, LRN and MCL services are separate APIs with their own specifications: https://docs.tychron.com/openapi/
> Machine index: https://docs.tychron.com/llms.txt

# CDR Export Tasks

## Schema

A CDR Export Task is a long running request to dump cdrs from a certain date into a file.


__Type__ Object

| Name              | Type                                                         | Description                        |
| ----------------- | ------------------------------------------------------------ | ---------------------------------- |
| `date`            | String(format:date)                                          | [Desc. `date`](https://docs.tychron.com/api-reference/cdr-export-tasks/#desc-1297)         |
| `error_code`      | Enum(`OK`):String                                            | * `OK` - there was no error        |
| `format`          | Enum(`CSV`, `MLJSON`):String                                 | [Desc. `format`](https://docs.tychron.com/api-reference/cdr-export-tasks/#desc-1298)       |
| `id`              | String(format:ulid)                                          | [Desc. `id`](https://docs.tychron.com/api-reference/cdr-export-tasks/#desc-1299)           |
| `inserted_at`     | String(format:date-time)                                     | An ISO8601 formatted timestamp     |
| `on_done_actions` | [OnDoneActions](https://docs.tychron.com/api-reference/schemas/#schema-ondoneactions)                       |                                    |
| `reference_id`    | String(1..255)                                               | [Desc. `reference_id`](https://docs.tychron.com/api-reference/cdr-export-tasks/#desc-1300) |
| `status`          | [Enum](https://docs.tychron.com/api-reference/cdr-export-tasks/#enum-1301):String                                    | [Desc. `status`](https://docs.tychron.com/api-reference/cdr-export-tasks/#desc-1302)       |
| `type`            | Enum(`API`, `MMS`, `SMS`, `VOICE`, `BALANCE`, `MISC`):String | [Desc. `type`](https://docs.tychron.com/api-reference/cdr-export-tasks/#desc-1303)         |
| `updated_at`      | String(format:date-time)                                     | An ISO8601 formatted timestamp     |

#### Desc. `date` {#desc-1297}

An ISO8601 formatted date.
Determines which day's cdrs will be exported.

Note that if a current or future date is provided, the task will be deferred to the day
AFTER the given date.

#### Desc. `format` {#desc-1298}

The intended exported format, CSV will export a CSV file as expected.
MLJSON exports the cdrs as Multiline-JSON, that is each row in the file is a single CDR record encoded as JSON.

#### Desc. `id` {#desc-1299}

Another format for UUID, used primarily for tasks, requests and messages.

#### Desc. `reference_id` {#desc-1300}

A unique client provided id for the export task.

There is no particular format that is enforced, a general recommendation is to avoid
spaces and non-ASCII characters for best experience.

#### Enum Values status {#enum-1301}

Allowed values

* `NEW`
* `SCHEDULED`
* `PROCESSING`
* `STORING`
* `DELIVERING`
* `COMPLETED`
* `ABORTED`
* `ERROR`

#### Desc. `status` {#desc-1302}

Status gives a brief overview of the state of the task.

* `NEW` - the export task was freshly created and has not begun processing
* `SCHEDULED` - the task has been scheduled to execute at a later time (see date field for more information)
* `PROCESSING` - the task has begun processing
* `STORING` - the task is currently storing its results on internal storage for later access
* `DELIVERING` - the task is now attempting to deliver the exported file to the given endpoints (or notifying)
* `COMPLETED` - the task is completed and it is safe to delete or retrieve the exported details
* `ABORTED` - the task was aborted, execution was halted
* `ERROR` - the task experienced an error, error_code will have more details if any

#### Desc. `type` {#desc-1303}

The main type of CDR that should be exported

* `API` - contain any LRN, LRNE, CNAM related calls
* `MMS` - contain the billed details for MMS records
* `SMS` - contain the billed details for SMS records
* `VOICE` - contain any voice related calls (TERMINATION, DID*)
* `BALANCE` - any balance related changes, including payments, adjustments etc...
* `MISC` - contains various registry related feees



__Example__

```json
{
  "date": "string",
  "error_code": "OK",
  "format": "CSV",
  "id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
  "inserted_at": "2021-08-13T04:08:44.762841Z",
  "on_done_actions": [
    {
      "archive_format": "TAR_GZ",
      "auth_identity": "upload-user",
      "auth_method": "BASIC",
      "auth_secret": "supersecretsauce",
      "data": "sftp://example.com:22/sub/path/to/store/exported_file/in",
      "error_code": "OK",
      "filename": "string",
      "protocol": "SFTP",
      "reference_id": "SFTP-export-action",
      "status": "NEW",
      "type": "SEND"
    }
  ],
  "reference_id": "cdr-export-API-2022-03-14",
  "status": "NEW",
  "type": "API",
  "updated_at": "2021-08-13T04:08:44.762841Z"
}
```



## API

### Create CDR Export Task

```http
POST /api/v1/cdr_export_tasks HTTP/1.1
```

Create a new CDR Export Task.

Note that export tasks can be created without setting any on_done_actions, however it may prove
difficult to retrieve the exported file without assistance if done so.

Therefore it is recommended that an on_done_action is set with an appropriate endpoint to deliver
the exported file to.


#### Request application/json

```http
POST /api/v1/cdr_export_tasks HTTP/1.1
Accept: application/json
Content-Type: application/json
Content-Length: 566
```

```json
{
  "data": {
    "date": "string",
    "format": "CSV",
    "on_done_actions": [
      {
        "archive_format": "TAR_GZ",
        "auth_identity": "upload-user",
        "auth_method": "BASIC",
        "auth_secret": "supersecretsauce",
        "data": "sftp://example.com:22/sub/path/to/store/exported_file/in",
        "filename": "string",
        "protocol": "SFTP",
        "reference_id": "SFTP-export-action",
        "type": "SEND"
      }
    ],
    "reference_id": "cdr-export-API-2022-03-14",
    "type": "API"
  },
  "type": "call_data_export_task"
}
```

#### Response 201

##### application/json

```http
HTTP/1.1 201
Content-Type: application/json
Content-Length: 803
```

```json
{
  "data": {
    "date": "string",
    "error_code": "OK",
    "format": "CSV",
    "id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
    "inserted_at": "2021-08-13T04:08:44.762841Z",
    "on_done_actions": [
      {
        "archive_format": "TAR_GZ",
        "auth_identity": "upload-user",
        "auth_method": "BASIC",
        "auth_secret": "supersecretsauce",
        "data": "sftp://example.com:22/sub/path/to/store/exported_file/in",
        "error_code": "OK",
        "filename": "string",
        "protocol": "SFTP",
        "reference_id": "SFTP-export-action",
        "status": "NEW",
        "type": "SEND"
      }
    ],
    "reference_id": "cdr-export-API-2022-03-14",
    "status": "NEW",
    "type": "API",
    "updated_at": "2021-08-13T04:08:44.762841Z"
  },
  "type": "call_data_export_task"
}
```
#### Response 403

##### application/json

```http
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
```

```json
{
  "errors": [
    {
      "code": "access_denied.no_scope",
      "detail": "No scope available to user role",
      "params": {
        "action": "index",
        "level": "guest",
        "resource": "resource"
      },
      "sub_code": "none",
      "title": "Access Denied, no scope available"
    }
  ]
}
```
#### Response 422

##### application/json

```http
HTTP/1.1 422
Content-Type: application/json
Content-Length: 241
```

```json
{
  "errors": [
    {
      "code": "invalid_parameter",
      "detail": "The specified resource could not be found",
      "source": {
        "pointer": "/data/type"
      },
      "sub_code": "none",
      "title": "Not Found"
    }
  ]
}
```


### Delete CDR Export Task

```http
DELETE /api/v1/cdr_export_tasks/{id} HTTP/1.1
```

Delete an CDR Export Task.


__Path Parameters__

| Name | Type                 | Description        |
| ---- | -------------------- | ------------------ |
| id   | String(format:ulid)! | CDR Export Task ID |

#### Request

```http
DELETE /api/v1/cdr_export_tasks/{id} HTTP/1.1
Accept: application/json
```
#### Response 200

##### application/json

```http
HTTP/1.1 200
Content-Type: application/json
Content-Length: 803
```

```json
{
  "data": {
    "date": "string",
    "error_code": "OK",
    "format": "CSV",
    "id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
    "inserted_at": "2021-08-13T04:08:44.762841Z",
    "on_done_actions": [
      {
        "archive_format": "TAR_GZ",
        "auth_identity": "upload-user",
        "auth_method": "BASIC",
        "auth_secret": "supersecretsauce",
        "data": "sftp://example.com:22/sub/path/to/store/exported_file/in",
        "error_code": "OK",
        "filename": "string",
        "protocol": "SFTP",
        "reference_id": "SFTP-export-action",
        "status": "NEW",
        "type": "SEND"
      }
    ],
    "reference_id": "cdr-export-API-2022-03-14",
    "status": "NEW",
    "type": "API",
    "updated_at": "2021-08-13T04:08:44.762841Z"
  },
  "type": "call_data_export_task"
}
```
#### Response 403

##### application/json

```http
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
```

```json
{
  "errors": [
    {
      "code": "access_denied.no_scope",
      "detail": "No scope available to user role",
      "params": {
        "action": "index",
        "level": "guest",
        "resource": "resource"
      },
      "sub_code": "none",
      "title": "Access Denied, no scope available"
    }
  ]
}
```
#### Response 404

##### application/json

```http
HTTP/1.1 404
Content-Type: application/json
Content-Length: 314
```

```json
{
  "errors": [
    {
      "code": "not_found",
      "detail": "The specified resource could not be found",
      "params": {
        "resource": {
          "id": "3fbb573a-6049-44a0-a12c-d3a1ffae0b69",
          "type": "user"
        }
      },
      "sub_code": "none",
      "title": "Not Found"
    }
  ]
}
```


### List CDR Export Tasks

```http
GET /api/v1/cdr_export_tasks HTTP/1.1
```

Retrieve CDR export tasks


__Query Parameters__

| Name   | Type    | Description                      |
| ------ | ------- | -------------------------------- |
| first  | Integer | [Query Desc. first](https://docs.tychron.com/api-reference/cdr-export-tasks/#desc-1304)  |
| last   | Integer | [Query Desc. last](https://docs.tychron.com/api-reference/cdr-export-tasks/#desc-1305)   |
| after  | String  | [Query Desc. after](https://docs.tychron.com/api-reference/cdr-export-tasks/#desc-1306)  |
| before | String  | [Query Desc. before](https://docs.tychron.com/api-reference/cdr-export-tasks/#desc-1307) |

#### Query Desc. first {#desc-1304}

The number of items to return starting from the 'after' cursor

#### Query Desc. last {#desc-1305}

The number of items to return behind the 'before' cursor

#### Query Desc. after {#desc-1306}

The cursor representing the starting point of a 'first' based paging

#### Query Desc. before {#desc-1307}

The cursor representing the starting point of a 'last' based paging

#### Request

```http
GET /api/v1/cdr_export_tasks HTTP/1.1
Accept: application/json
```
#### Response 200

##### application/json

```http
HTTP/1.1 200
Content-Type: application/json
Content-Length: 1130
```

```json
{
  "count": 1,
  "page_info": {
    "end_cursor": "YXJyYXljb25uZWN0aW9uOjQ=",
    "has_next_page": true,
    "has_previous_page": false,
    "start_cursor": "YXJyYXljb25uZWN0aW9uOjA="
  },
  "results": [
    {
      "data": {
        "date": "string",
        "error_code": "OK",
        "format": "CSV",
        "id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
        "inserted_at": "2021-08-13T04:08:44.762841Z",
        "on_done_actions": [
          {
            "archive_format": "TAR_GZ",
            "auth_identity": "upload-user",
            "auth_method": "BASIC",
            "auth_secret": "supersecretsauce",
            "data": "sftp://example.com:22/sub/path/to/store/exported_file/in",
            "error_code": "OK",
            "filename": "string",
            "protocol": "SFTP",
            "reference_id": "SFTP-export-action",
            "status": "NEW",
            "type": "SEND"
          }
        ],
        "reference_id": "cdr-export-API-2022-03-14",
        "status": "NEW",
        "type": "API",
        "updated_at": "2021-08-13T04:08:44.762841Z"
      },
      "type": "call_data_export_task"
    }
  ]
}
```
#### Response 403

##### application/json

```http
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
```

```json
{
  "errors": [
    {
      "code": "access_denied.no_scope",
      "detail": "No scope available to user role",
      "params": {
        "action": "index",
        "level": "guest",
        "resource": "resource"
      },
      "sub_code": "none",
      "title": "Access Denied, no scope available"
    }
  ]
}
```


### Retrieve CDR Export Task by ID

```http
GET /api/v1/cdr_export_tasks/{id} HTTP/1.1
```

Retrieve a CDR Export Task by ID


__Path Parameters__

| Name | Type                 | Description        |
| ---- | -------------------- | ------------------ |
| id   | String(format:ulid)! | CDR Export Task ID |

#### Request

```http
GET /api/v1/cdr_export_tasks/{id} HTTP/1.1
Accept: application/json
```
#### Response 200

##### application/json

```http
HTTP/1.1 200
Content-Type: application/json
Content-Length: 803
```

```json
{
  "data": {
    "date": "string",
    "error_code": "OK",
    "format": "CSV",
    "id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
    "inserted_at": "2021-08-13T04:08:44.762841Z",
    "on_done_actions": [
      {
        "archive_format": "TAR_GZ",
        "auth_identity": "upload-user",
        "auth_method": "BASIC",
        "auth_secret": "supersecretsauce",
        "data": "sftp://example.com:22/sub/path/to/store/exported_file/in",
        "error_code": "OK",
        "filename": "string",
        "protocol": "SFTP",
        "reference_id": "SFTP-export-action",
        "status": "NEW",
        "type": "SEND"
      }
    ],
    "reference_id": "cdr-export-API-2022-03-14",
    "status": "NEW",
    "type": "API",
    "updated_at": "2021-08-13T04:08:44.762841Z"
  },
  "type": "call_data_export_task"
}
```
#### Response 403

##### application/json

```http
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
```

```json
{
  "errors": [
    {
      "code": "access_denied.no_scope",
      "detail": "No scope available to user role",
      "params": {
        "action": "index",
        "level": "guest",
        "resource": "resource"
      },
      "sub_code": "none",
      "title": "Access Denied, no scope available"
    }
  ]
}
```
#### Response 404

##### application/json

```http
HTTP/1.1 404
Content-Type: application/json
Content-Length: 314
```

```json
{
  "errors": [
    {
      "code": "not_found",
      "detail": "The specified resource could not be found",
      "params": {
        "resource": {
          "id": "3fbb573a-6049-44a0-a12c-d3a1ffae0b69",
          "type": "user"
        }
      },
      "sub_code": "none",
      "title": "Not Found"
    }
  ]
}
```

---

Previous chapter: https://docs.tychron.com/api-reference/cdrs.md  
Next chapter: https://docs.tychron.com/api-reference/call-data-webhooks.md  
Complete reference in one file: https://docs.tychron.com/llms-full.txt
