CheckboxDocs

Agent setup API

One-call onboarding for AI coding agents: the setup_checkbox MCP tool (or the `checkbox init` CLI) signs the human in with one browser approval (device authorization), gets test-mode keys, and drives a setup session (snippet, site, Terms and policies, first checks, Stripe test subscription) until ne

xt_action is "done".

OperationEndpoint
Start a device login (setup_checkbox)POST /v1/device/authorize
Poll a device login for its keysPOST /v1/device/token
List setup sessionsGET /v1/setup_sessions
Start a setup session (agents that already have a key)POST /v1/setup_sessions
Retrieve a setup sessionGET /v1/setup_sessions/{setup_session}
Report what the agent learned or changedPOST /v1/setup_sessions/{setup_session}
Re-check the site nowPOST /v1/setup_sessions/{setup_session}/verify
Finish the setup and notify the humanPOST /v1/setup_sessions/{setup_session}/complete

The SetupSession object

What an AI coding agent set up for a project, as a checklist with one next_action. Loop: apply next_action, call verifySetupSession, repeat until next_action.type is "done".

FieldTypeDescription
idstringUnique identifier of the setup session (setup_…).
objectenumString representing the object's type. Always "setup_session".
livemodebooleantrue for live-mode objects, false for test mode (ck_test_ keys act on an isolated sandbox).
statusenumopen while the agent works; completed after completeSetupSession (checks keep running). One of open, completed, canceled.
createdintegerWhen the human approved the setup. Unix timestamp in seconds.
updatedintegerLast change. Unix timestamp in seconds.
accountstringThe Checkbox account.
sitestring | nullThe test-mode site (null until a site URL is known).
live_sitestring | nullThe live-mode site, once created.
clientobjectWho set it up.
client.namestring | nullClient program.
client.versionstring | nullClient version.
client.agentstring | nullAI agent, when known.
projectobjectFacts about the codebase the agent reported (framework, layout_file, checkout_code…).
businessobjectThe business as registered.
business.site_urlstring | nullSite URL.
business.checkout_urlstring | nullCheckout / pricing page.
business.account_urlstring | nullAccount page.
business.terms_urlstring | nullTerms of service.
business.privacy_urlstring | nullPrivacy policy.
business.refund_urlstring | nullRefund policy.
business.cancellation_urlstring | nullCancellation policy.
business.support_emailstring | nullSupport email.
business.merchant_namestring | nullMerchant (brand) name used in generated legal copy (the site name).
business.billing_platformstring | nullBilling platform.
business.plansarray of SetupPlansPlans.
discoveredobjectPolicy / pricing links Checkbox found in the site's HTML (terms_url, privacy_url, refund_url, cancellation_url, pricing_url, account_url).
installobjectInstall details.
install.script_tagstring | nullThe exact tag to put in <head> on every page.
install.snippet_keystring | nullPublic snippet key of the site.
install.publishable_keystring | nullTest-mode publishable key (pk_test_…) for Checkbox Elements in the browser.
install.inbound_emailstring | nullBCC this address on subscription emails (acknowledgment, reminders) so they are checked.
install.installed_instring | nullFile the agent added the snippet to.
install.detected_on_siteboolean | nullWhether Checkbox saw the snippet on the live site at the last verify (null: not checked).
policiesarray of objectsPolicy documents Checkbox fetched (checked by terms.* checks).
stripeobjectStripe test mode for lifecycle test runs.
stripe.test_key_consentbooleanWhether the human allowed Checkbox to use the project's Stripe TEST key for synthetic subscriptions.
stripe.test_key_hintstring | nullHint of the key the CLI found (never the key).
stripe.test_credential_storedbooleanWhether a Stripe test-mode key is stored for test runs.
stripe.checkout_configsintegerRegistered Checkout Session param sets.
stripe.restricted_keyobjectRestricted-key recommendation.
test_runobject | nullLatest lifecycle test run of the site.
test_run.idstringUnique identifier of the test run (run_…).
test_run.statusstringqueued, running, succeeded, failed or canceled.
test_run.createdintegerWhen it started. Unix timestamp in seconds.
complianceobject | nullLatest verdict of the test-mode site.
compliance.scorenumber0-100.
compliance.insurablebooleanNo critical/high failure open.
compliance.evaluatedintegerWhen it was evaluated. Unix timestamp in seconds.
compliance.failingintegerOpen failing findings.
compliance.needs_reviewintegerOpen needs-review findings.
compliance.top_findingsarray of objectsMost urgent open findings (details: retrieveFinding; ordered tasks: checkbox plan --json).
stepsarray of SetupStepsThe setup checklist, in order.
next_actionSetupNextActionThe single next thing the agent should do.
owner_notifiedbooleanWhether the human got the summary email.
owner_emailenum | nullThe summary email: sent, or not_configured when this deployment has no SMTP (null before completeSetupSession). One of sent, not_configured.
review_urlstringDashboard page with the setup timeline (for the human).

