CrawlClick docs
Menu and search

CrawlClick partner decision API overview

A chat app, agent search API or data API asks CrawlClick for a labelled placement when it answers, shows it, then confirms the serve with an Ed25519-signed receipt; confirmed serves are the ones billed and paid.

Status: Coming. The partner decision API is for products that write answers of their own: a chat app, an agent search API, or a data or retrieval API. At the moment you answer, you ask CrawlClick for a sponsored placement that fits the question. If one is available, you show it under your answer with its disclosure, and then you send a signed receipt to say you showed it. CrawlClick bills the advertiser, and credits you, for confirmed serves.

How does a partner integration work, step by step?

Every placement goes through three steps, and each one has its own page:

  1. Decide. Your server calls POST /v1/decide with the question, a few topics and a brand-safety flag. CrawlClick answers with a fill or with "filled": false. A fill carries a decision_id, the text to show, and an expires_at 15 minutes ahead. See Request a placement.
  2. Show. You render disclosure.passage, which already begins with “Sponsored:”, next to your answer and apart from it. See Show the disclosure.
  3. Confirm. After the answer has gone out, your server signs the decision_id with your Ed25519 private key and posts it to POST /v1/decide/receipts before expires_at. See Sign a receipt.

A decision is an offer, not a sale. CrawlClick cannot see your answer, so a decision alone is never evidence that anything was shown. A decision you do not confirm costs the advertiser nothing and earns you nothing, so you never need to cancel one: if you did not show it, do not confirm it.

Why does CrawlClick need a signed receipt rather than a callback?

The receipt is what makes a serve billable without trusting the request. The decision_id is a token CrawlClick signed when it made the decision, and it carries the campaign, the price and your partner id. The receipt is your Ed25519 signature over that token, made with a private key that never leaves your systems. CrawlClick checks its own token, checks that the token was issued to your account, and checks your signature against a public key you registered. A third party that saw a decision_id cannot confirm it, and you cannot confirm a decision issued to another partner.

What does CrawlClick set up for my account?

Onboarding is done by CrawlClick, not through an API:

  • A partner account with a fixed channel (chat_engine, search_api or data_api) and a consumer id, which is how advertisers’ reports name your product. No request can change either. If you send channel, consumer or tier in a decision request, they are ignored.
  • An API key that starts with ccp_, shown to you once, with two scopes: decide and receipts. CrawlClick rotates or revokes keys; a revoked key stops working within seconds.
  • Your receipt-signing public keys. You generate an Ed25519 key pair, keep the private half, and send CrawlClick the public half with a key id of your choice. Sign a receipt shows how to generate one and the exact encoding CrawlClick accepts.
  • Limits on your account: a per-minute request rate and a daily cap on fills. Both are described on Request a placement.

The partner area of the CrawlClick console shows your keys, your confirmed serves paid and refused per day, your earnings, and the Stripe Connect onboarding for payouts. Prices and partner terms are not documented here; see www.crawlclick.com/pricing/.

Where do I call the decision API from?

From your server. The decision API runs as its own service, separate from the control API at api.crawlclick.com, and has no public hostname yet: its base URL is issued with your key. The service sends no CORS headers, and a ccp_… key in browser or app code is a key anyone can copy. Keep the key, the base URL and your receipt private key in server-side configuration. The code samples on these pages read them from CRAWLCLICK_PARTNER_KEY, CRAWLCLICK_DECISION_URL, CRAWLCLICK_RECEIPT_KEY and CRAWLCLICK_RECEIPT_KEY_ID.

The service has two routes, both POST with JSON bodies, listed in the endpoint reference. Hosts, error shapes, body limits and health checks follow the API conventions.

What can a partner integration not do?

  • It cannot choose the price or the advertiser. Decisions clear in the same auction as every other CrawlClick channel, and the fill tells you which campaign won.
  • It cannot promise an outcome to an advertiser. CrawlClick reports confirmed serves; what a reader does next is measured, not guaranteed.
  • It cannot be billed for a decision that was never confirmed, or for one confirmed after it expired.
  • It has no client library. The reference client is code to copy, not a package; see Client libraries.

Where do I go next?