Agents: markdown or /docs.json. This page is the same text.

Endpoints

Every route in this catalog. Operator routes are omitted.

Account

GET /healthz

Database is answering.

Auth: none.

Success: 200 {"ok": true}

Errors:

GET /v1/plans

Prices a public signup can choose.

Auth: none.

Success: 200 {"plans":[{"id":"free","selectable":true,"trial_days":30,"setup_fee_cents":0,"resolved_contact_cents":0},{"id":"unlimited","selectable":false}]}

Notes:

POST /v1/accounts

Start a 30-day trial without a card. The signup token lasts one hour.

Auth: none.

Body:

Success: 201 account_id, status pending_email, plan free, signup_token, external_user_id, email_verified false. verification_url is present only when the confirmation email was not sent.

Errors:

Notes:

GET /v1/accounts/{account_id}

Status, plan, email, and whether the email is confirmed.

Auth: signup token.

Success: 200 account_id, status, plan, email, email_verified

Errors:

Notes:

GET /v1/email/verify

Confirm the email. The confirmation link lands here.

Auth: none.

Query:

Success: 200 HTML. The page says "Email confirmed".

Errors:

Notes:

POST /v1/accounts/{account_id}/verification-email

Send the confirmation email again.

Auth: signup token.

Success: 200 {"sent": true, "status": "sent"}, plus verification_url only when the mailer skipped the send. Already confirmed: {"sent": false, "status": "already_verified"}.

Errors:

POST /v1/accounts/{account_id}/checkout

Open Stripe Checkout for the $1 per account/month subscription. No usage charges.

Auth: signup token or account Bearer API key.

Success: 200 url, monthly_cents 100, setup_fee_cents 0, resolved_contact_cents 0

Errors:

Notes:

GET /v1/checkout/success

Browser return after Checkout. Marks the account active when the session is paid.

Auth: none.

Query:

Success: 200 HTML. The page says "Setup payment received".

Errors:

Notes:

GET /v1/checkout/cancelled

Browser return when Checkout is cancelled. No charge.

Auth: none.

Success: 200 HTML. No subscription is activated.

POST /v1/stripe/webhook

Stripe notifies this process. An integrator does not call it.

Auth: Stripe signature.

Success: 200 {"received": true} for a completed checkout and for ignored event types.

Errors:

Notes:

POST /v1/api-keys

Issue an API key. The secret is in this response only.

Auth: signup token, or an existing API key.

Query:

Success: 201 {"api_key": "px_...", "prefix": "px_........"}. prefix is the first 12 characters.

Errors:

Notes:

GET /v1/whoami

Whose key this is. The secret is not returned.

Auth: API key.

Success: 200 account_id, plan, status, key_prefix

Errors:

Notes:

Pixel setup

GET /v1/setup

Whether this account has a pixel installed.

Auth: API key, account in good standing.

Success: 200 good_standing true, pixel_count, installed_count, setup_complete

Errors:

Notes:

POST /v1/pixels

Mint a pixel for a site and return the install snippet.

Auth: API key, account in good standing.

Body:

Success: 201 pixel_id, domain, install_status (not_checked on a new pixel), checked_at, snippet, consent_enabled, check_error.

Errors:

Notes:

GET /v1/pixels

Pixels on this key's account, oldest first. Snippets are not included.

Auth: API key, account in good standing.

Success: 200 {"pixels": [{"pixel_id", "domain", "install_status", "checked_at"}]}

Errors:

GET /v1/pixels/{pixel_id}

One pixel, including the current snippet.

Auth: API key, account in good standing.

Success: 200 same shape as create.

Errors:

Notes:

POST /v1/pixels/{pixel_id}/check

Fetch https://{domain}/ and record whether the HTML contains this pixel id.

Auth: API key, account in good standing.

Success: 200 pixel_id, domain, install_status, checked_at, check_error

Errors:

Notes:

PATCH /v1/pixels/{pixel_id}

Change the domain. Refused after the pixel is installed.

Auth: API key, account in good standing.

Body:

Success: 200 the pixel, with snippet.

Errors:

DELETE /v1/pixels/{pixel_id}

Delete a pixel that is not installed.

Auth: API key, account in good standing.

Success: 204 empty body.

Errors:

GET /v1/pixels/{pixel_id}/snippets/{action}

Extra paste snippet for one commerce action.

Auth: API key, account in good standing.

Success: 200 action, pixel_id, snippet, button_snippet (null when that file is absent).

Errors:

Notes:

POST /v1/pixels/{pixel_id}/email-snippet

Email the immediate install snippet.

Auth: API key, account in good standing.

Body:

Success: 200 {"sent": true, "install_status": "..."}

Errors:

Notes:

Contacts and billing

GET /v1/pixels/{pixel_id}/contacts

Read resolved people. Pass on or after, one of them.

Auth: API key, account in good standing.

Query:

Success: Day: pixel_id, on, contacts. Cursor: pixel_id, after, high_water, contacts. Each contact is id, hem, resolved_at (UTC ISO), contact (the stored object).

