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.

If a job ID returns an error, 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, we recommend requesting 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 cached data based on how long ago the date range ended:

  • Ended within about the last day: fresh data is returned after about 60 minutes.

  • Ended more than about 15 days ago: the cached result lasts 18 to 32 hours.

  • Ended more than 90 days ago: the report stops refreshing and always returns the cached result. This is not an error.

Refresh report 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 report, or the original job ended in a FAILED or CANCELLED state.

  • Don't replay a job immediately after submitting a /ClickExport request. The initial request may still be in the queue for processing and the data will not have changed, so the replay will provide identical results while unnecessarily increasing API usage.

  • Don't call /ClickExport again with the same parameters. This will not refresh the data and will count toward rate limits.

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

How replays work

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

  • Retrying within 15 minutes of a failure returns ERROR.

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

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 repeated /ClickExport calls with the same parameters. These 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

A click export refreshes for 7 days after the date range ends and then freezes, so a stored file can change during those 7 days. Use replay for:

  • FAILED or CANCELLED jobs

  • Cases where additional data may now be available

  • Refreshing results without changing parameters

No, there is no specific limiter on polling, but we recommend exploring the use of webhooks (postbacks) to avoid excessive calls and receive real-time updates. This happens because an identical request with the exact same parameters has already been submitted. When the system detects a duplicate request, it returns the existing `JobId` instead of creating a new job. A new job will only be scheduled 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.

Last updated