For the complete documentation index, see llms.txt. This page is also available as Markdown.

Export Contacts

Export contact data

Manage contact exports

Create Contact Export

post

Create a new Contact Export

Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Body
Responses
201

Contact Export created successfully.

application/json
idintegerOptional
statusstring · enumOptionalPossible values:
created_atstring · date-timeOptional
updated_atstring · date-timeOptional
urlstring · uri · nullableOptional

The URL of the exported contacts file. Only available when the export is finished.

post/api/contacts/exports
curl -X POST https://mailtrap.io/api/contacts/exports \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"filters": [{"name": "list_id", "operator": "equal", "value": [1, 2]}]}'
{
  "id": 1,
  "status": "started",
  "created_at": "2021-01-01T00:00:00Z",
  "updated_at": "2021-01-01T00:00:00Z",
  "url": null
}

Get Contact Export

get

Get Contact Export

Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Path parameters
export_idinteger · int64Required

Unique Contact Export ID

Example: 3229
Responses
200

OK.

application/json
idintegerOptional
statusstring · enumOptionalPossible values:
created_atstring · date-timeOptional
updated_atstring · date-timeOptional
urlstring · uri · nullableOptional

The URL of the exported contacts file. Only available when the export is finished.

get/api/contacts/exports/{export_id}
curl -X GET https://mailtrap.io/api/contacts/exports/{export_id} \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "id": 1,
  "status": "started",
  "created_at": "2021-01-01T00:00:00Z",
  "updated_at": "2021-01-01T00:00:00Z",
  "url": null
}

Last updated

Was this helpful?