> For the complete documentation index, see [llms.txt](https://integrations.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.impact.com/agency-v3/reference/reportexport/report-export.md).

# Report Export

Asynchronously export reports through impact.com's Jobs system. Recommended for all report downloads.

## Export a report

> Schedules a report to be exported asynchronously through impact.com's Jobs system. Returns immediately with the initial job status and three URIs to interact with the job.\
> \
> Use the returned \`QueuedUri\` to poll job status, \`ResultUri\` to download the result file once the job has completed, and \`ReplayUri\` to re-run the same job.\
> \
> \## Available query parameters\
> \
> \- \`ResultFormat\` — output file format (universal).\
> \- Report-specific filters — every report accepts its own set of filter parameters (\`START\_DATE\`, \`END\_DATE\`, \`SUBAID\`, \`Advertiser\`, etc.). Call \`GET /Reports/{ReportId}/MetaData\` first to discover which filters a given report supports.\
> \
> \## Error handling\
> \
> Invalid input is returned as \*\*HTTP 200\*\* with an error envelope in the body — for example, an unknown \`ReportId\` returns \`{"Status":"ERROR","Message":"Not permitted to run report ..."}\`. Always check the \`Status\` field before treating the response as a queued job.

```json
{"openapi":"3.1.0","info":{"title":"Agency API — Reports","version":"3.0"},"tags":[{"name":"ReportExport","description":"Asynchronously export reports through impact.com's Jobs system. Recommended for all report downloads."}],"servers":[{"url":"https://api.impact.com","description":"Production"}],"paths":{"/Agencies/{AccountSID}/ReportExport/{ReportId}":{"get":{"operationId":"exportReport","summary":"Export a report","description":"Schedules a report to be exported asynchronously through impact.com's Jobs system. Returns immediately with the initial job status and three URIs to interact with the job.\n\nUse the returned `QueuedUri` to poll job status, `ResultUri` to download the result file once the job has completed, and `ReplayUri` to re-run the same job.\n\n## Available query parameters\n\n- `ResultFormat` — output file format (universal).\n- Report-specific filters — every report accepts its own set of filter parameters (`START_DATE`, `END_DATE`, `SUBAID`, `Advertiser`, etc.). Call `GET /Reports/{ReportId}/MetaData` first to discover which filters a given report supports.\n\n## Error handling\n\nInvalid input is returned as **HTTP 200** with an error envelope in the body — for example, an unknown `ReportId` returns `{\"Status\":\"ERROR\",\"Message\":\"Not permitted to run report ...\"}`. Always check the `Status` field before treating the response as a queued job.","tags":["ReportExport"],"parameters":[{"name":"AccountSID","in":"path","required":true,"description":"Your Agency Account SID.","schema":{"type":"string"}},{"name":"ReportId","in":"path","required":true,"description":"The unique ID of the report to export. Use `GET /Reports` to list all reports and find each report's `Id`.","schema":{"type":"string"}},{"name":"ResultFormat","in":"query","required":false,"description":"The file format the exported report should be returned in.","schema":{"type":"string","enum":["CSV","JSON","XML"],"default":"CSV"}},{"name":"START_DATE","in":"query","required":false,"description":"The start date (inclusive) for the report data, in `YYYY-MM-DD` format. Required by most reports — check the report's `MetaData` to confirm.","schema":{"type":"string","format":"date"}},{"name":"END_DATE","in":"query","required":false,"description":"The end date (inclusive) for the report data, in `YYYY-MM-DD` format. Required by most reports — check the report's `MetaData` to confirm.","schema":{"type":"string","format":"date"}},{"name":"SUBAID","in":"query","required":false,"description":"A program (campaign) ID to refine the report to data from a single program. Required for some reports.","schema":{"type":"string"}}],"responses":{"200":{"description":"**Success** — the export job was queued. Response includes URIs for polling and downloading the result.\n\n**Error** — invalid input (e.g., bad `ReportId`, unrecognised `ResultFormat`, invalid date) returns the same HTTP 200 status with an error envelope. See the `ErrorResponse` schema and the operation description.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportExportResponse"}}}},"401":{"description":"Unauthorized. Check that your Account SID and Auth Token are correct."}}}}},"components":{"schemas":{"ReportExportResponse":{"type":"object","description":"Job-handle response returned from the ReportExport endpoint. The export runs asynchronously through impact.com's Jobs system; use the URIs in this response to track and retrieve the result.\n\nOn invalid input the API returns the same HTTP 200 with an `ErrorResponse` envelope instead — check the `Status` field.","properties":{"Status":{"type":"string","description":"The initial status of the export job. Returns `QUEUED` on successful submission, or `ERROR` if the request was invalid (in which case a `Message` field will be populated instead of the URIs).","enum":["QUEUED","ERROR"]},"QueuedUri":{"type":"string","format":"uri-reference","description":"The relative URI of the underlying job. Use it (or its trailing job ID) with the Jobs API to poll for status updates."},"ResultUri":{"type":"string","format":"uri-reference","description":"The relative URI to download the exported result file. Available once the job completes — calling it before completion returns the job status, not the file."},"ReplayUri":{"type":"string","format":"uri-reference","description":"The relative URI to re-run the same export with the same parameters. Useful for retrying failed jobs without re-specifying inputs."},"Message":{"type":"string","description":"A human-readable error description. Only present when `Status` is `ERROR`."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://integrations.impact.com/agency-v3/reference/reportexport/report-export.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