Start a device login (setup_checkbox)

POST /v1/device/authorize

Public (no API key). Returns a device_code (keep it private), a user_code and verification_uri_complete. Show the human ONE line ("Open <verification_uri_complete> and click Approve"), open it in their browser when possible, then poll createDeviceToken every interval seconds. New users sign up on that page with an email link or GitHub / Google; nothing is created until they click Approve.

No API key (public) · Operation createDeviceAuthorization

SDK: checkbox.device.authorize() (Node) · checkbox.device.authorize() (Python). MCP / agents: operation createDeviceAuthorization.

Body

FieldTypeDescription
clientSetupClientWho is setting up Checkbox.
site_urlstringSite URL detected in the project (shown on the approval screen; the test-mode site is created for it).
project_namestringProject name.
frameworkstringDetected framework.
package_managerstringPackage manager.
billing_platformstringDetected billing platform.
livebooleanAlso ask for live-mode keys (live mode activates after domain verification).
stripe_test_key_hintstringA HINT of the Stripe TEST key found in the project ("sk_test_…a1b2" — never the key). The human is asked once whether Checkbox may use it for synthetic test subscriptions.

Returns

Returns a DeviceAuthorization object.

Errors use the standard envelope with a stable code and, where useful, next_action.

curl https://app.checkbox.site/v1/device/authorize \
  -H "Content-Type: application/json" \
  -d '{}'
Response
{
  "object": "device_authorization",
  "device_code": "cbdev_Q2hlY2tib3g…",
  "user_code": "BKRF-QXTP",
  "verification_uri": "https://app.checkbox.site/device",
  "verification_uri_complete": "https://app.checkbox.site/device?code=BKRF-QXTP",
  "expires_in": 900,
  "interval": 5,
  "next_action": {
    "type": "install_snippet",
    "message": "Add <script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\"></script> to the <head> of every page, then report snippet_installed_in.",
    "operation_id": "updateSetupSession",
    "mcp_tool": "update_setup",
    "command": "checkbox init --verify --json",
    "url": "https://dashboard.stripe.com/test/apikeys/create"
  }
}

Poll a device login for its keys

POST /v1/device/token

Public (no API key). Poll every interval seconds with the device_code. Errors (stable codes): authorization_pending (keep polling), slow_down (add 5 s), access_denied (the human clicked Deny: stop), expired_token (start again). On approval returns the keys exactly once, the setup session and the next action.

No API key (public) · Operation createDeviceToken

SDK: checkbox.device.token() (Node) · checkbox.device.token() (Python). MCP / agents: operation createDeviceToken.

Body

FieldTypeDescription
device_code requiredstringThe device_code from createDeviceAuthorization.

Returns

Returns a DeviceToken object.

Errors use the standard envelope with a stable code and, where useful, next_action.

curl https://app.checkbox.site/v1/device/token \
  -H "Content-Type: application/json" \
  -d '{
  "device_code": "cbdev_Q2hlY2tib3g…"
}'
Response
{
  "object": "device_token",
  "token_type": "bearer",
  "secret_key": "ck_test_51Hx…",
  "publishable_key": "pk_test_51Hx…",
  "live_secret_key": null,
  "live_publishable_key": null,
  "account": {
    "id": "acct_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
    "name": "acme.com",
    "email": "founder@acme.com"
  },
  "setup_session": "setup_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "site": "site_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "consents": {
    "stripe_test_key": true,
    "live_keys": false
  },
  "next_action": {
    "type": "install_snippet",
    "message": "Add <script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\"></script> to the <head> of every page, then report snippet_installed_in.",
    "operation_id": "updateSetupSession",
    "mcp_tool": "update_setup",
    "command": "checkbox init --verify --json",
    "url": "https://dashboard.stripe.com/test/apikeys/create"
  }
}

