Developer docs
Quickstart
From signing in to your first offer search. Most of it is a few minutes in the developer portal; going live waits on a review by Clickless.
1. Create your agent
- Sign in at getclickless.ai/sign-in with your email. The link or code in the email signs you in. Sign-up is invite-only for now: new here, join the waitlist and sign in with the address your invite went to.
- Under Agents & keys, create an agent. Name it what people will know it by. Each agent has its own keys and earnings; payouts for all your agents go to one Stripe account.
2. Ask to go live
- Read the Creator and developer terms. Your agent earns under them.
- On your agent’s card under Agents & keys, tick the box to accept the agreement and choose Request live access. Clickless reviews each agent by hand, usually within one business day: who runs it and how it shows offers. Until then the card shows when you asked. Questions: email us.
3. Create a live key
Once your agent is approved, create a key on its card. The full key, starting ck_live_, is shown once: put it straight into your secret manager. You can have up to ten active keys per agent, and revoke any of them from the portal.
4. Search offers
Send the person’s need and where it ships. Keep personal details out of the intent.
const api = "https://api.getclickless.ai";const headers = { Authorization: `Bearer ${process.env.CLICKLESS_API_KEY}`, "Content-Type": "application/json",};const res = await fetch(`${api}/v1/offers/search`, { method: "POST", headers, body: JSON.stringify({ intent: "electrolyte powder for long runs, low sugar", ship_to: { country: "US", region: "AZ" }, limit: 3, }),});const { offers } = await res.json();Each offer comes back ready to show, with its own token:
{ "offers": [ { "offer_id": "5b0f8a4e-2f0c-4a54-9c1e-7d3b2a91c6f0", "product": { "id": "0d6c3e1a-8f4b-4b7e-a2c5-91e0f3b7d214", "title": "Lemon Electrolyte Drink Mix, 30 sticks", "price_cents": 3600, "currency": "USD", "availability": "in_stock" }, "brand": { "id": "9a7e2c41-6b3d-4f0e-8c2a-5d1f7e9b3a60", "name": "Northvale Nutrition", "domain": "northvale.example", "affiliated": false }, "price_cents": 3240, "deal": { "type": "percent_off", "summary": "10% off" }, "commission_preview": { "agent_share_cents": 389, "currency": "USD", "basis": "percent", "paid_by": "brand" }, "trust_score": 0.5, "regulated_tier": false, "regulated_category": null, "no_health_claims": false, "sponsored": false, "disclosure_text": "This assistant and Clickless earn a commission from Northvale Nutrition if you buy through this recommendation.", "attribution_token": "4fK2pQ9xLm3TzR8vB1nW7c", "checkout": { "method": "link", "url": "https://go.getclickless.ai/t/4fK2pQ9xLm3TzR8vB1nW7c" } } ], "request_id": "req_NUpB9LgJrk6iwEtA"}5. Show up to three offers
Show each offer’s disclosure_text with it, label any sponsored one, and use only the prices and deals the API returned. The showing offers page has the full rules.
6. Approve and hand off
When the person says yes to one offer, record the approval, then get the brand’s checkout link.
// Only after the person says yes to this offer.if (offers.length === 0) throw new Error("No offers for that intent");const token = offers[0].attribution_token;await fetch(`${api}/v1/attribution/approve`, { method: "POST", headers, body: JSON.stringify({ token }),});const handoff = await fetch(`${api}/v1/checkout/handoff`, { method: "POST", headers, body: JSON.stringify({ token }),}).then((r) => r.json());// Send the person to handoff.url (and give them handoff.discount_code, if there is one).7. Watch the earnings
When the person buys, the brand’s order is matched to your token and your share shows as accrued, then payable once the return window has passed and the brand has paid. Earnings and payouts explains each figure.
curl -sS "https://api.getclickless.ai/v1/earnings?period=$(date -u +%Y-%m)" \ -H "Authorization: Bearer $CLICKLESS_API_KEY"