Skip to navigation

Errors

Shape

Every failure has the same envelope. Match on error.code: the message is a fixed text for the code, and it can change.

{
"status": "failure",
"data": null,
"error": { "code": 4000, "message": "Wallet balance does not cover this operation", "fields": null }
}

error.fields is null, except for request validation (422, code 4200), which lists one entry per rejected field:

{
"status": "failure",
"data": null,
"error": {
"code": 4200,
"message": "Request validation failed",
"fields": [
{ "location": ["body", "objective"], "type": "value_error", "message": "Partner search objective must not be empty" }
]
}
}

Always log X-Request-ID. Every response returns it, and it is what lets us find your exact request. Send your own as a UUID, or we create one.

Codes

StatuscodeMeaningWhat to do
4004000The wallet balance does not cover the chargeTop up and send the request again. Nothing was charged
4014012Invalid partner credentialCheck the header. See Authentication
4034031The wallet cannot be spent fromContact us
4044043Unknown search, not yours, not finished, or its results expiredCheck the request_id. Searches are kept for 7 days
4094091The Idempotency-Key was used for another objectiveUse a new key for a new search
4094092Another search of your account is still runningWait for it to finish. Nothing was charged
4224200The request is malformedFix it. See error.fields
4294290A rate limit was reachedWait Retry-After seconds. See Rate limits
5005000, 5001The request could not be recorded or closed on our sideRepeat the request. A submission with the same key is safe
5025021The audience service or the stored result cannot be readTry again in a few seconds. Nothing is charged
5025022Billing is unavailableTry again in a few seconds. A fee already taken is returned
5035030The rate limiter is unavailableTry again in a few seconds
5035031Buy results charged you and could not record the purchaseRepeat the same request. You are not charged again

404 is also the answer for another account’s search, so one account can never learn that a request_id exists for another.

A failed search is not an error response

When a search itself fails, the poll answers 200 with status: "FAILED" and an error object that holds the code (5021 or 5000), a message and refunded. See How a search works.

422 in detail

A 422 can mean:

  • Idempotency-Key is missing or is not a UUID.
  • objective is blank, longer than 2,048 characters or 8,192 bytes, or holds a disallowed control character.
  • request_id is missing or is not a UUID.
  • The body holds a field the API does not know.