Each API key carries a set of scopes, and every endpoint requires one. Grant the minimum a key needs — a key missing a required scope gets 403 insufficient_scope.
A scope is a single permission. You tick scopes when you create a key under Settings → API → API Keys, and you can edit them afterwards without issuing a new key.Every endpoint states the scope it needs, both in its description and in the x-required-scopes field of the OpenAPI document. Grant exactly those and no more.
The full catalogue
Messaging
Templates & broadcasts
Code & flows
Tables
Media
Webhooks & events
Scope
Lets a key
messages:send
Send WhatsApp session and template messages.
conversations:read
List conversations and read their messages and delivery status.
conversations:write
Change a conversation’s state — handover, unstructured, awaiting_form, done, or any state your own bot uses — and archive or unarchive a contact’s chat.
contacts:read
Read contact records.
contacts:write
Update a contact’s name, tags, and custom attributes.
Scope
Lets a key
templates:read
List message templates and their approval status.
templates:manage
Create and delete WhatsApp message templates.
broadcasts:read
View broadcast campaigns and their status.
broadcasts:manage
Create and assemble broadcast campaigns, and define the segments they target. It never sends one — every campaign is held for human approval.
Scope
Lets a key
code:read
List and read the project bot code files.
code:write
Edit project code files and deploy dev → production.
flows:read
List WhatsApp Flows and read a flow’s JSON definition.
flows:write
Generate and update WhatsApp Flows (routed through the flows agent).
Scope
Lets a key
tables:read
List your project’s own tables and read their columns and rows.
tables:write
Insert, update, and delete rows in your project’s own tables.
Scope
Lets a key
media:read
List the project’s media assets and mint short-lived signed URLs for their bytes.
media:write
Upload new media assets and delete existing ones.
Scope
Lets a key
webhooks:manage
Register and manage outbound webhook subscriptions.
events:message_received
Deliver a webhook when an inbound message arrives.
events:message_status
Deliver a webhook when a message delivery status changes.
events:template_status
Deliver a webhook when a template approval status changes.
That’s 21 scopes in total.
media:read doesn’t reach your customers’ files. Media a customer sent in over WhatsApp is returned only when a key holds conversations:read as well and explicitly asks for it. A media-only key sees the project’s own uploads and nothing else. See Storage.
The table scopes reach your tables only. Paige’s own platform tables — contacts, conversations, messages, execution logs, and broadcast recipients — are not addressable through /v1/tables, whatever scopes the key holds. Read those through their own endpoints instead, where the rules that protect them still apply. A write must also always carry a filter, so there is no way to accidentally update or delete a whole table in one call.
broadcasts:manage is not a licence to send.POST /v1/broadcasts always lands the campaign in pending_approval, whatever scopes the credential holds. There is no send, launch, approve, or retry endpoint — a human releases the campaign from the Broadcasts tab in the dashboard. Don’t design a flow that expects the API to send; it never will. See Broadcasts.
When a scope is missing
A valid key calling an endpoint it isn’t scoped for gets:
with HTTP 403. Fix it by editing the key’s scopes in Settings → API — you don’t need a new key.
GET /v1/ping echoes back the scopes the credential actually holds. When a call 403s unexpectedly, ping first and compare against the endpoint’s x-required-scopes before changing anything else.
Two things that catch people out
webhooks:manage isn’t enough on its own. Registering a webhook always needs webhooks:manage, but subscribing to a platform event also needs that event’s own events:* scope. Asking for message.received without events:message_received fails with 403 insufficient_scope at registration time, not at delivery time. Custom events your own bot emits need only webhooks:manage. See Webhooks.Scopes don’t pool across projects. If an AI agent is connected to several projects at once, each project carries its own grant. Being allowed to edit code in one project never implies it in another — the check runs against the selected project only.
Picking scopes for a job
If you’re building…
Grant
Order notifications out of your own system
messages:send, plus templates:read if you look templates up
A shared inbox or CRM sync
conversations:read, contacts:read, contacts:write
A marketing campaign tool (a human still approves each send)
A catalogue sync that uploads images and documents the bot sends
media:read, media:write
An event consumer
webhooks:manage plus each events:* you subscribe to
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"paige","description":"Build AI-powered WhatsApp bots with interactive flows, automated conversations, and a built-in database — no backend required.","colors":{"primary":"#81D741","light":"#cfeabb","dark":"#81D741"},"logo":{"light":"https://mintcdn.com/greenpages/SGZewfX5ti1H1LmZ/logo/green-pages-logo.png?fit=max\u0026auto=format\u0026n=SGZewfX5ti1H1LmZ\u0026q=85\u0026s=9b5fbf18d11676f6513a94ed3366cb7f","dark":"https://mintcdn.com/greenpages/SGZewfX5ti1H1LmZ/logo/green-pages-logo.png?fit=max\u0026auto=format\u0026n=SGZewfX5ti1H1LmZ\u0026q=85\u0026s=9b5fbf18d11676f6513a94ed3366cb7f"},"favicon":"https://mintcdn.com/greenpages/ns32KHaAM2ByMLCm/favicon.ico?fit=max\u0026auto=format\u0026n=ns32KHaAM2ByMLCm\u0026q=85\u0026s=10f80cc37fcecd5ef561ba85c6bca8d6","api":{"params":{"expanded":"all"},"playground":{"display":"simple"},"examples":{"languages":["curl","javascript","python"]}},"navbar":{"links":[],"primary":{"type":"button","label":"Start Building","href":"https://paigeme.dev"}},"footer":{"socials":{}},"fonts":{"family":"Geist"},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","latex":true},"contextual":{"options":["copy","view","assistant","download-spec"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"greenpages","hasAudioNarration":false,"actualSubdomain":"greenpages","customDomains":["howto.paigeme.dev"],"gitSource":{"type":"github","owner":"brendangp","repo":"paige-docs","deployBranch":"main","isPrivate":false,"contentDirectory":"","mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b007c142f71afcbab8c3194","clientVersion":"0.0.4286","searchFilterCounts":[{"language":"default","tag":"API","count":57},{"language":"default","tag":"Endpoints","count":49},{"language":"default","tag":"Features","count":42},{"language":"default","tag":"Settings","count":12},{"language":"default","tag":"Learn","count":10},{"language":"default","tag":"Build","count":10},{"language":"default","tag":"Introduction","count":9},{"language":"default","tag":"Getting started","count":8},{"language":"default","tag":"Broadcasts","count":8},{"language":"default","tag":"Tools","count":8}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--default-border-color: var(--gray-200)}.dark{--default-border-color: var(--gray-800)}#navbar a[href=\"/\"]:has(img.nav-logo){display:inline-flex!important;align-items:center}#navbar a[href=\"/\"]:has(img.nav-logo)::after{content:'paige';font-family:'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;color:#81D741;font-weight:500;font-size:1rem;letter-spacing:-0.01em;margin-left:0.5rem}#sidebar .nav-dropdown-trigger{border:none!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding-left:0.375rem}#sidebar .nav-dropdown-trigger:hover{background-color:rgb(0 0 0 / 0.04)!important}.dark #sidebar .nav-dropdown-trigger:hover{background-color:rgb(255 255 255 / 0.06)!important}#sidebar .nav-dropdown-trigger .nav-dropdown-item-icon{border:none!important;border-radius:0!important;background:transparent!important;height:auto!important;width:auto!important;padding:0!important}.nav-dropdown-content{border-radius:0!important}.nav-dropdown-content .nav-dropdown-item{border-radius:0!important}.nav-dropdown-content .nav-dropdown-item-icon{border:none!important;border-radius:0!important;background:transparent!important;height:auto!important;width:auto!important;padding:0!important}.nav-dropdown-content .nav-dropdown-item-description{display:none!important}#sidebar .nav-anchor span{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;font-size:12px;font-weight:500;letter-spacing:-0.02em;text-transform:uppercase}"}]}
{"page":{"pagePath":"api-reference/scopes","slug":"/api-reference/scopes","pageMetadata":{"title":"Scopes","description":"Each API key carries a set of scopes, and every endpoint requires one. Grant the minimum a key needs — a key missing a required scope gets 403 insufficient_scope.","href":"/api-reference/scopes"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Each API key carries a set of scopes, and every endpoint requires one. Grant the minimum a key needs — a key missing a required scope gets 403 insufficient_scope.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Tab,Table,Tabs,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`A scope is a single permission. You tick scopes when you create a key under `,_jsx(_components.strong,{children:`Settings → API → API Keys`}),`, and you can edit them afterwards without issuing a new key.`]}),`\n`,_jsxs(_components.p,{children:[`Every endpoint states the scope it needs, both in its description and in the `,_jsx(_components.code,{children:`x-required-scopes`}),` field of the `,_jsx(_components.a,{href:`https://api.paigeme.dev/v1/openapi.json`,children:`OpenAPI document`}),`. Grant exactly those and no more.`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-full-catalogue`,children:`The full catalogue`}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Messaging`,id:`messaging`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Scope`}),_jsx(_components.th,{children:`Lets a key`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`messages:send`})}),_jsx(_components.td,{children:`Send WhatsApp session and template messages.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`conversations:read`})}),_jsx(_components.td,{children:`List conversations and read their messages and delivery status.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`conversations:write`})}),_jsxs(_components.td,{children:[`Change a conversation’s state — `,_jsx(_components.code,{children:`handover`}),`, `,_jsx(_components.code,{children:`unstructured`}),`, `,_jsx(_components.code,{children:`awaiting_form`}),`, `,_jsx(_components.code,{children:`done`}),`, or any state your own bot uses — and archive or unarchive a contact’s chat.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`contacts:read`})}),_jsx(_components.td,{children:`Read contact records.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`contacts:write`})}),_jsx(_components.td,{children:`Update a contact’s name, tags, and custom attributes.`})]})]})]})}),_jsx(Tab,{title:`Templates \u0026 broadcasts`,id:`templates-%26-broadcasts`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Scope`}),_jsx(_components.th,{children:`Lets a key`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`templates:read`})}),_jsx(_components.td,{children:`List message templates and their approval status.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`templates:manage`})}),_jsx(_components.td,{children:`Create and delete WhatsApp message templates.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`broadcasts:read`})}),_jsx(_components.td,{children:`View broadcast campaigns and their status.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`broadcasts:manage`})}),_jsxs(_components.td,{children:[`Create and assemble broadcast campaigns, and define the segments they target. `,_jsx(_components.strong,{children:`It never sends one`}),` — every campaign is held for human approval.`]})]})]})]})}),_jsx(Tab,{title:`Code \u0026 flows`,id:`code-%26-flows`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Scope`}),_jsx(_components.th,{children:`Lets a key`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`code:read`})}),_jsx(_components.td,{children:`List and read the project bot code files.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`code:write`})}),_jsx(_components.td,{children:`Edit project code files and deploy dev → production.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`flows:read`})}),_jsx(_components.td,{children:`List WhatsApp Flows and read a flow’s JSON definition.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`flows:write`})}),_jsx(_components.td,{children:`Generate and update WhatsApp Flows (routed through the flows agent).`})]})]})]})}),_jsx(Tab,{title:`Tables`,id:`tables`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Scope`}),_jsx(_components.th,{children:`Lets a key`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tables:read`})}),_jsx(_components.td,{children:`List your project’s own tables and read their columns and rows.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tables:write`})}),_jsx(_components.td,{children:`Insert, update, and delete rows in your project’s own tables.`})]})]})]})}),_jsx(Tab,{title:`Media`,id:`media`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Scope`}),_jsx(_components.th,{children:`Lets a key`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`media:read`})}),_jsx(_components.td,{children:`List the project’s media assets and mint short-lived signed URLs for their bytes.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`media:write`})}),_jsx(_components.td,{children:`Upload new media assets and delete existing ones.`})]})]})]})}),_jsx(Tab,{title:`Webhooks \u0026 events`,id:`webhooks-%26-events`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Scope`}),_jsx(_components.th,{children:`Lets a key`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`webhooks:manage`})}),_jsx(_components.td,{children:`Register and manage outbound webhook subscriptions.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`events:message_received`})}),_jsx(_components.td,{children:`Deliver a webhook when an inbound message arrives.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`events:message_status`})}),_jsx(_components.td,{children:`Deliver a webhook when a message delivery status changes.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`events:template_status`})}),_jsx(_components.td,{children:`Deliver a webhook when a template approval status changes.`})]})]})]})})]}),`\n`,_jsx(_components.p,{children:`That’s 21 scopes in total.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`media:read`}),` doesn’t reach your customers’ files.`]}),` Media a customer sent in over WhatsApp is returned only when a key holds `,_jsx(_components.code,{children:`conversations:read`}),` as well and explicitly asks for it. A media-only key sees the project’s own uploads and nothing else. See `,_jsx(_components.a,{href:`/guides/storage`,children:`Storage`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The table scopes reach your tables only.`}),` Paige’s own platform tables — contacts, conversations, messages, execution logs, and broadcast recipients — are not addressable through `,_jsx(_components.code,{children:`/v1/tables`}),`, whatever scopes the key holds. Read those through their own endpoints instead, where the rules that protect them still apply. A write must also always carry a filter, so there is no way to accidentally update or delete a whole table in one call.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`broadcasts:manage`}),` is not a licence to send.`]}),` `,_jsx(_components.code,{children:`POST /v1/broadcasts`}),` always lands the campaign in `,_jsx(_components.code,{children:`pending_approval`}),`, whatever scopes the credential holds. There is no send, launch, approve, or retry endpoint — a human releases the campaign from the `,_jsx(_components.strong,{children:`Broadcasts`}),` tab in the dashboard. Don’t design a flow that expects the API to send; it never will. See `,_jsx(_components.a,{href:`/guides/broadcasts`,children:`Broadcasts`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`when-a-scope-is-missing`,children:`When a scope is missing`}),`\n`,_jsx(_components.p,{children:`A valid key calling an endpoint it isn’t scoped for gets:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"insufficient_scope\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"…\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"8f1c…\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`with HTTP `,_jsx(_components.strong,{children:`403`}),`. Fix it by editing the key’s scopes in `,_jsx(_components.strong,{children:`Settings → API`}),` — you don’t need a new key.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GET /v1/ping`}),` echoes back the scopes the credential actually holds. When a call 403s unexpectedly, ping first and compare against the endpoint’s `,_jsx(_components.code,{children:`x-required-scopes`}),` before changing anything else.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`two-things-that-catch-people-out`,children:`Two things that catch people out`}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`webhooks:manage`}),` isn’t enough on its own.`]}),` Registering a webhook always needs `,_jsx(_components.code,{children:`webhooks:manage`}),`, but `,_jsx(_components.em,{children:`subscribing to a platform event`}),` also needs that event’s own `,_jsx(_components.code,{children:`events:*`}),` scope. Asking for `,_jsx(_components.code,{children:`message.received`}),` without `,_jsx(_components.code,{children:`events:message_received`}),` fails with `,_jsx(_components.code,{children:`403 insufficient_scope`}),` at registration time, not at delivery time. Custom events your own bot emits need only `,_jsx(_components.code,{children:`webhooks:manage`}),`. See `,_jsx(_components.a,{href:`/api-reference/webhooks`,children:`Webhooks`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Scopes don’t pool across projects.`}),` If an AI agent is connected to several projects at once, each project carries its own grant. Being allowed to edit code in one project never implies it in another — the check runs against the selected project only.`]}),`\n`,_jsx(Heading,{level:`2`,id:`picking-scopes-for-a-job`,children:`Picking scopes for a job`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`If you’re building…`}),_jsx(_components.th,{children:`Grant`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Order notifications out of your own system`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`messages:send`}),`, plus `,_jsx(_components.code,{children:`templates:read`}),` if you look templates up`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`A shared inbox or CRM sync`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`conversations:read`}),`, `,_jsx(_components.code,{children:`contacts:read`}),`, `,_jsx(_components.code,{children:`contacts:write`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`A marketing campaign tool (a human still approves each send)`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`broadcasts:manage`}),`, `,_jsx(_components.code,{children:`broadcasts:read`}),`, `,_jsx(_components.code,{children:`templates:read`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`An AI agent that edits your bot`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`code:read`}),`, `,_jsx(_components.code,{children:`code:write`}),`, `,_jsx(_components.code,{children:`flows:read`}),`, `,_jsx(_components.code,{children:`flows:write`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`A catalogue sync that uploads images and documents the bot sends`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`media:read`}),`, `,_jsx(_components.code,{children:`media:write`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`An event consumer`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`webhooks:manage`}),` plus each `,_jsx(_components.code,{children:`events:*`}),` you subscribe to`]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Scopes","description":"Each API key carries a set of scopes, and every endpoint requires one. Grant the minimum a key needs — a key missing a required scope gets 403 insufficient_scope.","href":"/api-reference/scopes"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"The full catalogue","slug":"the-full-catalogue","depth":2,"children":[]},{"title":"When a scope is missing","slug":"when-a-scope-is-missing","depth":2,"children":[]},{"title":"Two things that catch people out","slug":"two-things-that-catch-people-out","depth":2,"children":[]},{"title":"Picking scopes for a job","slug":"picking-scopes-for-a-job","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"greenpages","siteName":"paige","title":"Scopes - paige","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-20T16:58:09.534Z","originalFileLocation":"api-reference/scopes.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Each API key carries a set of scopes, and every endpoint requires one. Grant the minimum a key needs — a key missing a required scope gets 403 insufficient_scope.\">\u003cmeta data-mint-head name=\"application-name\" content=\"paige\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/greenpages/x5PgeW5NAYRfgbaO/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/greenpages/x5PgeW5NAYRfgbaO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/greenpages/x5PgeW5NAYRfgbaO/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/greenpages/x5PgeW5NAYRfgbaO/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/greenpages/x5PgeW5NAYRfgbaO/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/greenpages/x5PgeW5NAYRfgbaO/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/greenpages/x5PgeW5NAYRfgbaO/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/greenpages/x5PgeW5NAYRfgbaO/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/greenpages/x5PgeW5NAYRfgbaO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Scopes - paige\">\u003cmeta data-mint-head property=\"og:description\" content=\"Each API key carries a set of scopes, and every endpoint requires one. Grant the minimum a key needs — a key missing a required scope gets 403 insufficient_scope.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"paige\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://howto.paigeme.dev/api-reference/scopes\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://greenpages.mintlify.site/_mintlify/api/og/v2?division=Getting+started\u0026amp;title=Scopes\u0026amp;description=Each+API+key+carries+a+set+of+scopes%2C+and+every+endpoint+requires+one.+Grant+the+minimum+a+key+needs+%E2%80%94+a+key+missing+a+required+scope+gets+403+insufficient_scop\u0026amp;theme=c4f8b57fd839e0b00425ea76\u0026amp;signature=ab16acc0c570e89e68977c778da9f7b8db7dabc017863413e145e8f359ab5999\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Scopes - paige\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Each API key carries a set of scopes, and every endpoint requires one. Grant the minimum a key needs — a key missing a required scope gets 403 insufficient_scope.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://greenpages.mintlify.site/_mintlify/api/og/v2?division=Getting+started\u0026amp;title=Scopes\u0026amp;description=Each+API+key+carries+a+set+of+scopes%2C+and+every+endpoint+requires+one.+Grant+the+minimum+a+key+needs+%E2%80%94+a+key+missing+a+required+scope+gets+403+insufficient_scop\u0026amp;theme=c4f8b57fd839e0b00425ea76\u0026amp;signature=ab16acc0c570e89e68977c778da9f7b8db7dabc017863413e145e8f359ab5999\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/greenpages/x5PgeW5NAYRfgbaO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"paige\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#81D741\">\u003clink data-mint-head rel=\"canonical\" href=\"https://howto.paigeme.dev/api-reference/scopes\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/scopes.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://howto.paigeme.dev/#organization\",\"name\":\"paige\",\"url\":\"https://howto.paigeme.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/greenpages/SGZewfX5ti1H1LmZ/logo/green-pages-logo.png?fit=max\u0026auto=format\u0026n=SGZewfX5ti1H1LmZ\u0026q=85\u0026s=9b5fbf18d11676f6513a94ed3366cb7f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://howto.paigeme.dev#website\",\"name\":\"paige\",\"url\":\"https://howto.paigeme.dev\",\"publisher\":{\"@id\":\"https://howto.paigeme.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://howto.paigeme.dev/api-reference/scopes#webpage\",\"url\":\"https://howto.paigeme.dev/api-reference/scopes\",\"name\":\"Scopes\",\"description\":\"Each API key carries a set of scopes, and every endpoint requires one. Grant the minimum a key needs — a key missing a required scope gets 403 insufficient_scope.\",\"dateModified\":\"2026-11-20T16:58:09.534Z\",\"isPartOf\":{\"@id\":\"https://howto.paigeme.dev#website\"},\"breadcrumb\":{\"@id\":\"https://howto.paigeme.dev/api-reference/scopes#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://howto.paigeme.dev/api-reference/scopes#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Getting started\",\"item\":\"https://howto.paigeme.dev/api-reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Scopes\",\"item\":\"https://howto.paigeme.dev/api-reference/scopes\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://howto.paigeme.dev/api-reference/scopes#article\",\"headline\":\"Scopes\",\"name\":\"Scopes\",\"description\":\"Each API key carries a set of scopes, and every endpoint requires one. Grant the minimum a key needs — a key missing a required scope gets 403 insufficient_scope.\",\"url\":\"https://howto.paigeme.dev/api-reference/scopes\",\"mainEntityOfPage\":{\"@id\":\"https://howto.paigeme.dev/api-reference/scopes#webpage\"},\"dateModified\":\"2026-11-20T16:58:09.534Z\",\"publisher\":{\"@id\":\"https://howto.paigeme.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://howto.paigeme.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"paige\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"paige\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/scopes.md","siteName":"paige","nav":{"global":null,"tabs":[{"tab":"Introduction","icon":"rocket","pages":[{"title":"Introduction","href":""}]},{"tab":"Learn","icon":"graduation-cap","pages":[{"title":"Learn","href":"/learn/foundations/what-is-an-llm"}]},{"tab":"Features","icon":"sparkles","pages":[{"title":"Features","href":"/agents/overview"}]},{"tab":"API","icon":"code","groups":[{"group":"Getting started","pages":[{"title":"The Paige API","sidebarTitle":"Introduction","href":"/api-reference/introduction"},{"title":"Authentication","description":"Every /v1 request carries a project API key as a bearer token. Mint keys under Settings → API, scope them tightly, and store them as secrets — a key is shown once and never again.","href":"/api-reference/authentication"},{"title":"Scopes","href":"/api-reference/scopes"},{"title":"API conventions","sidebarTitle":"Conventions","description":"The /v1 behaviours that aren't obvious from a schema — which conversation field to read, what a send gives you back, why a file write can be refused, and how contact attributes merge.","href":"/api-reference/conventions"},{"title":"Errors","href":"/api-reference/errors"},{"title":"Rate limits","href":"/api-reference/rate-limits"},{"title":"Idempotency","href":"/api-reference/idempotency"},{"title":"Webhooks","href":"/api-reference/webhooks"}]},{"group":"Endpoints","pages":[{"group":"Meta","pages":[{"title":"The OpenAPI 3.1 spec for this API (no auth)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/openapi.json","href":"/api-reference/endpoints/meta/the-openapi-31-spec-for-this-api-no-auth"},{"title":"The pasteable Paige integration agent skill (no auth)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/skill.md","href":"/api-reference/endpoints/meta/the-pasteable-paige-integration-agent-skill-no-auth"},{"title":"Smoke check, echoing the resolved project and scopes","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/ping","href":"/api-reference/endpoints/meta/smoke-check-echoing-the-resolved-project-and-scopes"},{"title":"The projects this credential may act on","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/projects","href":"/api-reference/endpoints/meta/the-projects-this-credential-may-act-on"}]},{"group":"Messages","pages":[{"title":"Send a message (session, template, or interactive)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/messages","href":"/api-reference/endpoints/messages/send-a-message-session-template-or-interactive"},{"title":"Delivery status for one message","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/messages/{id}","href":"/api-reference/endpoints/messages/delivery-status-for-one-message"},{"title":"Retrieve the media attached to a message","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/messages/{id}/media","href":"/api-reference/endpoints/messages/retrieve-the-media-attached-to-a-message"}]},{"group":"Templates","pages":[{"title":"List message templates + approval status","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/templates","href":"/api-reference/endpoints/templates/list-message-templates-+-approval-status"},{"title":"Create a WhatsApp message template","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/templates","href":"/api-reference/endpoints/templates/create-a-whatsapp-message-template"},{"title":"Upload the sample file a media header needs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/templates/header-sample","href":"/api-reference/endpoints/templates/upload-the-sample-file-a-media-header-needs"},{"title":"Delete a template (all localizations, or a single language)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/templates/{name}","href":"/api-reference/endpoints/templates/delete-a-template-all-localizations-or-a-single-language"}]},{"group":"Conversations","pages":[{"title":"List conversations (state + archive filter, keyset cursor)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/conversations","href":"/api-reference/endpoints/conversations/list-conversations-state-+-archive-filter-keyset-cursor"},{"title":"Messages in a conversation (keyset cursor)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/conversations/{id}/messages","href":"/api-reference/endpoints/conversations/messages-in-a-conversation-keyset-cursor"},{"title":"Set a conversation's state (validated against known states)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/conversations/{id}","href":"/api-reference/endpoints/conversations/set-a-conversations-state-validated-against-known-states"}]},{"group":"Contacts","pages":[{"title":"All messages for a contact (phone or BSUID)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/contacts/{id}/messages","href":"/api-reference/endpoints/contacts/all-messages-for-a-contact-phone-or-bsuid"},{"title":"Update a contact name, tags or custom attributes","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/contacts/{id}","href":"/api-reference/endpoints/contacts/update-a-contact-name-tags-or-custom-attributes"},{"title":"Archive a contact's chat","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/contacts/{id}/archive","href":"/api-reference/endpoints/contacts/archive-a-contacts-chat"},{"title":"Bring a contact's chat back from Archived","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/contacts/{id}/unarchive","href":"/api-reference/endpoints/contacts/bring-a-contacts-chat-back-from-archived"}]},{"group":"Build","pages":[{"title":"List the bot code files","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/files","href":"/api-reference/endpoints/build/list-the-bot-code-files"},{"title":"Read one bot code file","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/files/{path}","href":"/api-reference/endpoints/build/read-one-bot-code-file"},{"title":"Create or edit a file via the code agent","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v1/files/{path}","href":"/api-reference/endpoints/build/create-or-edit-a-file-via-the-code-agent"},{"title":"Author or edit bot code via the code agent","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/code","href":"/api-reference/endpoints/build/author-or-edit-bot-code-via-the-code-agent"},{"title":"Confirm, reject or revise a build plan","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/code/plans/{id}/decision","href":"/api-reference/endpoints/build/confirm-reject-or-revise-a-build-plan"},{"title":"Promote dev to production","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/deploy","href":"/api-reference/endpoints/build/promote-dev-to-production"},{"title":"List the project's WhatsApp Flows","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/flows","href":"/api-reference/endpoints/build/list-the-projects-whatsapp-flows"},{"title":"Generate a new WhatsApp Flow via the flows sub-agent","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/flows","href":"/api-reference/endpoints/build/generate-a-new-whatsapp-flow-via-the-flows-sub-agent"},{"title":"Read one flow, including its JSON definition","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/flows/{id}","href":"/api-reference/endpoints/build/read-one-flow-including-its-json-definition"},{"title":"Update a flow via the flows sub-agent","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/flows/{id}","href":"/api-reference/endpoints/build/update-a-flow-via-the-flows-sub-agent"}]},{"group":"Chat","pages":[{"title":"Send Paige a message and get its reply","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/chat","href":"/api-reference/endpoints/chat/send-paige-a-message-and-get-its-reply"}]},{"group":"Broadcasts","pages":[{"title":"Create + save a reusable audience segment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/segments","href":"/api-reference/endpoints/broadcasts/create-+-save-a-reusable-audience-segment"},{"title":"Live contact count for a filter (no save)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/segments/preview","href":"/api-reference/endpoints/broadcasts/live-contact-count-for-a-filter-no-save"},{"title":"Assemble a broadcast for approval","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/broadcasts","href":"/api-reference/endpoints/broadcasts/assemble-a-broadcast-for-approval"},{"title":"Broadcast status + rollup counts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/broadcasts/{id}","href":"/api-reference/endpoints/broadcasts/broadcast-status-+-rollup-counts"},{"title":"Per-recipient drill-down","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/broadcasts/{id}/recipients","href":"/api-reference/endpoints/broadcasts/per-recipient-drill-down"}]},{"group":"Tables","pages":[{"title":"List the project's own database tables","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/tables","href":"/api-reference/endpoints/tables/list-the-projects-own-database-tables"},{"title":"Read one table's columns, types and primary key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/tables/{table}/schema","href":"/api-reference/endpoints/tables/read-one-tables-columns-types-and-primary-key"},{"title":"Read rows from one of your tables","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/tables/{table}/rows","href":"/api-reference/endpoints/tables/read-rows-from-one-of-your-tables"},{"title":"Insert rows into one of your tables","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/tables/{table}/rows","href":"/api-reference/endpoints/tables/insert-rows-into-one-of-your-tables"},{"title":"Delete the rows matching a filter","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/tables/{table}/rows","href":"/api-reference/endpoints/tables/delete-the-rows-matching-a-filter"},{"title":"Update the rows matching a filter","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/tables/{table}/rows","href":"/api-reference/endpoints/tables/update-the-rows-matching-a-filter"}]},{"group":"Media","pages":[{"title":"List the project's media assets","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/media","href":"/api-reference/endpoints/media/list-the-projects-media-assets"},{"title":"Upload a media asset","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/media","href":"/api-reference/endpoints/media/upload-a-media-asset"},{"title":"Retrieve one media asset and a signed URL","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/media/{slug}","href":"/api-reference/endpoints/media/retrieve-one-media-asset-and-a-signed-url"},{"title":"Delete a media asset","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/media/{slug}","href":"/api-reference/endpoints/media/delete-a-media-asset"}]},{"group":"Webhooks","pages":[{"title":"List webhook registrations (never the secret)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/webhooks","href":"/api-reference/endpoints/webhooks/list-webhook-registrations-never-the-secret"},{"title":"Register an outbound webhook","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/webhooks","href":"/api-reference/endpoints/webhooks/register-an-outbound-webhook"},{"title":"Retrieve one webhook registration (never the secret)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/webhooks/{id}","href":"/api-reference/endpoints/webhooks/retrieve-one-webhook-registration-never-the-secret"},{"title":"Delete a webhook registration","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/webhooks/{id}","href":"/api-reference/endpoints/webhooks/delete-a-webhook-registration"},{"title":"Partial update of a webhook registration","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/webhooks/{id}","href":"/api-reference/endpoints/webhooks/partial-update-of-a-webhook-registration"}]}]}]},{"tab":"Integrations","icon":"plug","pages":[{"title":"Integrations","href":"/integrations"}]},{"tab":"Tips \u0026 Tricks","icon":"lightbulb","pages":[{"title":"Tips \u0026 Tricks","href":"/guides/prompting"}]},{"tab":"Changelog","icon":"history","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Scopes - paige","deploymentId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","buildId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","dynamics":[],"chunks":[]}