TheOptimizer API — Postman Collection
View all available endpoints, parameters, and example responses.
Authentication
The API uses two tokens:- Access token — sent with every API request. The Authenticate endpoint returns it in the
jwtfield. - Refresh token — used only to get a new access token. It’s returned in the
refresh_tokenfield.
- Call the Authenticate endpoint with your TheOptimizer email (or username) and password, and the
platform: nativeheader. - If your account has two-factor authentication enabled, the response contains a
user_idand asession_idinstead of tokens. Send them with your one-time code to the 2FA Authentication endpoint to receive your tokens. - Store both tokens securely.
Authorization header:
A few endpoints — Create campaigns via Excel, Upload Creative to Creative Library and Manage Campaign Tags — expect the access token in a
jwt header instead. Check each endpoint’s headers in the Postman collection.Token lifetime
Refreshing returns a new access token in the
access_token field. It doesn’t issue a new refresh token or extend the current one. Once the refresh token expires, or if you sign out of that session, call Authenticate again.
Both tokens are JWTs, so you can read the exp claim (a Unix timestamp) to see exactly when each one expires.
We recommend this flow for long-running integrations:
- Call Authenticate once and store both tokens.
- Reuse the access token for every request until it expires, or until a request returns
401 Unauthorized. - Call Refresh Access Token with your refresh token, then retry the request with the new access token.
- Only when the refresh token has expired, call Authenticate again.
Rate limits
Authenticate endpoint
The Authenticate endpoint is protected by dynamic rate limiting. The limits adjust automatically based on traffic, so we don’t publish a fixed number, and repeated login requests can be blocked. Your integration should only need to call Authenticate once to get a refresh token, then again when that refresh token expires — roughly once every 30 days. To stay clear of the limits:- Don’t log in before every request or every job run.
- Renew an expired access token with Refresh Access Token instead of logging in again.
- If several workers or scripts call the API, share one set of tokens between them instead of having each one authenticate.
Other endpoints
The other endpoints, including Reporting, don’t have fixed request limits. They’re covered by a fair usage policy: use the API at a volume that matches what your integration needs. If we see usage that affects the platform, we’ll reach out and ask you to reduce your request rate. To keep your usage fair:- Run reporting queries one after another rather than in large parallel bursts.
- Request only the date ranges and fields you need.
- If you receive a
429 Too Many Requestsresponse, wait before retrying and increase the delay with each retry.
The API is currently in limited availability. Additional endpoints will be added over time. If you need access to specific data or actions not yet available, reach out to our support team.