List setup sessions

GET /v1/setup_sessions

Setup sessions of the account, newest first. Test keys see the sessions created in test mode (device login, test keys); live keys see all.

Scope setup_sessions:read · Operation listSetupSessions

SDK: checkbox.setupSessions.list() (Node) · checkbox.setup_sessions.list() (Python). MCP / agents: operation listSetupSessions.

Parameters

ParameterInTypeDescription
limitqueryintegerNumber of objects to return, 1-100 (default 10).
starting_afterquerystringCursor: an object id; returns the objects after it (older).
ending_beforequerystringCursor: an object id; returns the objects before it (newer).

Returns

Returns a list ({ object: "list", data, has_more, url }) of SetupSession objects.

Errors use the standard envelope with a stable code and, where useful, next_action.

curl -G https://app.checkbox.site/v1/setup_sessions \
  -u "$CHECKBOX_SECRET_KEY:" \
  -d limit=3
Response
{
  "object": "list",
  "data": [
    {
      "id": "setup_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
      "object": "setup_session",
      "livemode": false,
      "status": "open",
      "created": 1793318400,
      "updated": 1793318400,
      "account": "acct_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
      "site": "site_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
      "live_site": "site_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
      "client": {
        "name": "checkbox-cli",
        "version": "0.1.0",
        "agent": "Claude Code"
      },
      "project": {
        "framework": "nextjs-app",
        "layout_file": "app/layout.tsx"
      },
      "business": {
        "site_url": "https://acme.com",
        "checkout_url": "https://acme.com/pricing",
        "account_url": null,
        "terms_url": "https://acme.com/terms",
        "privacy_url": "https://acme.com/privacy",
        "refund_url": null,
        "cancellation_url": null,
        "support_email": "support@acme.com",
        "merchant_name": "Acme",
        "billing_platform": "stripe",
        "plans": []
      },
      "discovered": {
        "terms_url": "https://acme.com/terms"
      },
      "install": {
        "script_tag": "<script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\" data-api=\"https://app.checkbox.site\"></script>",
        "snippet_key": "k3y9",
        "publishable_key": "pk_test_3f9a…",
        "inbound_email": "k3y9@in.checkbox.site",
        "installed_in": "app/layout.tsx",
        "detected_on_site": false
      },
      "policies": [],
      "stripe": {
        "test_key_consent": true,
        "test_key_hint": "sk_test_…a1b2",
        "test_credential_stored": false,
        "checkout_configs": 1,
        "restricted_key": {
          "recommended": true,
          "reason": "Give Checkbox a restricted test key with only these permissions.",
          "create_url": "https://dashboard.stripe.com/test/apikeys/create",
          "permissions": [
            {
              "resource": "Test clocks",
              "access": "write"
            }
          ]
        }
      },
      "test_run": {
        "id": "run_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
        "status": "running",
        "created": 1793318400
      },
      "compliance": {
        "score": 72,
        "insurable": false,
        "evaluated": 1793318400,
        "failing": 3,
        "needs_review": 2,
        "top_findings": []
      },
      "steps": [],
      "next_action": {
        "type": "install_snippet",
        "message": "Add <script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\"></script> to the <head> of every page, then report snippet_installed_in.",
        "operation_id": "updateSetupSession",
        "mcp_tool": "update_setup",
        "command": "checkbox init --verify --json",
        "url": "https://dashboard.stripe.com/test/apikeys/create"
      },
      "owner_notified": false,
      "owner_email": "sent",
      "review_url": "https://app.checkbox.site/setup/3f9a1c2e-7b4d-4e0f-9a8b-7c6d5e4f3a2b"
    }
  ],
  "has_more": false,
  "url": "/v1/sites"
}

Start a setup session (agents that already have a key)

POST /v1/setup_sessions

For agents that already hold a secret key (no device login): starts a setup session for a project with the same fields as updateSetupSession. checkbox init creates the session during the device login instead.

Scope setup_sessions:write · Idempotent (send Idempotency-Key) · Operation createSetupSession

SDK: checkbox.setupSessions.create() (Node) · checkbox.setup_sessions.create() (Python). MCP / agents: operation createSetupSession.

Body

