Conversions API
Send a sale total from your server and see it by source on your dashboard. Totals only: quietstats never stores who bought.
1. Create a key
In Settings → API keys, pick one site and Send conversions only. That key can send totals for that site and can’t read anything. Read keys can’t send.
2. Send a sale
curl -X POST https://quietstats.co.uk/api/v1/conversions \
-H "Authorization: Bearer qs_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-2026-10-28-0042" \
-d '{"amount": 49.00, "currency": "GBP", "source": "chatgpt.com", "landing": "/pricing"}'Reply: 202 with {"accepted": true, "duplicate": false, "amount_minor": 4900, …}. Sending the same Idempotency-Key again replies 200 with "duplicate": true and adds nothing.
Fields
| Field | Required | What it is |
|---|---|---|
amount | Yes | The total in major units: 49.99 for £49.99. Number or string, 0 to 1,000,000,000. |
currency | Yes | 3-letter ISO 4217 code, such as GBP, EUR or USD. |
count | No | How many sales the total covers (default 1, up to 10,000), so you can send a day’s total in one call. |
label | No | The qs1-… source label that /js/revenue.js put on your checkout link (for example from Stripe’s client_reference_id). Overrides source, channel and landing. |
source | No | Where the visit came from, such as chatgpt.com or google.com. |
channel | No | One of Direct, Search, Social, Referral, Email, Paid, Campaign, AI, Unknown. Worked out from source when left out. |
landing | No | The path the visit started on, such as /pricing. |
day | No | YYYY-MM-DD, today (default) or up to 35 days ago. |
goal | No | A short name for the kind of sale, such as Pro plan. |
site | No | Your site ID. If sent, it must match the key’s site. |
Personal data is rejected
Requests containing any of these fields get 422 personal_data_rejected and nothing is stored: email, e_mail, visitor, visitor_id, visitorid, user, user_id, userid, customer, customer_id, customer_email, ip, ip_address, name, first_name, last_name, phone, address, client_id, session_id, order_id, transaction_id. Values that look like an email address or a long number in source or landing are rejected too.
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No or malformed key |
| 403 | wrong_scope | A read key was used, or the key has no site |
| 403 | wrong_site | site doesn’t match the key |
| 400 | invalid_amount, invalid_currency, … | A field is wrong; the message says which |
| 422 | personal_data_rejected | Personal data was sent |
| 429 | rate_limited | Over your plan’s hourly limit (same limits as the Stats API) |
Where it shows: the Revenue card on your dashboard and the Revenue column on Sources. See Conversions API and Revenue by source.