Quickstart
After this page you have a working key, a first answer from whoami, and you know the four calls that take a draft to a live campaign.
-
Make a key. In the dashboard open Agent, press Connect an agent, pick the preset Read only, name the key and copy it. It is shown once.
export COUNTVIEWS_KEY=cvk_… -
Ask who the key is.
whoamineeds no scope and changes nothing.curl https://countviews.com/api/public/v1/call \-H "Authorization: Bearer $COUNTVIEWS_KEY" \-H "Content-Type: application/json" \-d '{"name":"whoami","arguments":{}}'{"jsonrpc": "2.0","id": 1,"method": "tools/call","params": {"name": "whoami","arguments": {}}}{} -
Read the answer.
Field Means workspace, key name, scopeswhich brand this is and what the key may call. A tool outside the scopes is refused limitscalls per minute; the key’s own spending limits ( autoActivateUpTo,dailyCap,monthlyCap,null= none, so every launch waits for a person); clips it may decide per dayreadinesscanLaunch,blockers,next, and the company on record (missing,submitted,verified) -
Look at the account. Try
campaigns_listandwallet_statement. Both are reads.curl https://countviews.com/api/public/v1/call \-H "Authorization: Bearer $COUNTVIEWS_KEY" \-H "Content-Type: application/json" \-d '{"name":"campaigns_list","arguments":{"status":"all"}}'{"jsonrpc": "2.0","id": 1,"method": "tools/call","params": {"name": "campaigns_list","arguments": {"status": "all"}}}{"status": "all"}
From a draft to a live campaign
Section titled “From a draft to a live campaign”A Read key stops at step 4. To go further, make a key with the Drafts preset (saves drafts) and then Launch (prices and launches, and asks a person first). Presets are explained in permissions.
| Tool | What happens |
|---|---|
campaign_draft_save |
stores the draft; lists what is still missing. No money |
campaign_quote_issue |
prices it: reserve, fee, covers, requiresApproval. Returns a quoteId, valid 15 minutes, single use. No money |
campaign_activate |
takes only the quoteId. Answers activated or approval_required. Reserves the budget |
approval_status |
after approval_required only: pending, approved, rejected, expired |
curl https://countviews.com/api/public/v1/call \ -H "Authorization: Bearer $COUNTVIEWS_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"campaign_draft_save","arguments":{"externalRef":"spring-2026","title":"Spring launch","kind":"clips","platforms":["youtube_shorts"],"topics":["gaming"],"budget":{"amount":50000,"currency":"EUR"},"rate":{"amount":100,"currency":"EUR"},"maxPayoutPerVideo":{"amount":20000,"currency":"EUR"},"idempotencyKey":"save-spring-2026-1"}}'{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "campaign_draft_save", "arguments": { "externalRef": "spring-2026", "title": "Spring launch", "kind": "clips", "platforms": [ "youtube_shorts" ], "topics": [ "gaming" ], "budget": { "amount": 50000, "currency": "EUR" }, "rate": { "amount": 100, "currency": "EUR" }, "maxPayoutPerVideo": { "amount": 20000, "currency": "EUR" }, "idempotencyKey": "save-spring-2026-1" } }}{ "externalRef": "spring-2026", "title": "Spring launch", "kind": "clips", "platforms": [ "youtube_shorts" ], "topics": [ "gaming" ], "budget": { "amount": 50000, "currency": "EUR" }, "rate": { "amount": 100, "currency": "EUR" }, "maxPayoutPerVideo": { "amount": 20000, "currency": "EUR" }, "idempotencyKey": "save-spring-2026-1"}Amounts are {amount, currency} in cents. externalRef is yours: saving again with it updates the same draft.
curl https://countviews.com/api/public/v1/call \ -H "Authorization: Bearer $COUNTVIEWS_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"campaign_quote_issue","arguments":{"campaign":"spring-2026","idempotencyKey":"quote-spring-2026-1"}}'{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "campaign_quote_issue", "arguments": { "campaign": "spring-2026", "idempotencyKey": "quote-spring-2026-1" } }}{ "campaign": "spring-2026", "idempotencyKey": "quote-spring-2026-1"}curl https://countviews.com/api/public/v1/call \ -H "Authorization: Bearer $COUNTVIEWS_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"campaign_activate","arguments":{"quoteId":"<quoteId from the quote>","idempotencyKey":"launch-spring-2026-1"}}'{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "campaign_activate", "arguments": { "quoteId": "<quoteId from the quote>", "idempotencyKey": "launch-spring-2026-1" } }}{ "quoteId": "<quoteId from the quote>", "idempotencyKey": "launch-spring-2026-1"}- Connect your agent: Claude Code, Cursor, ChatGPT and the rest.
- Campaign lifecycle: what happens after launch.
- Idempotency: why every write carries a key.