CrawlClick docs
Menu and search

CrawlClick API errors and refusals

The external routes can refuse a request in 25 documented ways, with 12 distinct codes. Each one names what to do next.

A refusal body is JSON of the form {"error": "…", "code": "…"}. The error sentence is for people and may be reworded. The code is the stable part, so branch on it. Two refusals are exceptions and show a dash for the code. The access-request form sends only the sentence. The conversion postback’s unknown click sends{"status": "unknown_click"}. Status codes follow HTTP meaning. A 4xx will fail the same way if you resend it unchanged. A 503 is worth retrying, and so is a 429 after a short back-off, because the rate limit refills continuously.

What does each error code mean, and what should I do?

StatusCodeRouteMeansDo instead
400bad_requestPOST /v1/decideThe body is not JSON of this shape. An empty body is accepted and treated as {"safe": true}.Send a JSON object with only the four documented fields. consumer, channel and tier are ignored if sent: they are fixed on your account.
400bad_requestPOST /v1/decide/receiptsThe body lacks decision_id, key_id or signature.Send all three as strings.
400invalid_decisionPOST /v1/decide/receiptsThe decision_id was not issued by this service, or was altered.Send the token byte for byte as /v1/decide returned it; do not decode, re-encode or trim inner characters.
400bad_requestPOST /v1/conversionsThe body is not JSON with a click_id string.Send {"click_id": "…"} with the cc_click value.
401invalid_keyPOST /v1/decideThe bearer token is missing, unknown, revoked, or lacks the scope this route needs.Send Authorization: Bearer ccp_… with the key CrawlClick issued. A rotated or revoked key stops working within about ten seconds; ask CrawlClick for a new one.
401invalid_keyPOST /v1/decide/receiptsThe bearer token is missing, unknown, revoked, or lacks the scope this route needs.Send Authorization: Bearer ccp_… with the key CrawlClick issued. A rotated or revoked key stops working within about ten seconds; ask CrawlClick for a new one.
401bad_receipt_signaturePOST /v1/decide/receiptsThe signature does not verify against the public key registered under key_id.Sign the exact message bytes, with no trailing newline, using the private half of the registered key, and send the signature as unpadded base64url.
401invalid_keyPOST /v1/conversionsThe key is missing or is not the advertiser’s current conversion key.Create a new key in the console (it is shown once) and store it server-side only.
401invalid_tokenPOST /v1/app/mcpNo token, or an expired one. The response carries WWW-Authenticate: Bearer resource_metadata=….Follow resource_metadata to discover the authorisation server and run the OAuth flow again, or use your refresh token.
403not_your_decisionPOST /v1/decide/receiptsThe decision was issued to another partner account.Confirm decisions only with the key of the account that requested them.
403—POST /v1/access-requestsThe request did not come from the CrawlClick website.Apply through the form at www.crawlclick.com/request-access/. There is no server-to-server way to apply.
404—POST /v1/conversionsThe body is {"status": "unknown_click"}, with no code. The click_id is not 32 hexadecimal characters, or the click was settled for another advertiser’s campaign. A well-formed id that has not settled yet is not refused: it is answered pending.Send the cc_click value unchanged, in lower case as it arrived. Do not report conversions for traffic that did not arrive with one.
404not_foundPOST /v1/conversionsThe CrawlClick Earn app is not enabled on this deployment. Every request gets this answer until it is.Nothing to fix on your side. Keep the integration ready; the route starts answering when the Earn channel opens.
405method_not_allowedPOST /v1/app/mcpGET and DELETE are not served; there is no server-to-client stream.POST each JSON-RPC message.
410decision_expiredPOST /v1/decide/receiptsThe decision is older than its expires_at (15 minutes after issue).Do not confirm it. A decision you did not confirm in time costs nothing and earns nothing.
413—POST /v1/decideThe body is over 65,536 bytes. The body is {"error": "body too large"}, with no code.Send only the documented fields. Truncate query and topics on your side.
413—POST /v1/decide/receiptsThe body is over 65,536 bytes. The body is {"error": "body too large"}, with no code.Send only the documented fields. Truncate query and topics on your side.
422—POST /v1/access-requestsA required field is missing or invalid, or the Turnstile check failed.Correct the field named in the error sentence and resubmit from the form.
429rate_limitedPOST /v1/decideYour per-minute request limit, set on your partner account, was exceeded.Back off and retry. The limit is a token bucket that refills continuously at your per-minute rate, counted per partner and separately for decisions and receipts.
429rate_limitedPOST /v1/decide/receiptsYour per-minute request limit, set on your partner account, was exceeded.Back off and retry. The limit is a token bucket that refills continuously at your per-minute rate, counted per partner and separately for decisions and receipts.
500internalPOST /v1/conversionsAn unexpected server error.Retry later with the same body.
503—POST /v1/decideThe service is at capacity. The body is empty and Retry-After: 1 is set.For a decision, answer without a placement. For a receipt, retry after a second.
503—POST /v1/decide/receiptsThe service is at capacity. The body is empty and Retry-After: 1 is set.For a decision, answer without a placement. For a receipt, retry after a second.
503unavailablePOST /v1/decide/receiptsThe receipt could not be written as evidence.Retry the same receipt. Keep your own serve log: it is what reconciliation compares against.
503unavailablePOST /v1/conversionsThe conversion could not be recorded, or accounts are unavailable.Retry the same request. A conversion is recorded at most once per click, so a retry cannot double-count.

What errors does the publisher edge show a crawler?

None of its own. The edge fails open: if CrawlClick answers with any 4xx or 5xx, times out or cannot be reached, the Worker fetches the page from your origin and returns that instead. A crawler or reader never sees a CrawlClick error on your hostname. Failure behaviour lists every case.