CrawlClick API endpoint reference
These are the HTTP routes a program outside CrawlClick can call. Each entry is read from the API’s code and names the file it was read from.
The CrawlClick API publishes no OpenAPI document, so this page is the reference. A test in this repository checks every cited source file against the API checkout, so a route that moves or disappears breaks the docs build rather than living on here. Request and response bodies are JSON. Money is always an integer number of micro-dollars, where 1 USD is 1,000,000 micros. Errors carry an error sentence and, on most routes, a machine-readablecode; branch on the code and log the sentence. Conventions covers body limits, rate limits and health checks.
Which hosts serve the API?
https://api.crawlclick.com(api): The control API. Serves the public form endpoint, the conversion postback and the Earn connector.https://<issued with your partner key>(decision): The decision API runs as its own service. It has no public hostname yet; the base URL is issued with a partner key.
Which routes are not in this reference?
The console’s own routes are left out on purpose. Campaign, publisher, agency and wallet routes accept only a console session, which is created by a magic-link sign-in in a browser. No API key can call them, so an integration built on them could not authenticate. Use the console for those tasks. The publisher edge is also not an API you call. CrawlClick runs it in front of your hostname, andthe publisher pages describe what it does.
POST /v1/decide
POST/v1/decideComing
Ask for a labelled sponsored placement to show in an answer you are about to return.
- Host
- https://<issued with your partner key>
- Authentication
Authorization: Bearer ccp_…with thedecidescope.- Source
- api-crawlclick-com/crates/crawlclick/src/decision_api.rs
Request body (JSON)
| Field | Type | Description |
|---|---|---|
| queryoptional | string | The question being answered. Truncated to 500 characters. |
| topicsoptional | string[] | Topics of the answer. At most 30 are read; each is trimmed and lower-cased, and any longer than 60 characters is dropped. |
| urloptional | string | Your own reference to where the answer appears. Truncated to 2048 characters. |
| safeoptional | boolean | Defaults to true. Send false when the context is not brand-safe, so campaigns that exclude unsafe contexts are skipped. |
Responses
200 · A placement. Show disclosure.passage and confirm it with a receipt before expires_at.
{"filled": true, "decision_id": "ccx1.…", "expires_at": 1795000000, "sponsored": true, "disclosure": {"format": "inline_prefix", "label": "Sponsored", "passage": "…", "advertiser": "…"}, "campaign_id": "…", "creative_id": "…", "landing_url": "https://…", "price_micros": 2400, "marker": "…"}200 · Nothing eligible. Answer without a placement.
{"filled": false}200 · Your account reached its daily cap of fills. Fills resume at the next UTC day.
{"filled": false, "reason": "daily_fill_cap"}Refusals
| Status | Code | Means | Do instead |
|---|---|---|---|
| 401 | invalid_key | The 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. |
| 429 | rate_limited | Your 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. |
| 413 | — | The 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. |
| 503 | — | The 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. |
| 400 | bad_request | The 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. |
In context, with code: /partners/decide/.
POST /v1/decide/receipts
POST/v1/decide/receiptsComing
Confirm, with an Ed25519 signature, that you showed a placement. Only confirmed placements are billed and paid.
- Host
- https://<issued with your partner key>
- Authentication
Authorization: Bearer ccp_…with thereceiptsscope.- Source
- api-crawlclick-com/crates/crawlclick/src/decision_api.rs
Request body (JSON)
| Field | Type | Description |
|---|---|---|
| decision_id | string | The decision_id from /v1/decide, exactly as returned. |
| key_id | string | The id of the Ed25519 public key you registered with CrawlClick. |
| signature | string | Unpadded base64url of the 64-byte Ed25519 signature over the UTF-8 bytes of crawlclick-receipt-v1\n followed by decision_id. |
Responses
202 · Recorded as a billable serve.
{"recorded": true, "event_id": "dec:…"}200 · Already confirmed. Nothing more happens.
{"recorded": false, "duplicate": true}202 · The campaign ran out of budget between the decision and the receipt. The serve is not billed and earns nothing.
{"recorded": false, "code": "budget_exhausted"}Refusals
| Status | Code | Means | Do instead |
|---|---|---|---|
| 401 | invalid_key | The 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. |
| 429 | rate_limited | Your 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. |
| 413 | — | The 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. |
| 503 | — | The 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. |
| 400 | bad_request | The body lacks decision_id, key_id or signature. | Send all three as strings. |
| 400 | invalid_decision | The 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. |
| 410 | decision_expired | The 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. |
| 403 | not_your_decision | The decision was issued to another partner account. | Confirm decisions only with the key of the account that requested them. |
| 401 | bad_receipt_signature | The 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. |
| 503 | unavailable | The receipt could not be written as evidence. | Retry the same receipt. Keep your own serve log: it is what reconciliation compares against. |
In context, with code: /partners/receipts/.
POST /v1/conversions
POST/v1/conversionsComing
Report, from your own server, that a click from the CrawlClick Earn app converted.
- Host
- https://api.crawlclick.com
- Authentication
Authorization: Bearer cck_…, the conversion key created in the console. Creating a new key replaces the old one.- Source
- api-crawlclick-com/crates/crawlclick/src/earn_api.rs
Request body (JSON)
| Field | Type | Description |
|---|---|---|
| click_id | string | The value of the cc_click query parameter CrawlClick appended to your landing URL. |
Responses
202 · The conversion is recorded against a settled, paid click.
{"status": "accepted"}202 · The click has not settled yet, or is not yet known. CrawlClick retries it automatically for 30 days.
{"status": "pending"}202 · This click already converted. A conversion is paid once per click.
{"status": "duplicate"}Refusals
| Status | Code | Means | Do instead |
|---|---|---|---|
| 401 | invalid_key | The 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. |
| 400 | bad_request | The body is not JSON with a click_id string. | Send {"click_id": "…"} with the cc_click value. |
| 404 | — | The 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. |
| 404 | not_found | The 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. |
| 503 | unavailable | The 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. |
| 500 | internal | An unexpected server error. | Retry later with the same body. |
In context, with code: /advertisers/conversions/.
POST /v1/app/mcp
POST/v1/app/mcpComing
The MCP endpoint an assistant connects to on behalf of one CrawlClick Earn user, to search that person’s sponsored offers.
- Host
- https://api.crawlclick.com
- Authentication
- OAuth 2.1 bearer token (PKCE S256, public client, scope
offers), obtained through the discovery documents. - Source
- api-crawlclick-com/crates/crawlclick/src/earn_mcp.rs
Responses
200 · The MCP call succeeded.
A JSON-RPC 2.0 response (Streamable HTTP, single JSON responses).Refusals
| Status | Code | Means | Do instead |
|---|---|---|---|
| 401 | invalid_token | No 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. |
| 405 | method_not_allowed | GET and DELETE are not served; there is no server-to-client stream. | POST each JSON-RPC message. |
In context, with code: /assistants/earn-connector/.
POST /v1/access-requests
POST/v1/access-requestsLive
The request-access form on www.crawlclick.com. Browser-only: it requires the website’s exact Origin and a Turnstile token.
- Host
- https://api.crawlclick.com
- Authentication
- None, but the
Originheader must be exactly the website’s origin and the body must carry a valid Turnstile token. - Source
- api-crawlclick-com/crates/crawlclick/src/main.rs
Responses
202 · The application is queued for a person to review.
{"accepted": true}Refusals
| Status | Code | Means | Do instead |
|---|---|---|---|
| 403 | — | The 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. |
| 422 | — | A required field is missing or invalid, or the Turnstile check failed. | Correct the field named in the error sentence and resubmit from the form. |
GET /readyz
GET/readyzLive
Readiness of the control API and its storage.
- Host
- https://api.crawlclick.com
- Authentication
- None.
- Source
- api-crawlclick-com/crates/crawlclick/src/main.rs
Responses
200 · Ready.
{"status": "ready", "postgres": true, "object_store": true}503 · A dependency is unavailable. Each flag says which.
{"status": "not_ready", "postgres": false, "object_store": true}In context, with code: /start/conventions/.