Get an export result
Returns an export's status and, once it has finished, a signed download link for each of its files.
https://mta.growthdept.ai/api/v1/exports/data-export/result/{id}Request#
curl "https://mta.growthdept.ai/api/v1/exports/data-export/result/$EXPORT_ID" \
-H "Authorization: $MTA_API_KEY" \
-H "Data-Client-ID: $MTA_BRAND_ID"Response#
{
"data_export_id": "7d3e9b20-5c41-4a8e-b6f2-0d9c4e1a2b33",
"status": "SUCCESS",
"result": [
"https://mta.growthdept.ai/api/v1/exports/data-export/download/4b8f2e61-9a3c-4d7e-8f15-6c2a9e0b7d44/7d3e9b20-5c41-4a8e-b6f2-0d9c4e1a2b33/0?expires=1762402212&signature=9c1fe2a74b03d6e8f5a1c2b3d4e5f60718293a4b5c6d7e8f9a0b1c2d3e4f5a6b",
"https://mta.growthdept.ai/api/v1/exports/data-export/download/4b8f2e61-9a3c-4d7e-8f15-6c2a9e0b7d44/7d3e9b20-5c41-4a8e-b6f2-0d9c4e1a2b33/1?expires=1762402212&signature=9c1fe2a74b03d6e8f5a1c2b3d4e5f60718293a4b5c6d7e8f9a0b1c2d3e4f5a6b"
],
"created_at": "2026-11-06T04:10:12.000Z",
"finished_at": "2026-11-06T04:10:14.000Z",
"rows": 31000,
"files": [
{
"url": "https://mta.growthdept.ai/api/v1/exports/data-export/download/4b8f2e61-9a3c-4d7e-8f15-6c2a9e0b7d44/7d3e9b20-5c41-4a8e-b6f2-0d9c4e1a2b33/0?expires=1762402212&signature=9c1fe2a74b03d6e8f5a1c2b3d4e5f60718293a4b5c6d7e8f9a0b1c2d3e4f5a6b",
"rows": 25000,
"start_date": "2026-10-01",
"end_date": "2026-10-25",
"part": 0,
"parts": 1
},
{
"url": "https://mta.growthdept.ai/api/v1/exports/data-export/download/4b8f2e61-9a3c-4d7e-8f15-6c2a9e0b7d44/7d3e9b20-5c41-4a8e-b6f2-0d9c4e1a2b33/1?expires=1762402212&signature=9c1fe2a74b03d6e8f5a1c2b3d4e5f60718293a4b5c6d7e8f9a0b1c2d3e4f5a6b",
"rows": 6000,
"start_date": "2026-10-26",
"end_date": "2026-10-31",
"part": 0,
"parts": 1
}
],
"columns": [
"date",
"campaign_name",
"campaign_id",
"adset_name",
"adset_id",
"ad_name",
"ad_id",
"status",
"accounting_mode",
"attribution_model",
"attribution_window",
"spend",
"attributed_revenue",
"roas",
"orders"
]
}{
"data_export_id": "7d3e9b20-5c41-4a8e-b6f2-0d9c4e1a2b33",
"status": "PENDING",
"result": [],
"created_at": "2026-11-06T04:10:12.000Z",
"finished_at": null
}{
"data_export_id": "7d3e9b20-5c41-4a8e-b6f2-0d9c4e1a2b33",
"status": "ERROR",
"result": [],
"created_at": "2026-11-06T04:10:12.000Z",
"finished_at": "2026-11-06T04:11:02.000Z",
"error": "The export failed. Submit a new export request."
}Authentication#
Send the API key in Authorization and the brand id in Data-Client-ID. The key needs the export:read scope. See Authentication.
| Header | Type | Description |
|---|---|---|
Authorizationrequired | string | The API key. See Authentication. |
Data-Client-IDrequired | uuid | The brand id. |
Parameters#
| Name | In, type | Description |
|---|---|---|
idrequired | path, uuid | The id Create an export returned. |
Response fields#
| Field | Type | Description |
|---|---|---|
data_ | string (uuid) | The export's id. |
status | string | PENDING, SUCCESS or ERROR. |
result | array of strings | One signed download link per file, in file order. Empty until SUCCESS. |
created_ | string (date-time) | When the export was created and when it finished, in UTC. finished_at is null while it runs. |
warn | object | Present when the request had something to warn about: messages is a list of sentences. |
error | string | Present with ERROR. Submit a new export. |
rows | integer or null | With SUCCESS: data lines in the whole export when it was processed. null for exports processed before files carried counts. |
files | array | With SUCCESS: per link, in the same order, its url, its data lines (rows), the dates it covers (start_date and end_date, both included, in the brand's time zone), and part of parts. |
columns | array of strings | With SUCCESS: the header row every file starts with. |
Status codes#
| Status | Meaning | Body |
|---|---|---|
| 200 | The export, in any status. | |
| 401 | No key, an unknown or revoked key, or a key that belongs to another brand than Data-Client-ID. | { "detail": "Unauthorized: send a valid API key in Authorization and its brand id in Data-Client-ID." } |
| 403 | The key is valid but lacks export:read. | { "detail": "This API key lacks the export:read scope." } |
| 404 | No export with that id for this brand. Another brand's export id is not found either. | { "detail": "Data export not found." } |
| 429 | More than 100 requests in one second from this key. Wait the seconds in Retry-After. | { "detail": "Rate limit exceeded: 100 requests per second per API key. Retry after 1 seconds." } |
| 500 | Something failed on our side. Retry later. | { "detail": "Internal server error." } |
Polling#
Fetch the result until status is SUCCESS or ERROR. An export of up to 31 days has usually finished by the time the create request returns. A longer one waits for the job dispatcher, which runs every minute. Polling counts toward the key's 100 requests a second.
An ERROR does not retry by itself. Create the export again.
Download links#
Each link works for an hour from the moment you fetched the result. Fetch the result again whenever you need fresh links: the file at each position stays the same file, with the same dates and part.
Anyone holding a link can download that file until it expires, without a key. Keep links out of logs and tickets.
How the files are split, and how to check a download, is on Files and pagination and Download an export file.
Questions about the API: support@growthdept.ai.