Error Response Format
Toppie errors return a JSON object with a singledetail field:
detail is a list with one entry per invalid field:
input. Messages can change over time, so use the status code to decide how to handle an error, and log detail for troubleshooting.
HTTP Status Codes
400 - Bad Request
The request is not supported, for example an update on a banner campaign, or a report request with an invalid page token.
401 - Unauthorized
The API key is missing, invalid or not a Toppie agency key, or the account is inactive. See Toppie authentication.
403 - Forbidden
The API key is not allowed to perform the action. Keys created in the Toppie UI have full access, so contact your Toppie account manager if you receive this.
404 - Not Found
The campaign does not exist, or it does not belong to the account of the API key. Check the campaign id.
409 - Conflict
The account already has a campaign with the same name. Use a different name.
422 - Unprocessable Entity
A parameter or body field is missing or invalid, a product target is not in the catalog, or the campaign dates are not valid.
429 - Too Many Requests
The API key sent more than 10 requests per second. Wait and retry. See Rate Limiting.
5xx - Server Error
Something went wrong on our side. Retry with backoff, and contact support if the error persists.
Common Errors
Authentication Errors
Authentication Errors
401Unauthorized: theAuthorizationheader is missing, the key is not valid, it is a Marketplace (TSE_) or Advanced (TSC_) key instead of a Toppie (TAS_) key, or the account is inactive.403You do not have the required permissions to perform this action.: the key is not allowed to call the endpoint.
Campaign Errors
Campaign Errors
400Campaign type '...' is not supported for this endpoint.: banner campaigns cannot be updated through the API. Manage them in the Toppie UI.404Agency campaign with id ... not found.: the campaign id does not exist in the account.409Agency Campaign with name ... already exists ...: campaign names must be unique within the account.422Targets not found in the catalog: ...: one or more product targets are not in the catalog. Use ids returned by the products endpoint.422The campaign end date (...) must be greater than its start date (...).: an update would leave the campaign ending at or before its start.
Pagination Errors
Pagination Errors
400Invalid next page token.: the page token sent to a campaign report or to the campaigns report list is not valid.422Invalid next_page ...: thenext_pagevalue sent to the campaign list, the campaign bids or the account activity is not valid.
Validation Errors
Validation Errors
422with a list indetail: a required field is missing, a value has the wrong type, or it is out of range. Each entry’slocpoints to the field to fix.
Fields that an endpoint does not define, including misspelled ones, are ignored without an error. If a change you sent does not take effect, check the field names against the endpoint reference.
Rate Limiting
Each API key can send up to 10 requests per second. Every response includes these headers:X-RateLimit-Limit: total requests allowed in the window.X-RateLimit-Remaining: requests left in the current window.X-RateLimit-Reset: number of seconds until the window resets. It is a duration, not a timestamp.
429 Too Many Requests, wait the number of seconds in X-RateLimit-Reset before you retry. For 5xx errors, retry with increasing delays:
Need Help?
If an error persists after you check this page, contact your Toppie account manager with the endpoint, the request body without the API key, the status code and thedetail returned.