ClickVerdict API
The ClickVerdict API gives an approved app access to your own sites, ad clicks, scores, blocked IPs, allowlist, change log and Google Ads connection status, and lets it request the same changes the dashboard offers. Every call returns only the data of the ClickVerdict user who approved the app. A score is a rating with reasons, not a verdict.
The API and the Claude connector use the same data, safeguards and sign-in. The base address is https://api.clickverdict.com. A machine-readable description (OpenAPI 3.1) is at https://api.clickverdict.com/v1/openapi.json.
Quickstart with an API key
For your own scripts you can use a personal API key instead of OAuth. Create one in ClickVerdict under Settings, API keys: give it a name and choose when it expires (30, 90 or 365 days, or never). You can have up to 10 active keys.
- The key is shown once, when you create it. We keep only a one-way fingerprint, so it cannot be shown again. If you lose it, revoke it and create a new one.
- Keys are read-only. They can use every GET endpoint. Every change endpoint answers 403
insufficient_scope, and administrator endpoints answer 403. - Send it as
Authorization: Bearer cvk_...tohttps://api.clickverdict.comonly. Do not put it in a web address or in code you share. - To revoke a key, open Settings, API keys, and choose Revoke. It stops working on its next request. An expired or revoked key gets 401, and a key stops working while the account is paused.
- The Claude connector (MCP) does not accept API keys: MCP uses OAuth, and Claude connects by signing in. A key sent to the connector address gets 401.
curl -s -H "Authorization: Bearer cvk_..." https://api.clickverdict.com/v1/sites
Building a connector for other people? It uses OAuth 2.1: see Authentication below.
Authentication (OAuth 2.1)
The API uses OAuth 2.1: the authorization code flow with PKCE (method S256). Tokens are issued by https://clickverdict.com. Discovery documents:
https://api.clickverdict.com/.well-known/oauth-protected-resource(RFC 9728)https://clickverdict.com/.well-known/oauth-authorization-server(RFC 8414)
Apps identify themselves with a Client ID Metadata Document (an https client id) or with dynamic client registration (RFC 7591); both are for public clients without a secret. Send the resource parameter (RFC 8707) with the exact value https://api.clickverdict.com in the authorization and token requests. A token issued for the API is refused by the connector address and the other way round.
Scopes: clickverdict.read for every GET endpoint, clickverdict.write for the changes. An app that wants both asks for both; if it names no scope, both are requested and you see both on the permission screen.Access tokens last 1 hour. Refresh tokens last 30 days and rotate: each refresh returns a new pair, and presenting an old refresh token again revokes the whole chain (invalid_grant). A sign-in chain ends after 90 days at most. Send the token as Authorization: Bearer <token>. Without a valid token the answer is 401 with a WWW-Authenticate header pointing to the protected resource metadata.
Endpoints
Lists return 25 items by default and at most 100 (limit). When more exist, the answer carries next_cursor; pass it back as cursor. IP addresses are shortened in lists (for example 203.0.x.x) and complete only on a single click. Responses carry an ETag; send it as If-None-Match to get 304 when nothing changed.
GET /v1/sitesReadsList your sites.
GET /v1/sites/{id}/clicksReadsList a site's clicks. Query: from, to, band (clean, suspicious, blocked), limit, cursor.
GET /v1/clicks/{id}ReadsGet one click with its reasons and the full IP address.
GET /v1/blocked-ipsReadsList IP exclusions. Query: status, limit, cursor.
GET /v1/allowlistReadsList allowlisted IPs.
GET /v1/changesReadsRead the change log. Query: limit, cursor.
GET /v1/connectionsReadsList Google Ads connections and their status.
GET /v1/summaryReadsEstimated spend on suspicious clicks for the last 7 and 30 days, as a low to high range per currency (Search campaigns only). Query: site_id (optional).
POST /v1/blocked-ipsChanges dataRequest an IP exclusion. Body: click_id.
POST /v1/blocked-ips/{id}/undoChanges dataUndo an exclusion. No body.
POST /v1/allowlistChanges dataAdd an allowlist entry. Body: ip, and optionally note.
DELETE /v1/allowlist/{id}Changes dataRemove an allowlist entry.
PATCH /v1/connections/{id}Changes dataTurn dry run on or off. Body: dry_run, and confirm true when turning it off.
GET /v1/openapi.jsonNo tokenThe OpenAPI 3.1 description of this API. No token needed.
Every change is written to your change log first, with the source "api" and the app's name. These safeguards apply to every change, exactly as in the dashboard: only IP addresses of clicks scored 70 or more can be excluded; allowlisted addresses are never sent; with dry run on, an exclusion is planned and not sent.
Errors
Errors are JSON with a code, a message and a fix, never a bare status:
{"error": {"code": "score_below_70", "message": "...", "fix": "..."}}
- 400 A parameter is not valid. The code and fix say which and how.
- 401 No token, or the token is invalid, expired, revoked or issued for another address. See the WWW-Authenticate header.
- 403 The token lacks the scope this call needs (insufficient_scope).
- 402 Blocking needs a paid plan (code plan_required). The Free audit shows suspicious clicks but cannot request exclusions or turn dry run off. A running 14-day trial counts as a paid plan.
- 404 No such item on your account.
- 409 A ClickVerdict safeguard refused the change (for example allowlisted, undone in the last 30 days, campaign over its cap, confirmation needed).
- 422 The click cannot be excluded yet, for example because it is not linked to a Search campaign.
- 429 Rate limit reached. Wait Retry-After seconds.
- 503 The data service did not answer in time. Try again.
Rate limits
Every endpoint is limited. Defaults: 120 requests a minute per token, 240 a minute per user, 600 a minute per network address, and for changes 20 a minute and 200 a day per user. Beyond a limit the answer is 429 with a Retry-After header (seconds). The limits may change.
Examples
List your sites, then the latest suspicious clicks of one site (replace the token and the site id):
curl -s -H "Authorization: Bearer $TOKEN" https://api.clickverdict.com/v1/sites curl -s -H "Authorization: Bearer $TOKEN" \ "https://api.clickverdict.com/v1/sites/$SITE_ID/clicks?band=suspicious&limit=10"
Request an exclusion for one click (needs the write scope):
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"click_id": "'$CLICK_ID'"}' \
https://api.clickverdict.com/v1/blocked-ips
A refused change, for example a click scored below 70:
{"error": {"code": "score_below_70", "message": "That click scored 45. Only clicks scored 70 or more can be excluded.", "fix": "..."}}