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

Best practices for exporting clicks

This guide will help you optimize your ClickExport integration. Key topics include exporting data efficiently, refreshing data when needed, and avoiding unnecessary API usage or rate-limit issues.

Job IDs created before November 9, 2026 no longer work. If an older job ID returns "not found", send the original /ClickExport request again to get a new job.

Implementation steps

  1. Send a request to /ClickExport with your desired parameters. Click events continue processing throughout the day. To ensure your export includes all events, request data for any given date only on the next calendar day.

  1. Track the status of the job in one of two ways after submitting your export request:

  • Poll the Jobs API by using the URIs returned in the /ClickExport response to the call: GET /Jobs/{JobId}.

  • Enable a postback webhook to receive automatic notifications when your job is complete. This approach will significantly reduce the number of API calls.

  1. Once the job reaches a COMPLETED state, download the file by calling: /Jobs/{JobId}/Download.

Identical requests (same parameters) return the same job. If that job has completed, you get the cached result until the cache period ends. The cache period depends on how long ago the export's date range ended:

Date range ended
Cached for

Within the last day

60 minutes

1–5 days ago

8 hours

5–7 days ago

12 hours

After the cache period ends, the next identical request re-runs the same job, with the same job ID, to pick up new data. The downloaded file can therefore change between runs.

A click export keeps refreshing until 7 days after its date range ends. After that, it runs one final time and then always returns the cached result. If the date range ended more than 7 days ago when you first request it, the export runs once, and every identical request after that returns the same result. This is expected and is not an error.

Refresh click data

If you need refreshed or updated results for a previously completed job, use: /Jobs/{JobId}/Replay.

Replay best practices

  • Only use replay when it is absolutely necessary. It should be reserved for cases where new or updated data is expected for the export, or the original job ended in a FAILED or CANCELLED state.

  • Don't replay a job immediately after submitting a /ClickExport request. A job that is still QUEUED or RUNNING can't be replayed, and the request returns ERROR. A completed job can't be replayed until 60 minutes after it completes.

  • Don't call /ClickExport again with the same parameters before the cache period ends. You'll get the cached result, and the call still counts toward rate limits.

  • Avoid integrations that repeatedly trigger replays or re-run the same export multiple times per day.

How replays work

  • Replaying a completed job within 60 minutes of completion returns CACHED and doesn't re-run the job.

  • Replaying a FAILED or CANCELLED job within 15 minutes returns ERROR.

  • Replaying a job that is still QUEUED or RUNNING returns ERROR.

  • Waiting 60 minutes doesn't guarantee that a Replay will run, because the cache rules above still apply.

  • While a job re-runs, its status goes back to QUEUED or RUNNING, and /Jobs/{Id}/Download returns the job status instead of the file. Check that the status is COMPLETED before downloading.

For the most up-to-date data

To ensure completeness, request exports later in the day or the following day when the underlying datasets have been fully updated.

General tips

  • Use smaller date ranges when downloading to improve performance and avoid unnecessary large exports.

  • Avoid repeating /ClickExport calls with the same parameters before the cache period ends. Those calls return the cached result, count toward your API usage quota, and can lead to rate limiting.

  • Only replay exports when data changes justify it.

Event postbacks

If you want to reduce the number of API calls required to track a job's progress, you can use event postbacks instead of polling the Jobs API. With postbacks enabled, your system will automatically receive a notification when the job status changes, removing the need to repeatedly call GET /Jobs/{JobId}. This alternative only replaces job-status polling; you will still use the ClickExport and Jobs APIs for submitting, replaying, and downloading results.

Use event postbacks to be notified when updates are available, then trigger the appropriate API request to download the completed job. Learn how to enable postbacks to significantly reduce the volume of calls required and help to avoid rate-limit issues.

Frequently asked questions

How often does a click export refresh?

A click export follows the cache periods above and keeps refreshing until 7 days after its date range ends. After one final run, the result no longer changes, so the downloaded file can change during those first 7 days.

When should I use replay?

Use replay for:

  • FAILED or CANCELLED jobs (15 minutes or more after the failure)

  • Re-running a completed job when you expect new data. Replay follows the same cache rules as an identical /ClickExport request, so it doesn't return fresher data than re-sending the request would.

How often can I poll for a job's status?

There is no specific limit on polling, but you can use webhooks (postbacks) to avoid excessive calls and receive real-time updates.

Why do I get the same Job ID every time I call /ClickExport?

Identical parameters always map to the same job, so you get the same job ID. While the cache period is running, you get the cached result. When the cache period ends, the same job re-runs under the same job ID with fresh data (see the cache rules above).

A new job, with a new job ID, is only created if:

  • You change one or more of the input parameters.

  • The query relies on default date ranges and a new calendar day has passed since the original request.