Errors:

Notes:

POST /v1/pixels/{pixel_id}/contacts

Store people that are already resolved. A customer read uses GET.

Auth: API key, account in good standing.

Body:

Success: 200 {"pixel_id", "stored"}. stored counts people written, including updates. Misses are not counted.

Errors:

Notes:

GET /v1/billing/quote

What this account would owe. This call does not charge.

Auth: API key, account in good standing.

Success: 200 plan, contact_count, setup_cents, contact_cents, usage_cents, total_cents. Paid is $1 per account/month. Trial and unlimited are zero. No usage charges.

Errors:

Consent

POST /v1/pixels/{pixel_id}/consent

Turn on the permission popup and publish the policy.

Auth: API key, account active.

Body:

Success: 200 pixel_id, consent_enabled true, policy_version, policy_hash, policy_url, snippet, purposes. The snippet is <script async src="{origin}/px/{pixel_id}.js"></script>.

Errors:

Notes:

Consent log for one pixel, newest first, at most 200 rows.

Auth: API key, account active.

Query:

Success: 200 pixel_id, events. Each event includes the receipt fields plus receipt, signature, and signature_alg hmac-sha256.

Errors:

GET /px/{pixel_id}.js

The permission popup. Browsers load this. It is not cached.

Auth: none.

Success: 200 application/javascript. Cache-Control: no-store.

Errors:

Notes:

GET /v1/policy/{pixel_id}

The current privacy notice as HTML.

Auth: none.

Same handler: GET /api/v1/policy/{pixel_id}.

Success: 200 HTML.

Errors:

Notes:

POST /v1/consent/record

The popup writes one choice. A saved choice is 202. An ignored choice is 204 with an empty body.

Auth: none.

Same handler: POST /api/v1/pixel/fire.

Body:

Success: 202 recorded true, receipt_id, policy_version_hash, purposes, receipt, signature, signature_alg. The receipt is pixel_id, receipt_id, visitor_id, origin, consent_state, policy_hash, purposes, recorded_at.

Errors:

Notes:

Whether the latest receipt allows a purpose.

Auth: none.

Query:

Success: 200 permitted, reason, and when a row exists: receipt_id, policy_version_hash, current_policy_hash, purposes, recorded_at, receipt, signature, signature_alg.

Errors:

Notes:

The latest receipt for a visitor, with a signature.

Auth: none.

Same handler: GET /api/v1/consent/receipt.

Query:

Success: 200 the check object plus valid true, when a receipt exists.

Errors:

Notes:

POST /v1/consent/verify

Check a receipt signature.

Auth: none.

Body:

Success: 200 {"valid": true} or {"valid": false}.

Errors:

Scripts the tag loads

GET /pixel.js

Identification script referenced by the immediate snippet.

Auth: none.

Success: 200 application/javascript.

GET /pixel.dev.js

Dev beacon. Customer installs use /pixel.js or the consent tag.

Auth: none.

Success: 200 application/javascript.

GET /pixel_popup.js

Popup script referenced by the immediate snippet.

Auth: none.

Success: 200 application/javascript.

GET /pixels/{pixel_id}/p.js

Redirect to Delivr's tag for this pixel id.

Auth: none.

Success: 302 Location on the Delivr CDN.

Errors:

Notes:

GET /external_api/install-pixel/delivr-pixel

Whether this pixel id belongs on this host. Used by the tag, not by account setup.

Auth: none.

Query:

Success: 200 {"pixel_id": "<id>"} when the host is that pixel's domain or a subdomain. Otherwise {"pixel_id": null}.

Notes:

Unlimited key

POST /v1/accounts/{account_id}/activate

Mark an account active without changing its plan. A paid customer key receives 403.

Auth: unlimited API key.

Success: 200 account_id, status active, plan (unchanged).

Errors:

Notes:

POST /v1/pixels/pipeline

Mint a cms or utm pixel on a customer's paid account. A paid key receives 403.

Auth: unlimited API key.

Body:

Success: 201 pixel_id, account_id, domain, install_status, pipeline, snippet, pixel_js_url, delivr_script_url.

Errors:

HTML pages

GET /

HTML front. The Host header picks the pixel site, the permission site, or the API home.

Auth: none.

Success: 200 HTML.

GET /site/pixel

Pixel marketing page.

Auth: none.

Success: 200 HTML.

GET /site/permission

Permission marketing page.

Auth: none.

Success: 200 HTML.

GET /demo

HTML form that provisions a consent tag on the shared demo account.

Auth: none.

Success: 200 HTML.

Notes:

POST /demo/provision

Form post for the demo page. Creates or reuses a pixel on the demo account and turns consent on.

Auth: none.

Success: 200 HTML containing the tag.

Notes:

GET /log

HTML page. A person pastes a pixel id and an API key to read that pixel's consent log.

Auth: none.

Success: 200 HTML. The page calls GET /v1/pixels/{pixel_id}/consent.