FieldTypeDescription
site_urlstringPublic URL of the site (production, or a preview deployment).
checkout_urlstringPage where customers subscribe (pricing page or checkout).
account_urlstringAccount page where subscribers manage / cancel.
terms_urlstringTerms of service page. Checkbox fetches and checks it.
privacy_urlstringPrivacy policy page.
refund_urlstringRefund policy page.
cancellation_urlstringCancellation policy page (if separate from the Terms).
support_emailstringSupport address subscribers can write to.
merchant_namestringThe brand subscribers know (it names the seller in generated disclosures and emails). Default: the site's host name, which the plan asks you to replace.
billing_platformenumBilling platform. One of stripe, shopify, recharge, chargebee, recurly, paddle, woocommerce, custom.
plansarray of SetupPlansPlans and prices (sets the free-trial and term facts the law depends on).
projectobjectFacts about the builder's codebase.
project.namestringProject name (package.json name).
project.frameworkstringDetected framework: nextjs-app, nextjs-pages, remix, sveltekit, nuxt, astro, express, html, shopify-theme…
project.package_managerstringnpm, pnpm, yarn or bun.
project.rootstringProject root (display only).
project.layout_filestringRoot layout / template where the snippet belongs.
project.env_filestringFile the keys were written to.
project.public_dirstringStatic files directory (for /.well-known).
project.checkout_codearray of SetupCodeRefsWhere checkout sessions / payment links are created.
project.pay_buttonsarray of SetupCodeRefsWhere the subscribe / pay buttons are rendered.
snippet_installed_instringFile the snippet tag was added to.
env_writtenstringFile the API keys were written to (never committed).
live_sitestringLive-mode site (site_…) you created with the live key, so the checklist tracks its domain verification.
clientSetupClientWho is setting up Checkbox.
refetch_policiesbooleanFetch the policy pages again even when their URLs did not change (after editing them).

Returns

Returns a SetupSession object.

Errors use the standard envelope with a stable code and, where useful, next_action.

curl https://app.checkbox.site/v1/setup_sessions \
  -u "$CHECKBOX_SECRET_KEY:" \
  -H "Content-Type: application/json" \
  -d '{
  "site_url": "https://acme.com"
}'
Response
{
  "id": "setup_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "object": "setup_session",
  "livemode": false,
  "status": "open",
  "created": 1793318400,
  "updated": 1793318400,
  "account": "acct_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "site": "site_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "live_site": "site_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "client": {
    "name": "checkbox-cli",
    "version": "0.1.0",
    "agent": "Claude Code"
  },
  "project": {
    "framework": "nextjs-app",
    "layout_file": "app/layout.tsx"
  },
  "business": {
    "site_url": "https://acme.com",
    "checkout_url": "https://acme.com/pricing",
    "account_url": null,
    "terms_url": "https://acme.com/terms",
    "privacy_url": "https://acme.com/privacy",
    "refund_url": null,
    "cancellation_url": null,
    "support_email": "support@acme.com",
    "merchant_name": "Acme",
    "billing_platform": "stripe",
    "plans": []
  },
  "discovered": {
    "terms_url": "https://acme.com/terms"
  },
  "install": {
    "script_tag": "<script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\" data-api=\"https://app.checkbox.site\"></script>",
    "snippet_key": "k3y9",
    "publishable_key": "pk_test_3f9a…",
    "inbound_email": "k3y9@in.checkbox.site",
    "installed_in": "app/layout.tsx",
    "detected_on_site": false
  },
  "policies": [],
  "stripe": {
    "test_key_consent": true,
    "test_key_hint": "sk_test_…a1b2",
    "test_credential_stored": false,
    "checkout_configs": 1,
    "restricted_key": {
      "recommended": true,
      "reason": "Give Checkbox a restricted test key with only these permissions.",
      "create_url": "https://dashboard.stripe.com/test/apikeys/create",
      "permissions": [
        {
          "resource": "Test clocks",
          "access": "write"
        }
      ]
    }
  },
  "test_run": {
    "id": "run_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
    "status": "running",
    "created": 1793318400
  },
  "compliance": {
    "score": 72,
    "insurable": false,
    "evaluated": 1793318400,
    "failing": 3,
    "needs_review": 2,
    "top_findings": []
  },
  "steps": [],
  "next_action": {
    "type": "install_snippet",
    "message": "Add <script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\"></script> to the <head> of every page, then report snippet_installed_in.",
    "operation_id": "updateSetupSession",
    "mcp_tool": "update_setup",
    "command": "checkbox init --verify --json",
    "url": "https://dashboard.stripe.com/test/apikeys/create"
  },
  "owner_notified": false,
  "owner_email": "sent",
  "review_url": "https://app.checkbox.site/setup/3f9a1c2e-7b4d-4e0f-9a8b-7c6d5e4f3a2b"
}

Retrieve a setup session

GET /v1/setup_sessions/{setup_session}

The setup checklist with one next_action. Agents: do next_action, then call verifySetupSession; stop when next_action.type is "done".

Scope setup_sessions:read · Operation retrieveSetupSession

SDK: checkbox.setupSessions.retrieve() (Node) · checkbox.setup_sessions.retrieve() (Python). MCP / agents: operation retrieveSetupSession.

Parameters

ParameterInTypeDescription
setup_session requiredpathstringUnique identifier of the setup session (setup_…).

Returns

Returns a SetupSession object.

Errors use the standard envelope with a stable code and, where useful, next_action.

curl https://app.checkbox.site/v1/setup_sessions/setup_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b \
  -u "$CHECKBOX_SECRET_KEY:"
Response
{
  "id": "setup_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "object": "setup_session",
  "livemode": false,
  "status": "open",
  "created": 1793318400,
  "updated": 1793318400,
  "account": "acct_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "site": "site_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "live_site": "site_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "client": {
    "name": "checkbox-cli",
    "version": "0.1.0",
    "agent": "Claude Code"
  },
  "project": {
    "framework": "nextjs-app",
    "layout_file": "app/layout.tsx"
  },
  "business": {
    "site_url": "https://acme.com",
    "checkout_url": "https://acme.com/pricing",
    "account_url": null,
    "terms_url": "https://acme.com/terms",
    "privacy_url": "https://acme.com/privacy",
    "refund_url": null,
    "cancellation_url": null,
    "support_email": "support@acme.com",
    "merchant_name": "Acme",
    "billing_platform": "stripe",
    "plans": []
  },
  "discovered": {
    "terms_url": "https://acme.com/terms"
  },
  "install": {
    "script_tag": "<script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\" data-api=\"https://app.checkbox.site\"></script>",
    "snippet_key": "k3y9",
    "publishable_key": "pk_test_3f9a…",
    "inbound_email": "k3y9@in.checkbox.site",
    "installed_in": "app/layout.tsx",
    "detected_on_site": false
  },
  "policies": [],
  "stripe": {
    "test_key_consent": true,
    "test_key_hint": "sk_test_…a1b2",
    "test_credential_stored": false,
    "checkout_configs": 1,
    "restricted_key": {
      "recommended": true,
      "reason": "Give Checkbox a restricted test key with only these permissions.",
      "create_url": "https://dashboard.stripe.com/test/apikeys/create",
      "permissions": [
        {
          "resource": "Test clocks",
          "access": "write"
        }
      ]
    }
  },
  "test_run": {
    "id": "run_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
    "status": "running",
    "created": 1793318400
  },
  "compliance": {
    "score": 72,
    "insurable": false,
    "evaluated": 1793318400,
    "failing": 3,
    "needs_review": 2,
    "top_findings": []
  },
  "steps": [],
  "next_action": {
    "type": "install_snippet",
    "message": "Add <script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\"></script> to the <head> of every page, then report snippet_installed_in.",
    "operation_id": "updateSetupSession",
    "mcp_tool": "update_setup",
    "command": "checkbox init --verify --json",
    "url": "https://dashboard.stripe.com/test/apikeys/create"
  },
  "owner_notified": false,
  "owner_email": "sent",
  "review_url": "https://app.checkbox.site/setup/3f9a1c2e-7b4d-4e0f-9a8b-7c6d5e4f3a2b"
}

Report what the agent learned or changed

POST /v1/setup_sessions/{setup_session}

Reports project facts and business URLs: site_url (creates the test-mode site), checkout_url, terms_url / refund_url / cancellation_url / privacy_url (fetched now, stored as evidence and checked against the law), plans, where checkout code lives, snippet_installed_in, env_written. Returns the updated checklist.

Scope setup_sessions:write · Idempotent (send Idempotency-Key) · Operation updateSetupSession

SDK: checkbox.setupSessions.update() (Node) · checkbox.setup_sessions.update() (Python). MCP / agents: operation updateSetupSession.

Parameters

ParameterInTypeDescription
setup_session requiredpathstringUnique identifier of the setup session (setup_…).

Body

FieldTypeDescription
site_urlstringPublic URL of the site (production, or a preview deployment).
checkout_urlstringPage where customers subscribe (pricing page or checkout).
account_urlstringAccount page where subscribers manage / cancel.
terms_urlstringTerms of service page. Checkbox fetches and checks it.
privacy_urlstringPrivacy policy page.
refund_urlstringRefund policy page.
cancellation_urlstringCancellation policy page (if separate from the Terms).
support_emailstringSupport address subscribers can write to.
merchant_namestringThe brand subscribers know (it names the seller in generated disclosures and emails). Default: the site's host name, which the plan asks you to replace.
billing_platformenumBilling platform. One of stripe, shopify, recharge, chargebee, recurly, paddle, woocommerce, custom.
plansarray of SetupPlansPlans and prices (sets the free-trial and term facts the law depends on).
projectobjectFacts about the builder's codebase.
project.namestringProject name (package.json name).
project.frameworkstringDetected framework: nextjs-app, nextjs-pages, remix, sveltekit, nuxt, astro, express, html, shopify-theme…
project.package_managerstringnpm, pnpm, yarn or bun.
project.rootstringProject root (display only).
project.layout_filestringRoot layout / template where the snippet belongs.
project.env_filestringFile the keys were written to.
project.public_dirstringStatic files directory (for /.well-known).
project.checkout_codearray of SetupCodeRefsWhere checkout sessions / payment links are created.
project.pay_buttonsarray of SetupCodeRefsWhere the subscribe / pay buttons are rendered.
snippet_installed_instringFile the snippet tag was added to.
env_writtenstringFile the API keys were written to (never committed).
live_sitestringLive-mode site (site_…) you created with the live key, so the checklist tracks its domain verification.
clientSetupClientWho is setting up Checkbox.
refetch_policiesbooleanFetch the policy pages again even when their URLs did not change (after editing them).

Returns

Returns a SetupSession object.

Errors use the standard envelope with a stable code and, where useful, next_action.

curl https://app.checkbox.site/v1/setup_sessions/setup_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b \
  -u "$CHECKBOX_SECRET_KEY:" \
  -H "Content-Type: application/json" \
  -d '{
  "site_url": "https://acme.com"
}'
Response
{
  "id": "setup_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "object": "setup_session",
  "livemode": false,
  "status": "open",
  "created": 1793318400,
  "updated": 1793318400,
  "account": "acct_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "site": "site_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "live_site": "site_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "client": {
    "name": "checkbox-cli",
    "version": "0.1.0",
    "agent": "Claude Code"
  },
  "project": {
    "framework": "nextjs-app",
    "layout_file": "app/layout.tsx"
  },
  "business": {
    "site_url": "https://acme.com",
    "checkout_url": "https://acme.com/pricing",
    "account_url": null,
    "terms_url": "https://acme.com/terms",
    "privacy_url": "https://acme.com/privacy",
    "refund_url": null,
    "cancellation_url": null,
    "support_email": "support@acme.com",
    "merchant_name": "Acme",
    "billing_platform": "stripe",
    "plans": []
  },
  "discovered": {
    "terms_url": "https://acme.com/terms"
  },
  "install": {
    "script_tag": "<script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\" data-api=\"https://app.checkbox.site\"></script>",
    "snippet_key": "k3y9",
    "publishable_key": "pk_test_3f9a…",
    "inbound_email": "k3y9@in.checkbox.site",
    "installed_in": "app/layout.tsx",
    "detected_on_site": false
  },
  "policies": [],
  "stripe": {
    "test_key_consent": true,
    "test_key_hint": "sk_test_…a1b2",
    "test_credential_stored": false,
    "checkout_configs": 1,
    "restricted_key": {
      "recommended": true,
      "reason": "Give Checkbox a restricted test key with only these permissions.",
      "create_url": "https://dashboard.stripe.com/test/apikeys/create",
      "permissions": [
        {
          "resource": "Test clocks",
          "access": "write"
        }
      ]
    }
  },
  "test_run": {
    "id": "run_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
    "status": "running",
    "created": 1793318400
  },
  "compliance": {
    "score": 72,
    "insurable": false,
    "evaluated": 1793318400,
    "failing": 3,
    "needs_review": 2,
    "top_findings": []
  },
  "steps": [],
  "next_action": {
    "type": "install_snippet",
    "message": "Add <script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\"></script> to the <head> of every page, then report snippet_installed_in.",
    "operation_id": "updateSetupSession",
    "mcp_tool": "update_setup",
    "command": "checkbox init --verify --json",
    "url": "https://dashboard.stripe.com/test/apikeys/create"
  },
  "owner_notified": false,
  "owner_email": "sent",
  "review_url": "https://app.checkbox.site/setup/3f9a1c2e-7b4d-4e0f-9a8b-7c6d5e4f3a2b"
}

Re-check the site now

POST /v1/setup_sessions/{setup_session}/verify

Loads the site (is the snippet live? which policy links does it have?), re-fetches the Terms and policies, re-evaluates compliance and queues the first synthetic-shopper scan. Call it after every change the agent made (and after deploying). Returns what was seen plus the updated session.

Scope setup_sessions:write · Idempotent (send Idempotency-Key) · Operation verifySetupSession

SDK: checkbox.setupSessions.verify() (Node) · checkbox.setup_sessions.verify() (Python). MCP / agents: operation verifySetupSession.

Parameters

ParameterInTypeDescription
setup_session requiredpathstringUnique identifier of the setup session (setup_…).

Returns

Returns a SetupVerification object.

Errors use the standard envelope with a stable code and, where useful, next_action.

curl https://app.checkbox.site/v1/setup_sessions/setup_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b/verify \
  -u "$CHECKBOX_SECRET_KEY:" \
  -X POST
Response
{
  "object": "setup_verification",
  "homepage": {
    "ok": true,
    "snippet_detected": true,
    "error": null
  },
  "policies": [],
  "scan": {
    "queued": true,
    "scan": "scan_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
    "reason": null
  },
  "evaluated": true,
  "setup_session": {
    "id": "setup_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
    "object": "setup_session",
    "livemode": false,
    "status": "open",
    "created": 1793318400,
    "updated": 1793318400,
    "account": "acct_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
    "site": "site_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
    "live_site": "site_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
    "client": {
      "name": "checkbox-cli",
      "version": "0.1.0",
      "agent": "Claude Code"
    },
    "project": {
      "framework": "nextjs-app",
      "layout_file": "app/layout.tsx"
    },
    "business": {
      "site_url": "https://acme.com",
      "checkout_url": "https://acme.com/pricing",
      "account_url": null,
      "terms_url": "https://acme.com/terms",
      "privacy_url": "https://acme.com/privacy",
      "refund_url": null,
      "cancellation_url": null,
      "support_email": "support@acme.com",
      "merchant_name": "Acme",
      "billing_platform": "stripe",
      "plans": []
    },
    "discovered": {
      "terms_url": "https://acme.com/terms"
    },
    "install": {
      "script_tag": "<script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\" data-api=\"https://app.checkbox.site\"></script>",
      "snippet_key": "k3y9",
      "publishable_key": "pk_test_3f9a…",
      "inbound_email": "k3y9@in.checkbox.site",
      "installed_in": "app/layout.tsx",
      "detected_on_site": false
    },
    "policies": [],
    "stripe": {
      "test_key_consent": true,
      "test_key_hint": "sk_test_…a1b2",
      "test_credential_stored": false,
      "checkout_configs": 1,
      "restricted_key": {
        "recommended": true,
        "reason": "Give Checkbox a restricted test key with only these permissions.",
        "create_url": "https://dashboard.stripe.com/test/apikeys/create",
        "permissions": [
          {
            "resource": "Test clocks",
            "access": "write"
          }
        ]
      }
    },
    "test_run": {
      "id": "run_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
      "status": "running",
      "created": 1793318400
    },
    "compliance": {
      "score": 72,
      "insurable": false,
      "evaluated": 1793318400,
      "failing": 3,
      "needs_review": 2,
      "top_findings": []
    },
    "steps": [],
    "next_action": {
      "type": "install_snippet",
      "message": "Add <script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\"></script> to the <head> of every page, then report snippet_installed_in.",
      "operation_id": "updateSetupSession",
      "mcp_tool": "update_setup",
      "command": "checkbox init --verify --json",
      "url": "https://dashboard.stripe.com/test/apikeys/create"
    },
    "owner_notified": false,
    "owner_email": "sent",
    "review_url": "https://app.checkbox.site/setup/3f9a1c2e-7b4d-4e0f-9a8b-7c6d5e4f3a2b"
  }
}

Finish the setup and notify the human

POST /v1/setup_sessions/{setup_session}/complete

Marks the setup finished and emails the person who approved it a summary ("<agent> set up Checkbox for <domain>") with what was created, what is still open and a review link. Idempotent: the email is sent once. Checks keep running afterwards.

Scope setup_sessions:write · Idempotent (send Idempotency-Key) · Operation completeSetupSession

SDK: checkbox.setupSessions.complete() (Node) · checkbox.setup_sessions.complete() (Python). MCP / agents: operation completeSetupSession.

Parameters

ParameterInTypeDescription
setup_session requiredpathstringUnique identifier of the setup session (setup_…).

Returns

Returns a SetupSession object.

Errors use the standard envelope with a stable code and, where useful, next_action.

curl https://app.checkbox.site/v1/setup_sessions/setup_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b/complete \
  -u "$CHECKBOX_SECRET_KEY:" \
  -X POST
Response
{
  "id": "setup_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "object": "setup_session",
  "livemode": false,
  "status": "open",
  "created": 1793318400,
  "updated": 1793318400,
  "account": "acct_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "site": "site_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "live_site": "site_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
  "client": {
    "name": "checkbox-cli",
    "version": "0.1.0",
    "agent": "Claude Code"
  },
  "project": {
    "framework": "nextjs-app",
    "layout_file": "app/layout.tsx"
  },
  "business": {
    "site_url": "https://acme.com",
    "checkout_url": "https://acme.com/pricing",
    "account_url": null,
    "terms_url": "https://acme.com/terms",
    "privacy_url": "https://acme.com/privacy",
    "refund_url": null,
    "cancellation_url": null,
    "support_email": "support@acme.com",
    "merchant_name": "Acme",
    "billing_platform": "stripe",
    "plans": []
  },
  "discovered": {
    "terms_url": "https://acme.com/terms"
  },
  "install": {
    "script_tag": "<script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\" data-api=\"https://app.checkbox.site\"></script>",
    "snippet_key": "k3y9",
    "publishable_key": "pk_test_3f9a…",
    "inbound_email": "k3y9@in.checkbox.site",
    "installed_in": "app/layout.tsx",
    "detected_on_site": false
  },
  "policies": [],
  "stripe": {
    "test_key_consent": true,
    "test_key_hint": "sk_test_…a1b2",
    "test_credential_stored": false,
    "checkout_configs": 1,
    "restricted_key": {
      "recommended": true,
      "reason": "Give Checkbox a restricted test key with only these permissions.",
      "create_url": "https://dashboard.stripe.com/test/apikeys/create",
      "permissions": [
        {
          "resource": "Test clocks",
          "access": "write"
        }
      ]
    }
  },
  "test_run": {
    "id": "run_3f9a1c2e7b4d4e0f9a8b7c6d5e4f3a2b",
    "status": "running",
    "created": 1793318400
  },
  "compliance": {
    "score": 72,
    "insurable": false,
    "evaluated": 1793318400,
    "failing": 3,
    "needs_review": 2,
    "top_findings": []
  },
  "steps": [],
  "next_action": {
    "type": "install_snippet",
    "message": "Add <script async src=\"https://app.checkbox.site/s.js\" data-key=\"k3y9\"></script> to the <head> of every page, then report snippet_installed_in.",
    "operation_id": "updateSetupSession",
    "mcp_tool": "update_setup",
    "command": "checkbox init --verify --json",
    "url": "https://dashboard.stripe.com/test/apikeys/create"
  },
  "owner_notified": false,
  "owner_email": "sent",
  "review_url": "https://app.checkbox.site/setup/3f9a1c2e-7b4d-4e0f-9a8b-7c6d5e4f3a2b"
}

Checkbox is compliance software, not a law firm; nothing in these docs is legal advice (details). For AI agents: every page is available as Markdown at the same URL plus .md; the index is /llms.txt.