Issues a new key and returns its secret once. There is no way to read
it again.
Two rules decide what the new key may hold:
Subset. You can only grant scopes the calling key itself holds.
Asking for anything more answers 403 API_KEY_SCOPE_ESCALATION, naming
the scopes that went beyond. api_keys:manage includes
api_keys:read: a key holding manage can grant read even when read is
not ticked on it, because it already reads the list.
api_keys:manage is never granted here. A key issued through the
API cannot issue keys of its own, even when the calling key can. Ask
for it and the answer is 403 API_KEY_MANAGE_NOT_DELEGABLE. Grant it
in the dashboard, under Settings → API keys.
scopes is required and has no default: a key gets exactly what you ask
for. Requires api_keys:manage, which only a key created in the
dashboard can hold: there is no bootstrap endpoint, so the first key of
a workspace is always made by a person under Settings → API Keys.
Issues a key and returns its secret once. No later request returns it — the secret is stored only as a hash. Save it before you do anything else; if you lose it, revoke the key and issue another.This is how an integration gives a job less authority than it has itself: a nightly export that only reads leads gets a key that can only read leads, so a mistake in that job cannot place a call or spend a shekel.
The first key is made by a person
This endpoint issues the second key onward, never the first. It needs api_keys:manage, and that scope can only be put on a key in the dashboard, by a workspace owner or admin under Settings → API Keys: tick API keys → Manage (or pick Full access) when you create a key, or tick it on an existing key under Edit scopes. There is no bootstrap endpoint and no way to earn the scope from code, by design: it is the one scope that can widen the whole workspace.So the pattern this page describes starts with one manual step and is code from then on:
1
Once, in the dashboard
Create a key with API keys → Manage ticked, or tick API keys → Manage on an existing key under Edit scopes. Store its secret wherever the integration keeps credentials. This is the only key that can reach /api-keys.
2
Per job or per client, from code
Call POST /api-keys with that key to issue a narrow key — one client, one job, one set of scopes.
3
Rotate from code
Issue the replacement under a new name — a name belongs to one active key, compared without regard to case — move the job over, then DELETE /api-keys/{id} the old one. Both keys work until you revoke the old one, so nothing stops in between. A key cannot revoke itself. In the dashboard, Rotate on a key’s card does all of this in one step: the new secret keeps the key’s name, permissions and agents, and its end date unless you pick another, and the old secret keeps working for the grace you pick — up to 7 days, shown as its expires_at, under the name <name> (old) — or stops at once, for a secret that leaked.
There is no update endpoint. A key’s scopes, agents and end date are changed in the dashboard, under Settings → API keys → Edit scopes; PATCH /api-keys/{id} answers 405 and says so, whatever scopes the calling key holds. From code, the equivalent is the rotation above: issue the key you want, move over, revoke the old one.If you are onboarding clients into separate workspaces, each workspace needs its own step 1: a key is scoped to one workspace and cannot issue keys in another.
What a new key may hold
scopes is required and has no default. A key is issued with exactly what you ask for. Any field this page does not list is refused by name with 400 API_KEY_REQUEST_INVALID, so a typo can never leave you believing a key is narrower than it is.Subset. You can only grant scopes the calling key holds. A key with leads:read cannot issue a key with calls:create; the refusal names the scopes that went beyond, so you know which one to fix.api_keys:manage is never granted here. A key issued through the API can never issue keys of its own, even when the key issuing it can. That keeps key issuance one generation deep and always starting with a person in the dashboard. If a key genuinely needs to issue keys, tick API keys → Manage when you create it in the dashboard, under Settings → API keys.api_keys:read is granted here like any other scope. An integration that should be able to audit the inventory — which keys exist, what each one can do, when each was last used — without being able to issue or revoke one gets api_keys:read and nothing else. Manage includes Read: a key holding api_keys:manage can grant api_keys:read even when Read was never ticked on it, since it already reads the list. In the dashboard, ticking API keys → Manage ticks Read with it.calls:metrics is the calls read without the people on them — counts, durations, outcomes and cost, with every number, name, summary, transcript, recording and collected value withheld (see the scope table). Read includes Metrics: a key holding calls:read can grant calls:metrics, and in the dashboard ticking Calls → Read ticks Metrics with it.agent_ids limits the key to some agents. Leave it out, or send null, and the key reaches the whole workspace, as every key always has. Send 1–100 agent ids and it reaches only those agents, their calls, the leads they called, their spend, their deliveries and their campaigns — see Limiting a key to some agents. This is how an agency gives each client a key that cannot see another client’s calls. Every id must be a live agent in this workspace; an empty list is refused rather than guessed at. A key limited to agents is refused the scopes it could never use — those that open only routes belonging to the whole workspace, adding an agent or changing a lead: agents:create, tools:create, phone_numbers:*, billing:manage, dispositions:*, leads:manage, lead_tags:*, agent_eval:*, integrations:*, tool-connections:*, shared_links:*, do_not_call:*, sip_endpoints:*, call_windows:manage, affiliates:read, api_keys:* and carrier_accounts:* — with 400 API_KEY_REQUEST_INVALID naming each; they used to be issued and then refused with 403 on every use. tools:read and tools:update stay: they read and retry the key’s own deliveries, and billing:read reads its agents’ spend (GET /billing/consumption). The dashboard greys the same ones out under Only these agents and refuses them there too, on a new key and on an edit.expires_at gives the key an end date. Send an ISO 8601 date-time with a time zone — 2026-12-31T23:59:59Z — and from that moment every request made with the key answers 401 EXPIRED_KEY. Leave it out, or send null, for a key that works until it is revoked. A moment that has passed, or a date without a time zone, is refused rather than guessed at. An expired key stays in the list, with its expires_at, until you revoke it.Required scope: api_keys:manage.
Revoke the probe key with DELETE /api-keys/{id} when you are done.
Errors
HTTP
Code
When
400
API_KEY_REQUEST_INVALID
name missing or over 100 characters, scopes missing, empty, or not an array of strings, expires_at not a date-time with a time zone or already past, agent_ids empty, over its limit, or holding an entry that is not an agent id (each such entry is named by position, agent_ids[1] ("clinic-a")), scopes that a key limited by agent_ids could never use (each named — see agent_ids above), or the body carries a field this endpoint does not take. The message names the field; nothing is issued.
400
API_KEY_SCOPE_UNKNOWN
A requested scope does not exist. The message names it — check it against the scope list.
400
API_KEY_AGENT_UNKNOWN
An id in agent_ids is not a live agent in this workspace. The message names each one.
403
INSUFFICIENT_SCOPE
API key lacks api_keys:manage.
403
API_KEY_SCOPE_ESCALATION
A requested scope is one the calling key does not hold. The message names each one. api_keys:read is never among them for a key holding api_keys:manage, nor calls:metrics for a key holding calls:read.
403
API_KEY_MANAGE_NOT_DELEGABLE
api_keys:manage was requested. Create that key in the dashboard instead.
409
API_KEY_NAME_TAKEN
An active key of that name already exists here. Names are compared without regard to case — Client-A is taken while client-a is live — and the message names the key as it is spelled. Two creates sent at once under one spelling get one key and one 409 — the database holds the rule, not a check that both could pass.
503
API_KEY_STORAGE_UNAVAILABLE
Nothing was created. Retry.
Authorizations
Authorization
string
header
required
Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).
Body
application/json
name
string
required
Unique among this workspace's active keys, compared without regard to case (Client-A is taken while client-a is live). The only handle you have on the key afterwards.
Maximum string length: 100
Example:
"Nightly lead sync"
scopes
string[]
required
A subset of the calling key's own scopes (api_keys:read counts as held by a key with api_keys:manage). api_keys:manage is not accepted.
Minimum array length: 1
Example:
["leads:read", "leads:manage"]
agent_ids
string<uuid>[] | null
Limit the key to these agents — live agents in this workspace.
Leave it out or send null for a key that reaches the whole
workspace. An unknown id answers 400 API_KEY_AGENT_UNKNOWN
and an empty list 400 API_KEY_REQUEST_INVALID.
Required array length: 1 - 100 elements
expires_at
string<date-time> | null
When the key stops working: an ISO 8601 date-time with a time
zone, in the future. Leave it out or send null for a key that
works until it is revoked. A past moment or a date without a
time zone answers 400 API_KEY_REQUEST_INVALID.
Example:
"2026-12-31T23:59:59Z"
Response
Key issued. The only response that contains the secret.
An API key belonging to your workspace. The secret itself is stored only
as a SHA-256 hash and is returned exactly once, by POST /api-keys; no
read ever returns it. prefix is the first 16 characters of the secret
and is what identifies a key in the dashboard list.
id
string<uuid>
name
string
What you called the key. Unique among this workspace's active keys, compared without regard to case.
Example:
"Nightly lead sync"
prefix
string
First 16 characters of the key, enough to tell two keys apart. Never the whole secret.
Example:
"ypr_live_9f2c41a"
scopes
string[]
Example:
["leads:read", "leads:manage"]
agent_ids
string<uuid>[] | null
The agents this key is limited to, or null for a key that reaches
the whole workspace. A limited key reaches those agents, their calls,
the leads they called (read only), their spend, their deliveries and
their campaigns, and calls only from numbers those agents answer or
call from; everything the workspace shares answers
403 API_KEY_AGENT_SCOPED, and naming another agent answers
403 AGENT_OUTSIDE_KEY_SCOPE.
Example:
null
agents
object[] | null
The same agents as agent_ids, in the same order, each with its
name — so a read says which client a limited key reaches. An
archived agent keeps its name; an agent that no longer exists has
name: null. null for a key that reaches the whole workspace.
Show child attributes
Example:
null
created_at
string<date-time>
expires_at
string<date-time> | null
When the key stops working, or null for a key that works until it
is revoked. Past this moment every request made with it answers
401 EXPIRED_KEY; the key stays listed until it is revoked.
Example:
null
last_used_at
string<date-time> | null
When this key last authenticated a request. null if it never has.
key
string
The full secret. This is the only response that ever contains it —
store it before you do anything else. If you lose it, revoke the
key and issue another.
Example:
"ypr_live_9f2c41a7b0e3…"
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Yappr","colors":{"primary":"#6366f1","light":"#818cf8","dark":"#4f46e5"},"favicon":"https://mintcdn.com/yappr/E1AQ46GZ-5iPcyPp/favicon.svg?fit=max\u0026auto=format\u0026n=E1AQ46GZ-5iPcyPp\u0026q=85\u0026s=a8c28fe51e78b8e4701c773698ba2378","logo":{"light":"https://mintcdn.com/yappr/E1AQ46GZ-5iPcyPp/logo/light.svg?fit=max\u0026auto=format\u0026n=E1AQ46GZ-5iPcyPp\u0026q=85\u0026s=a117ff3aa08c2017e8d58b0da5be882f","dark":"https://mintcdn.com/yappr/E1AQ46GZ-5iPcyPp/logo/dark.svg?fit=max\u0026auto=format\u0026n=E1AQ46GZ-5iPcyPp\u0026q=85\u0026s=613f48501928d9122f97fb91bfcf9b87"},"api":{"openapi":"openapi.yaml"},"footer":{"socials":{"website":"https://goyappr.com"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"yappr","hasAudioNarration":false,"actualSubdomain":"yappr","customDomains":["docs.goyappr.com"],"gitSource":{"type":"github","owner":"simon-isf","repo":"hebrew-voice-ai","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b097bda241cbb20e7401d81","clientVersion":"0.0.4340","searchFilterCounts":[{"language":"default","tag":"API Reference","count":210},{"language":"default","tag":"Tools \u0026 integrations","count":35},{"language":"default","tag":"Agent Eval","count":24},{"language":"default","tag":"Agents","count":20},{"language":"default","tag":"Tools","count":19},{"language":"default","tag":"Connected accounts","count":16},{"language":"default","tag":"Campaigns","count":15},{"language":"default","tag":"Carrier accounts","count":14},{"language":"default","tag":"Workflows","count":12},{"language":"default","tag":"Billing","count":11}]},"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":"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":"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":"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":"turbopuffer-dual-write","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":"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":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"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}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/api-keys/create","slug":"/api-reference/api-keys/create","pageMetadata":{"title":"Issue an API key","openapi":"POST /api-keys","description":"Issues a new key and returns its secret **once**. There is no way to read\nit again.\n\nTwo rules decide what the new key may hold:\n\n- **Subset.** You can only grant scopes the calling key itself holds.\n Asking for anything more answers `403 API_KEY_SCOPE_ESCALATION`, naming\n the scopes that went beyond. `api_keys:manage` includes\n `api_keys:read`: a key holding manage can grant read even when read is\n not ticked on it, because it already reads the list.\n- **`api_keys:manage` is never granted here.** A key issued through the\n API cannot issue keys of its own, even when the calling key can. Ask\n for it and the answer is `403 API_KEY_MANAGE_NOT_DELEGABLE`. Grant it\n in the dashboard, under Settings → API keys.\n\n`scopes` is required and has no default: a key gets exactly what you ask\nfor. Requires `api_keys:manage`, which only a key created in the\ndashboard can hold: there is no bootstrap endpoint, so the first key of\na workspace is always made by a person under Settings → API Keys.\n","href":"/api-reference/api-keys/create"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Issues a new key and returns its secret \", _jsx(_components.strong, {\n children: \"once\"\n }), \". There is no way to read\\nit again.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Two rules decide what the new key may hold:\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Subset.\"\n }), \" You can only grant scopes the calling key itself holds.\\nAsking for anything more answers \", _jsx(_components.code, {\n children: \"403 API_KEY_SCOPE_ESCALATION\"\n }), \", naming\\nthe scopes that went beyond. \", _jsx(_components.code, {\n children: \"api_keys:manage\"\n }), \" includes\\n\", _jsx(_components.code, {\n children: \"api_keys:read\"\n }), \": a key holding manage can grant read even when read is\\nnot ticked on it, because it already reads the list.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsxs(_components.strong, {\n children: [_jsx(_components.code, {\n children: \"api_keys:manage\"\n }), \" is never granted here.\"]\n }), \" A key issued through the\\nAPI cannot issue keys of its own, even when the calling key can. Ask\\nfor it and the answer is \", _jsx(_components.code, {\n children: \"403 API_KEY_MANAGE_NOT_DELEGABLE\"\n }), \". Grant it\\nin the dashboard, under Settings → API keys.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"scopes\"\n }), \" is required and has no default: a key gets exactly what you ask\\nfor. Requires \", _jsx(_components.code, {\n children: \"api_keys:manage\"\n }), \", which only a key created in the\\ndashboard can hold: there is no bootstrap endpoint, so the first key of\\na workspace is always made by a person under Settings → API Keys.\"]\n })]\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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Step,Steps,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Issues a key and returns its secret `,_jsx(_components.strong,{children:`once`}),`. No later request returns it — the secret is stored only as a hash. Save it before you do anything else; if you lose it, revoke the key and issue another.`]}),`\n`,_jsx(_components.p,{children:`This is how an integration gives a job less authority than it has itself: a nightly export that only reads leads gets a key that can only read leads, so a mistake in that job cannot place a call or spend a shekel.`}),`\n`,_jsx(Heading,{level:`2`,id:`the-first-key-is-made-by-a-person`,children:`The first key is made by a person`}),`\n`,_jsxs(_components.p,{children:[`This endpoint issues the second key onward, never the first. It needs `,_jsx(_components.code,{children:`api_keys:manage`}),`, and `,_jsx(_components.strong,{children:`that scope can only be put on a key in the dashboard`}),`, by a workspace owner or admin under Settings → API Keys: tick `,_jsx(_components.strong,{children:`API keys → Manage`}),` (or pick `,_jsx(_components.strong,{children:`Full access`}),`) when you create a key, or tick it on an existing key under `,_jsx(_components.strong,{children:`Edit scopes`}),`. There is no bootstrap endpoint and no way to earn the scope from code, by design: it is the one scope that can widen the whole workspace.`]}),`\n`,_jsx(_components.p,{children:`So the pattern this page describes starts with one manual step and is code from then on:`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Once, in the dashboard`,children:_jsxs(_components.p,{children:[`Create a key with `,_jsx(_components.strong,{children:`API keys → Manage`}),` ticked, or tick `,_jsx(_components.strong,{children:`API keys → Manage`}),` on an existing key under `,_jsx(_components.strong,{children:`Edit scopes`}),`. Store its secret wherever the integration keeps credentials. This is the only key that can reach `,_jsx(_components.code,{children:`/api-keys`}),`.`]})}),_jsx(Step,{title:`Per job or per client, from code`,children:_jsxs(_components.p,{children:[`Call `,_jsx(_components.code,{children:`POST /api-keys`}),` with that key to issue a narrow key — one client, one job, one set of scopes.`]})}),_jsx(Step,{title:`Rotate from code`,children:_jsxs(_components.p,{children:[`Issue the replacement under a new name — a name belongs to one active key, compared without regard to case — move the job over, then `,_jsx(_components.code,{children:`DELETE /api-keys/{id}`}),` the old one. Both keys work until you revoke the old one, so nothing stops in between. A key cannot revoke itself. In the dashboard, `,_jsx(_components.strong,{children:`Rotate`}),` on a key’s card does all of this in one step: the new secret keeps the key’s name, permissions and agents, and its end date unless you pick another, and the old secret keeps working for the grace you pick — up to 7 days, shown as its `,_jsx(_components.code,{children:`expires_at`}),`, under the name `,_jsx(_components.code,{children:`\u003cname> (old)`}),` — or stops at once, for a secret that leaked.`]})})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`There is no update endpoint.`}),` A key’s scopes, agents and end date are changed in the dashboard, under Settings → API keys → `,_jsx(_components.strong,{children:`Edit scopes`}),`; `,_jsx(_components.code,{children:`PATCH /api-keys/{id}`}),` answers `,_jsx(_components.code,{children:`405`}),` and says so, whatever scopes the calling key holds. From code, the equivalent is the rotation above: issue the key you want, move over, revoke the old one.`]}),`\n`,_jsx(_components.p,{children:`If you are onboarding clients into separate workspaces, each workspace needs its own step 1: a key is scoped to one workspace and cannot issue keys in another.`}),`\n`,_jsx(Heading,{level:`2`,id:`what-a-new-key-may-hold`,children:`What a new key may hold`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`scopes`}),` is required and has no default. A key is issued with exactly what you ask for. Any field this page does not list is refused by name with `,_jsx(_components.code,{children:`400 API_KEY_REQUEST_INVALID`}),`, so a typo can never leave you believing a key is narrower than it is.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Subset.`}),` You can only grant scopes the calling key holds. A key with `,_jsx(_components.code,{children:`leads:read`}),` cannot issue a key with `,_jsx(_components.code,{children:`calls:create`}),`; the refusal names the scopes that went beyond, so you know which one to fix.`]}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`api_keys:manage`}),` is never granted here.`]}),` A key issued through the API can never issue keys of its own, even when the key issuing it can. That keeps key issuance one generation deep and always starting with a person in the dashboard. If a key genuinely needs to issue keys, tick `,_jsx(_components.strong,{children:`API keys → Manage`}),` when you create it in the dashboard, under Settings → API keys.`]}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`api_keys:read`}),` is granted here like any other scope.`]}),` An integration that should be able to audit the inventory — which keys exist, what each one can do, when each was last used — without being able to issue or revoke one gets `,_jsx(_components.code,{children:`api_keys:read`}),` and nothing else. Manage includes Read: a key holding `,_jsx(_components.code,{children:`api_keys:manage`}),` can grant `,_jsx(_components.code,{children:`api_keys:read`}),` even when Read was never ticked on it, since it already reads the list. In the dashboard, ticking `,_jsx(_components.strong,{children:`API keys → Manage`}),` ticks Read with it.`]}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`calls:metrics`}),` is the calls read without the people on them`]}),` — counts, durations, outcomes and cost, with every number, name, summary, transcript, recording and collected value withheld (see the `,_jsx(_components.a,{href:`/api-reference/introduction#api-key-scopes`,children:`scope table`}),`). Read includes Metrics: a key holding `,_jsx(_components.code,{children:`calls:read`}),` can grant `,_jsx(_components.code,{children:`calls:metrics`}),`, and in the dashboard ticking `,_jsx(_components.strong,{children:`Calls → Read`}),` ticks Metrics with it.`]}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`agent_ids`}),` limits the key to some agents.`]}),` Leave it out, or send `,_jsx(_components.code,{children:`null`}),`, and the key reaches the whole workspace, as every key always has. Send 1–100 agent ids and it reaches only those agents, their calls, the leads they called, their spend, their deliveries and their campaigns — see `,_jsx(_components.a,{href:`/api-reference/introduction#limiting-a-key-to-some-agents`,children:`Limiting a key to some agents`}),`. This is how an agency gives each client a key that cannot see another client’s calls. Every id must be a live agent in this workspace; an empty list is refused rather than guessed at. A key limited to agents is refused the scopes it could never use — those that open only routes belonging to the whole workspace, adding an agent or changing a lead: `,_jsx(_components.code,{children:`agents:create`}),`, `,_jsx(_components.code,{children:`tools:create`}),`, `,_jsx(_components.code,{children:`phone_numbers:*`}),`, `,_jsx(_components.code,{children:`billing:manage`}),`, `,_jsx(_components.code,{children:`dispositions:*`}),`, `,_jsx(_components.code,{children:`leads:manage`}),`, `,_jsx(_components.code,{children:`lead_tags:*`}),`, `,_jsx(_components.code,{children:`agent_eval:*`}),`, `,_jsx(_components.code,{children:`integrations:*`}),`, `,_jsx(_components.code,{children:`tool-connections:*`}),`, `,_jsx(_components.code,{children:`shared_links:*`}),`, `,_jsx(_components.code,{children:`do_not_call:*`}),`, `,_jsx(_components.code,{children:`sip_endpoints:*`}),`, `,_jsx(_components.code,{children:`call_windows:manage`}),`, `,_jsx(_components.code,{children:`affiliates:read`}),`, `,_jsx(_components.code,{children:`api_keys:*`}),` and `,_jsx(_components.code,{children:`carrier_accounts:*`}),` — with `,_jsx(_components.code,{children:`400 API_KEY_REQUEST_INVALID`}),` naming each; they used to be issued and then refused with `,_jsx(_components.code,{children:`403`}),` on every use. `,_jsx(_components.code,{children:`tools:read`}),` and `,_jsx(_components.code,{children:`tools:update`}),` stay: they read and retry the key’s own deliveries, and `,_jsx(_components.code,{children:`billing:read`}),` reads its agents’ spend (`,_jsx(_components.code,{children:`GET /billing/consumption`}),`). The dashboard greys the same ones out under `,_jsx(_components.strong,{children:`Only these agents`}),` and refuses them there too, on a new key and on an edit.`]}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`expires_at`}),` gives the key an end date.`]}),` Send an ISO 8601 date-time with a time zone — `,_jsx(_components.code,{children:`2026-12-31T23:59:59Z`}),` — and from that moment every request made with the key answers `,_jsx(_components.code,{children:`401 EXPIRED_KEY`}),`. Leave it out, or send `,_jsx(_components.code,{children:`null`}),`, for a key that works until it is revoked. A moment that has passed, or a date without a time zone, is refused rather than guessed at. An expired key stays in the list, with its `,_jsx(_components.code,{children:`expires_at`}),`, until you revoke it.`]}),`\n`,_jsxs(_components.p,{children:[`Required scope: `,_jsx(_components.code,{children:`api_keys:manage`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example request`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.goyappr.com/api-keys\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$YAPPR_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Nightly lead sync\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"scopes\": [\"leads:read\", \"leads:manage\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`A key for one client of an agency — its calls and nothing else:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.goyappr.com/api-keys\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$YAPPR_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Client A — dental\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"scopes\": [\"agents:read\", \"calls:read\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"agent_ids\": [\"0b6a3f7e-2d41-4c8a-9f10-5e2b7c9d1a44\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`A contractor’s key that stops working at the end of the year:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.goyappr.com/api-keys\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$YAPPR_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Contractor — Q4\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"scopes\": [\"calls:read\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"expires_at\": \"2026-12-31T23:59:59Z\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`example-response`,children:`Example response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,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:`12`,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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"6a1c2d3e-4f50-4a6b-8c7d-9e0f1a2b3c4d\"`}),_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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Nightly lead sync\"`}),_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:` \"prefix\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ypr_live_9f2c41a\"`}),_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:` \"scopes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"leads:read\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"leads:manage\"`}),_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:` \"agent_ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_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:` \"agents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_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:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-22T09:14:02.881Z\"`}),_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:` \"last_used_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_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:` \"expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_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:` \"key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ypr_live_9f2c41a7b0e3…\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`key`}),` appears in this response and in no other.`]}),`\n`,_jsx(Heading,{level:`2`,id:`testing-a-scope-boundary`,children:`Testing a scope boundary`}),`\n`,_jsx(_components.p,{children:`The pair of requests below is the whole check — issue a key without a scope, then watch the endpoint that needs it refuse:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NARROW`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sX`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.goyappr.com/api-keys\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$YAPPR_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"name\":\"scope probe\",\"scopes\":[\"calls:read\"]}'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -r`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` .key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -i`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PUT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.goyappr.com/call-windows\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$NARROW`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"windows\":[]}'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 403 INSUFFICIENT_SCOPE, naming call_windows:manage`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Revoke the probe key with `,_jsx(_components.code,{children:`DELETE /api-keys/{id}`}),` when you are done.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`API_KEY_REQUEST_INVALID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`name`}),` missing or over 100 characters, `,_jsx(_components.code,{children:`scopes`}),` missing, empty, or not an array of strings, `,_jsx(_components.code,{children:`expires_at`}),` not a date-time with a time zone or already past, `,_jsx(_components.code,{children:`agent_ids`}),` empty, over its limit, or holding an entry that is not an agent id (each such entry is named by position, `,_jsx(_components.code,{children:`agent_ids[1] (\"clinic-a\")`}),`), `,_jsx(_components.code,{children:`scopes`}),` that a key limited by `,_jsx(_components.code,{children:`agent_ids`}),` could never use (each named — see `,_jsx(_components.code,{children:`agent_ids`}),` above), or the body carries a field this endpoint does not take. The message names the field; nothing is issued.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`API_KEY_SCOPE_UNKNOWN`})}),_jsxs(_components.td,{children:[`A requested scope does not exist. The message names it — check it against the `,_jsx(_components.a,{href:`/api-reference/introduction`,children:`scope list`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`API_KEY_AGENT_UNKNOWN`})}),_jsxs(_components.td,{children:[`An id in `,_jsx(_components.code,{children:`agent_ids`}),` is not a live agent in this workspace. The message names each one.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`INSUFFICIENT_SCOPE`})}),_jsxs(_components.td,{children:[`API key lacks `,_jsx(_components.code,{children:`api_keys:manage`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`API_KEY_SCOPE_ESCALATION`})}),_jsxs(_components.td,{children:[`A requested scope is one the calling key does not hold. The message names each one. `,_jsx(_components.code,{children:`api_keys:read`}),` is never among them for a key holding `,_jsx(_components.code,{children:`api_keys:manage`}),`, nor `,_jsx(_components.code,{children:`calls:metrics`}),` for a key holding `,_jsx(_components.code,{children:`calls:read`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`API_KEY_MANAGE_NOT_DELEGABLE`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`api_keys:manage`}),` was requested. Create that key in the dashboard instead.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`API_KEY_NAME_TAKEN`})}),_jsxs(_components.td,{children:[`An active key of that name already exists here. Names are compared without regard to case — `,_jsx(_components.code,{children:`Client-A`}),` is taken while `,_jsx(_components.code,{children:`client-a`}),` is live — and the message names the key as it is spelled. Two creates sent at once under one spelling get one key and one 409 — the database holds the rule, not a check that both could pass.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`API_KEY_STORAGE_UNAVAILABLE`})}),_jsx(_components.td,{children:`Nothing was created. Retry.`})]})]})]})]})}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":"Issue an API key","openapi":"POST /api-keys","description":"Issues a new key and returns its secret **once**. There is no way to read\nit again.\n\nTwo rules decide what the new key may hold:\n\n- **Subset.** You can only grant scopes the calling key itself holds.\n Asking for anything more answers `403 API_KEY_SCOPE_ESCALATION`, naming\n the scopes that went beyond. `api_keys:manage` includes\n `api_keys:read`: a key holding manage can grant read even when read is\n not ticked on it, because it already reads the list.\n- **`api_keys:manage` is never granted here.** A key issued through the\n API cannot issue keys of its own, even when the calling key can. Ask\n for it and the answer is `403 API_KEY_MANAGE_NOT_DELEGABLE`. Grant it\n in the dashboard, under Settings → API keys.\n\n`scopes` is required and has no default: a key gets exactly what you ask\nfor. Requires `api_keys:manage`, which only a key created in the\ndashboard can hold: there is no bootstrap endpoint, so the first key of\na workspace is always made by a person under Settings → API Keys.\n","href":"/api-reference/api-keys/create"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"The first key is made by a person","slug":"the-first-key-is-made-by-a-person","depth":2,"children":[]},{"title":"What a new key may hold","slug":"what-a-new-key-may-hold","depth":2,"children":[]},{"title":"Example request","slug":"example-request","depth":2,"children":[]},{"title":"Example response","slug":"example-response","depth":2,"children":[]},{"title":"Testing a scope boundary","slug":"testing-a-scope-boundary","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Issue an API key","description":"Issues a new key and returns its secret **once**. There is no way to read\nit again.\n\nTwo rules decide what the new key may hold:\n\n- **Subset.** You can only grant scopes the calling key itself holds.\n Asking for anything more answers `403 API_KEY_SCOPE_ESCALATION`, naming\n the scopes that went beyond. `api_keys:manage` includes\n `api_keys:read`: a key holding manage can grant read even when read is\n not ticked on it, because it already reads the list.\n- **`api_keys:manage` is never granted here.** A key issued through the\n API cannot issue keys of its own, even when the calling key can. Ask\n for it and the answer is `403 API_KEY_MANAGE_NOT_DELEGABLE`. Grant it\n in the dashboard, under Settings → API keys.\n\n`scopes` is required and has no default: a key gets exactly what you ask\nfor. Requires `api_keys:manage`, which only a key created in the\ndashboard can hold: there is no bootstrap endpoint, so the first key of\na workspace is always made by a person under Settings → API Keys.\n","operationId":"createApiKey","tags":["API Keys"],"requestBody":"63d3749e-039b-4340-ba1d-bd82c7b33656","responses":{"201":"e79e2a2b-2e63-48fb-b005-53a1cac1dfe2","400":"8bf70f5e-3259-4d89-a230-cdf677ef90ac","403":"fe220556-d8d2-4881-9bc1-5b65faa2b3c9","409":"73333029-8cfa-4cfe-bb05-bfbc5efcf4c4","503":"1ff3ea75-f15f-4ca7-a478-01bafdf97c26"},"method":"post","type":"path","servers":["dc0c5f7d-c0c3-40b9-9c53-ce2239f5b67d"],"security":["2767439e-f0c6-4cd4-a450-ba11a6ab8311"],"path":"/api-keys","baseUrlOptions":["https://api.goyappr.com"],"title":"Issue an API key","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","scopes"],"additionalProperties":false,"properties":{"name":{"type":"string","maxLength":100,"description":"Unique among this workspace's active keys, compared without regard to case (`Client-A` is taken while `client-a` is live). The only handle you have on the key afterwards.","example":"Nightly lead sync","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"scopes":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"scopes.items.[INDEX]","typeLabel":"string"},"description":"A subset of the calling key's own scopes (`api_keys:read` counts as held by a key with `api_keys:manage`). `api_keys:manage` is not accepted.","example":["leads:read","leads:manage"],"isRequired":true,"uniqueKey":"scopes","typeLabel":"string[]"},"agent_ids":{"oneOf":[{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","format":"uuid","uniqueKey":"agent_ids.oneOf.0.items.[INDEX]","typeLabel":"string\u003cuuid>"},"description":"Limit the key to these agents — live agents in this workspace.\nLeave it out or send `null` for a key that reaches the whole\nworkspace. An unknown id answers `400 API_KEY_AGENT_UNKNOWN`\nand an empty list `400 API_KEY_REQUEST_INVALID`.\n","uniqueKey":"agent_ids.oneOf.0","typeLabel":"string\u003cuuid>[]"},{"type":"null","minItems":1,"maxItems":100,"items":{"type":"string","format":"uuid"},"description":"Limit the key to these agents — live agents in this workspace.\nLeave it out or send `null` for a key that reaches the whole\nworkspace. An unknown id answers `400 API_KEY_AGENT_UNKNOWN`\nand an empty list `400 API_KEY_REQUEST_INVALID`.\n","uniqueKey":"agent_ids.oneOf.1","typeLabel":"null"}],"uniqueKey":"agent_ids","typeLabel":"string\u003cuuid>[] | null"},"expires_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the key stops working: an ISO 8601 date-time with a time\nzone, in the future. Leave it out or send `null` for a key that\nworks until it is revoked. A past moment or a date without a\ntime zone answers `400 API_KEY_REQUEST_INVALID`.\n","example":"2026-12-31T23:59:59Z","uniqueKey":"expires_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the key stops working: an ISO 8601 date-time with a time\nzone, in the future. Leave it out or send `null` for a key that\nworks until it is revoked. A past moment or a date without a\ntime zone answers `400 API_KEY_REQUEST_INVALID`.\n","example":"2026-12-31T23:59:59Z","uniqueKey":"expires_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"expires_at","typeLabel":"string\u003cdate-time> | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"Nightly lead sync","scopes":["leads:read","leads:manage"],"agent_ids":["3c90c3cc-0d44-4b50-8888-8dd25736052a"],"expires_at":"2026-12-31T23:59:59Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"e79e2a2b-2e63-48fb-b005-53a1cac1dfe2":{"description":"Key issued. The only response that contains the secret.","content":{"application/json":{"schema":{"type":"object","description":"An API key belonging to your workspace. The secret itself is stored only\nas a SHA-256 hash and is returned exactly once, by `POST /api-keys`; no\nread ever returns it. `prefix` is the first 16 characters of the secret\nand is what identifies a key in the dashboard list.\n","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","description":"What you called the key. Unique among this workspace's active keys, compared without regard to case.","example":"Nightly lead sync","uniqueKey":"name","typeLabel":"string"},"prefix":{"type":"string","description":"First 16 characters of the key, enough to tell two keys apart. Never the whole secret.","example":"ypr_live_9f2c41a","uniqueKey":"prefix","typeLabel":"string"},"scopes":{"type":"array","items":{"type":"string","uniqueKey":"scopes.items.[INDEX]","typeLabel":"string"},"example":["leads:read","leads:manage"],"uniqueKey":"scopes","typeLabel":"string[]"},"agent_ids":{"oneOf":[{"type":"array","items":{"type":"string","format":"uuid","uniqueKey":"agent_ids.oneOf.0.items.[INDEX]","typeLabel":"string\u003cuuid>"},"description":"The agents this key is limited to, or `null` for a key that reaches\nthe whole workspace. A limited key reaches those agents, their calls,\nthe leads they called (read only), their spend, their deliveries and\ntheir campaigns, and calls only from numbers those agents answer or\ncall from; everything the workspace shares answers\n`403 API_KEY_AGENT_SCOPED`, and naming another agent answers\n`403 AGENT_OUTSIDE_KEY_SCOPE`.\n","example":null,"uniqueKey":"agent_ids.oneOf.0","typeLabel":"string\u003cuuid>[]"},{"type":"null","items":{"type":"string","format":"uuid"},"description":"The agents this key is limited to, or `null` for a key that reaches\nthe whole workspace. A limited key reaches those agents, their calls,\nthe leads they called (read only), their spend, their deliveries and\ntheir campaigns, and calls only from numbers those agents answer or\ncall from; everything the workspace shares answers\n`403 API_KEY_AGENT_SCOPED`, and naming another agent answers\n`403 AGENT_OUTSIDE_KEY_SCOPE`.\n","example":null,"uniqueKey":"agent_ids.oneOf.1","typeLabel":"null"}],"uniqueKey":"agent_ids","typeLabel":"string\u003cuuid>[] | null"},"agents":{"oneOf":[{"type":"array","description":"The same agents as `agent_ids`, in the same order, each with its\nname — so a read says which client a limited key reaches. An\narchived agent keeps its name; an agent that no longer exists has\n`name: null`. `null` for a key that reaches the whole workspace.\n","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"agents.oneOf.0.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"name":{"oneOf":[{"type":"string","uniqueKey":"agents.oneOf.0.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"agents.oneOf.0.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"uniqueKey":"agents.oneOf.0.items.[INDEX].name","typeLabel":"string | null"}},"uniqueKey":"agents.oneOf.0.items.[INDEX]","typeLabel":"object"},"example":null,"uniqueKey":"agents.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"The same agents as `agent_ids`, in the same order, each with its\nname — so a read says which client a limited key reaches. An\narchived agent keeps its name; an agent that no longer exists has\n`name: null`. `null` for a key that reaches the whole workspace.\n","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"oneOf":[{"type":"string"},{"type":"null"}]}}},"example":null,"uniqueKey":"agents.oneOf.1","typeLabel":"null"}],"uniqueKey":"agents","typeLabel":"object[] | null"},"created_at":{"type":"string","format":"date-time","uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"expires_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the key stops working, or `null` for a key that works until it\nis revoked. Past this moment every request made with it answers\n`401 EXPIRED_KEY`; the key stays listed until it is revoked.\n","example":null,"uniqueKey":"expires_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the key stops working, or `null` for a key that works until it\nis revoked. Past this moment every request made with it answers\n`401 EXPIRED_KEY`; the key stays listed until it is revoked.\n","example":null,"uniqueKey":"expires_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"expires_at","typeLabel":"string\u003cdate-time> | null"},"last_used_at":{"oneOf":[{"type":"string","format":"date-time","description":"When this key last authenticated a request. `null` if it never has.","uniqueKey":"last_used_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When this key last authenticated a request. `null` if it never has.","uniqueKey":"last_used_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"last_used_at","typeLabel":"string\u003cdate-time> | null"},"key":{"type":"string","description":"The full secret. This is the only response that ever contains it —\nstore it before you do anything else. If you lose it, revoke the\nkey and issue another.\n","example":"ypr_live_9f2c41a7b0e3…","uniqueKey":"key","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"Nightly lead sync","prefix":"ypr_live_9f2c41a","scopes":["leads:read","leads:manage"],"agent_ids":null,"agents":null,"created_at":"2023-11-07T05:31:56Z","expires_at":null,"last_used_at":"2023-11-07T05:31:56Z","key":"ypr_live_9f2c41a7b0e3…"}}},"exampleType":"generated"}},"exampleType":"generated"},"8bf70f5e-3259-4d89-a230-cdf677ef90ac":{"description":"API_KEY_REQUEST_INVALID - missing name, missing or empty scopes, an expires_at that is not a future date-time with a time zone, scopes a key limited by agent_ids could never use (agents:create, tools:create and the other workspace-wide scopes, each named), or a field this endpoint does not take (the message names it; no key is issued). API_KEY_SCOPE_UNKNOWN - a scope that does not exist. API_KEY_AGENT_UNKNOWN - an agent_ids entry that is not a live agent here.","content":{"application/json":{"schema":{"type":"object","required":["error","code"],"description":"Every error response - the secret-key API and the browser data plane alike - carries a\nhuman-readable `error` and a stable machine `code`, and a refusal that names what is\nwrong with the request carries `issues[]` too. Branch on `code`, never on the `error`\ntext. A refusal that names nothing more specific carries the code its status means:\n`BAD_REQUEST` (400), `UNAUTHORIZED` (401, the browser data plane; the secret-key API\nanswers `MISSING_KEY`, `INVALID_KEY` or `EXPIRED_KEY`), `BILLING_ERROR` (402),\n`FORBIDDEN` (403), `NOT_FOUND` (404), `METHOD_NOT_ALLOWED` (405), `CONFLICT` (409),\n`GONE` (410), `PAYLOAD_TOO_LARGE` (413), `UNSUPPORTED_MEDIA_TYPE` (415),\n`UNPROCESSABLE_REQUEST` (422), `RATE_LIMIT` (429), `INTERNAL_ERROR` (500),\n`UPSTREAM_ERROR` (502), `SERVICE_UNAVAILABLE` (503), `UPSTREAM_TIMEOUT` (504). Some\nrefusals add members of their own beside these (a call request's `status`, a workflow's\n`current_version`); the operation says which.\n","properties":{"error":{"type":"string","description":"The refusal, in one sentence for a person. Its wording may change.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"The stable code to branch on.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"issues":{"type":"array","description":"Each thing at fault, on a 400 or 422 that names them: every query parameter or body field, not just the first. `path` is the parameter's name or the field's location.\n","items":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"query_param_unknown, query_param_repeated, query_param_blank, query_param_invalid, field_unknown, field_required, field_invalid, or the route's own word.","isRequired":true,"uniqueKey":"issues.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"issues.items.[INDEX].message","typeLabel":"string"},"path":{"type":"string","uniqueKey":"issues.items.[INDEX].path","typeLabel":"string"}},"uniqueKey":"issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"issues","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"\u003cstring>","issues":[{"code":"\u003cstring>","message":"\u003cstring>","path":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"fe220556-d8d2-4881-9bc1-5b65faa2b3c9":{"description":"A requested scope is beyond the calling key, or is `api_keys:manage`","content":{"application/json":{"schema":{"type":"object","required":["error","code"],"description":"Every error response - the secret-key API and the browser data plane alike - carries a\nhuman-readable `error` and a stable machine `code`, and a refusal that names what is\nwrong with the request carries `issues[]` too. Branch on `code`, never on the `error`\ntext. A refusal that names nothing more specific carries the code its status means:\n`BAD_REQUEST` (400), `UNAUTHORIZED` (401, the browser data plane; the secret-key API\nanswers `MISSING_KEY`, `INVALID_KEY` or `EXPIRED_KEY`), `BILLING_ERROR` (402),\n`FORBIDDEN` (403), `NOT_FOUND` (404), `METHOD_NOT_ALLOWED` (405), `CONFLICT` (409),\n`GONE` (410), `PAYLOAD_TOO_LARGE` (413), `UNSUPPORTED_MEDIA_TYPE` (415),\n`UNPROCESSABLE_REQUEST` (422), `RATE_LIMIT` (429), `INTERNAL_ERROR` (500),\n`UPSTREAM_ERROR` (502), `SERVICE_UNAVAILABLE` (503), `UPSTREAM_TIMEOUT` (504). Some\nrefusals add members of their own beside these (a call request's `status`, a workflow's\n`current_version`); the operation says which.\n","properties":{"error":{"type":"string","description":"The refusal, in one sentence for a person. Its wording may change.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"The stable code to branch on.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"issues":{"type":"array","description":"Each thing at fault, on a 400 or 422 that names them: every query parameter or body field, not just the first. `path` is the parameter's name or the field's location.\n","items":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"query_param_unknown, query_param_repeated, query_param_blank, query_param_invalid, field_unknown, field_required, field_invalid, or the route's own word.","isRequired":true,"uniqueKey":"issues.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"issues.items.[INDEX].message","typeLabel":"string"},"path":{"type":"string","uniqueKey":"issues.items.[INDEX].path","typeLabel":"string"}},"uniqueKey":"issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"issues","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"\u003cstring>","issues":[{"code":"\u003cstring>","message":"\u003cstring>","path":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"73333029-8cfa-4cfe-bb05-bfbc5efcf4c4":{"description":"API_KEY_NAME_TAKEN - an active key of that name, compared without regard to case, already exists in this workspace; the message names it as it is spelled. Two creates sent at once under one spelling get one key and one 409.","content":{"application/json":{"schema":{"type":"object","required":["error","code"],"description":"Every error response - the secret-key API and the browser data plane alike - carries a\nhuman-readable `error` and a stable machine `code`, and a refusal that names what is\nwrong with the request carries `issues[]` too. Branch on `code`, never on the `error`\ntext. A refusal that names nothing more specific carries the code its status means:\n`BAD_REQUEST` (400), `UNAUTHORIZED` (401, the browser data plane; the secret-key API\nanswers `MISSING_KEY`, `INVALID_KEY` or `EXPIRED_KEY`), `BILLING_ERROR` (402),\n`FORBIDDEN` (403), `NOT_FOUND` (404), `METHOD_NOT_ALLOWED` (405), `CONFLICT` (409),\n`GONE` (410), `PAYLOAD_TOO_LARGE` (413), `UNSUPPORTED_MEDIA_TYPE` (415),\n`UNPROCESSABLE_REQUEST` (422), `RATE_LIMIT` (429), `INTERNAL_ERROR` (500),\n`UPSTREAM_ERROR` (502), `SERVICE_UNAVAILABLE` (503), `UPSTREAM_TIMEOUT` (504). Some\nrefusals add members of their own beside these (a call request's `status`, a workflow's\n`current_version`); the operation says which.\n","properties":{"error":{"type":"string","description":"The refusal, in one sentence for a person. Its wording may change.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"The stable code to branch on.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"issues":{"type":"array","description":"Each thing at fault, on a 400 or 422 that names them: every query parameter or body field, not just the first. `path` is the parameter's name or the field's location.\n","items":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"query_param_unknown, query_param_repeated, query_param_blank, query_param_invalid, field_unknown, field_required, field_invalid, or the route's own word.","isRequired":true,"uniqueKey":"issues.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"issues.items.[INDEX].message","typeLabel":"string"},"path":{"type":"string","uniqueKey":"issues.items.[INDEX].path","typeLabel":"string"}},"uniqueKey":"issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"issues","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"\u003cstring>","issues":[{"code":"\u003cstring>","message":"\u003cstring>","path":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"1ff3ea75-f15f-4ca7-a478-01bafdf97c26":{"description":"The key store could not be written. No key was created — retry.","content":{"application/json":{"schema":{"type":"object","required":["error","code"],"description":"Every error response - the secret-key API and the browser data plane alike - carries a\nhuman-readable `error` and a stable machine `code`, and a refusal that names what is\nwrong with the request carries `issues[]` too. Branch on `code`, never on the `error`\ntext. A refusal that names nothing more specific carries the code its status means:\n`BAD_REQUEST` (400), `UNAUTHORIZED` (401, the browser data plane; the secret-key API\nanswers `MISSING_KEY`, `INVALID_KEY` or `EXPIRED_KEY`), `BILLING_ERROR` (402),\n`FORBIDDEN` (403), `NOT_FOUND` (404), `METHOD_NOT_ALLOWED` (405), `CONFLICT` (409),\n`GONE` (410), `PAYLOAD_TOO_LARGE` (413), `UNSUPPORTED_MEDIA_TYPE` (415),\n`UNPROCESSABLE_REQUEST` (422), `RATE_LIMIT` (429), `INTERNAL_ERROR` (500),\n`UPSTREAM_ERROR` (502), `SERVICE_UNAVAILABLE` (503), `UPSTREAM_TIMEOUT` (504). Some\nrefusals add members of their own beside these (a call request's `status`, a workflow's\n`current_version`); the operation says which.\n","properties":{"error":{"type":"string","description":"The refusal, in one sentence for a person. Its wording may change.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"The stable code to branch on.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"issues":{"type":"array","description":"Each thing at fault, on a 400 or 422 that names them: every query parameter or body field, not just the first. `path` is the parameter's name or the field's location.\n","items":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"query_param_unknown, query_param_repeated, query_param_blank, query_param_invalid, field_unknown, field_required, field_invalid, or the route's own word.","isRequired":true,"uniqueKey":"issues.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"issues.items.[INDEX].message","typeLabel":"string"},"path":{"type":"string","uniqueKey":"issues.items.[INDEX].path","typeLabel":"string"}},"uniqueKey":"issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"issues","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"\u003cstring>","issues":[{"code":"\u003cstring>","message":"\u003cstring>","path":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"2767439e-f0c6-4cd4-a450-ba11a6ab8311":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Your Yappr API key (e.g. `ypr_live_...`). Generate one in the dashboard under **Settings → API Keys**. No key is `401 MISSING_KEY`; a key that is not one of ours, or is revoked, is `401 INVALID_KEY`; an expired one is `401 EXPIRED_KEY`. A valid key without the scope an operation needs is `403 INSUFFICIENT_SCOPE` on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's `RATE_LIMIT` asks for what is left of the minute, a route's daily cap (`RATE_LIMITED`) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is `404 ROUTE_NOT_FOUND`, and a method a served path does not take is `405 METHOD_NOT_ALLOWED` with an `Allow` header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (`POST /calls/` is `POST /calls`) and refused where it can (`GET /calls/`). A doubled slash inside a path is merged into one before the request reaches the API (`GET //calls` is `GET /calls`).","scopes":[],"schemeName":"apiKey"}}},"servers":{"dc0c5f7d-c0c3-40b9-9c53-ce2239f5b67d":{"url":"https://api.goyappr.com","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Your Yappr API key (e.g. `ypr_live_...`). Generate one in the dashboard under **Settings → API Keys**. No key is `401 MISSING_KEY`; a key that is not one of ours, or is revoked, is `401 INVALID_KEY`; an expired one is `401 EXPIRED_KEY`. A valid key without the scope an operation needs is `403 INSUFFICIENT_SCOPE` on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's `RATE_LIMIT` asks for what is left of the minute, a route's daily cap (`RATE_LIMITED`) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is `404 ROUTE_NOT_FOUND`, and a method a served path does not take is `405 METHOD_NOT_ALLOWED` with an `Allow` header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (`POST /calls/` is `POST /calls`) and refused where it can (`GET /calls/`). A doubled slash inside a path is merged into one before the request reaches the API (`GET //calls` is `GET /calls`).","scopes":[],"schemeName":"apiKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Your Yappr API key (e.g. `ypr_live_...`). Generate one in the dashboard under **Settings → API Keys**. No key is `401 MISSING_KEY`; a key that is not one of ours, or is revoked, is `401 INVALID_KEY`; an expired one is `401 EXPIRED_KEY`. A valid key without the scope an operation needs is `403 INSUFFICIENT_SCOPE` on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's `RATE_LIMIT` asks for what is left of the minute, a route's daily cap (`RATE_LIMITED`) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is `404 ROUTE_NOT_FOUND`, and a method a served path does not take is `405 METHOD_NOT_ALLOWED` with an `Allow` header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (`POST /calls/` is `POST /calls`) and refused where it can (`GET /calls/`). A doubled slash inside a path is merged into one before the request reaches the API (`GET //calls` is `GET /calls`).","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"apiKey","name":"Authorization"}],"title":"apiKey"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"yappr","siteName":"Yappr","title":"Issue an API key - Yappr","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T15:44:24.993Z","originalFileLocation":"api-reference/api-keys/create.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=\"Issues a new key and returns its secret once. There is no way to read it again. Two rules decide what the new key may hold: - Subset. You can only grant scopes the calling key itself holds. Asking for anything more answers 403 API_KEY_SCOPE_ESCALATION, naming the scopes that went beyond. api_keys:manage includes api_keys:read: a key holding manage can grant read even when read is not ticked on it, because it already reads the list. - api_keys:manage is never granted here. A key issued through the API cannot issue keys of its own, even when the calling key can. Ask for it and the answer is 403 API_KEY_MANAGE_NOT_DELEGABLE. Grant it in the dashboard, under Settings → API keys. scopes is required and has no default: a key gets exactly what you ask for. Requires api_keys:manage, which only a key created in the dashboard can hold: there is no bootstrap endpoint, so the first key of a workspace is always made by a person under Settings → API Keys.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Yappr\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/yappr/-dhyiEDTEuUg9xPr/_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/yappr/-dhyiEDTEuUg9xPr/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/yappr/-dhyiEDTEuUg9xPr/_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/yappr/-dhyiEDTEuUg9xPr/_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/yappr/-dhyiEDTEuUg9xPr/_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/yappr/-dhyiEDTEuUg9xPr/_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/yappr/-dhyiEDTEuUg9xPr/_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/yappr/-dhyiEDTEuUg9xPr/_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/yappr/-dhyiEDTEuUg9xPr/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Issue an API key - Yappr\">\u003cmeta data-mint-head property=\"og:description\" content=\"Issues a new key and returns its secret once. There is no way to read it again. Two rules decide what the new key may hold: - Subset. You can only grant scopes the calling key itself holds. Asking for anything more answers 403 API_KEY_SCOPE_ESCALATION, naming the scopes that went beyond. api_keys:manage includes api_keys:read: a key holding manage can grant read even when read is not ticked on it, because it already reads the list. - api_keys:manage is never granted here. A key issued through the API cannot issue keys of its own, even when the calling key can. Ask for it and the answer is 403 API_KEY_MANAGE_NOT_DELEGABLE. Grant it in the dashboard, under Settings → API keys. scopes is required and has no default: a key gets exactly what you ask for. Requires api_keys:manage, which only a key created in the dashboard can hold: there is no bootstrap endpoint, so the first key of a workspace is always made by a person under Settings → API Keys.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Yappr\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.goyappr.com/api-reference/api-keys/create\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://yappr.mintlify.site/_mintlify/api/og/v2?division=API+Keys\u0026amp;title=Issue+an+API+key\u0026amp;description=Issues+a+new+key+and+returns+its+secret+**once**.+There+is+no+way+to+read%0Ait+again.%0A%0ATwo+rules+decide+what+the+new+key+may+hold%3A%0A%0A-+**Subset.**+You+can+only+gra\u0026amp;theme=1423bf5e3b005ceb227321bc\u0026amp;signature=f008330954f99edd7c014777a6ed796aaf8704424246d2e13f51ce91063b3fdc\">\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=\"Issue an API key - Yappr\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Issues a new key and returns its secret once. There is no way to read it again. Two rules decide what the new key may hold: - Subset. You can only grant scopes the calling key itself holds. Asking for anything more answers 403 API_KEY_SCOPE_ESCALATION, naming the scopes that went beyond. api_keys:manage includes api_keys:read: a key holding manage can grant read even when read is not ticked on it, because it already reads the list. - api_keys:manage is never granted here. A key issued through the API cannot issue keys of its own, even when the calling key can. Ask for it and the answer is 403 API_KEY_MANAGE_NOT_DELEGABLE. Grant it in the dashboard, under Settings → API keys. scopes is required and has no default: a key gets exactly what you ask for. Requires api_keys:manage, which only a key created in the dashboard can hold: there is no bootstrap endpoint, so the first key of a workspace is always made by a person under Settings → API Keys.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://yappr.mintlify.site/_mintlify/api/og/v2?division=API+Keys\u0026amp;title=Issue+an+API+key\u0026amp;description=Issues+a+new+key+and+returns+its+secret+**once**.+There+is+no+way+to+read%0Ait+again.%0A%0ATwo+rules+decide+what+the+new+key+may+hold%3A%0A%0A-+**Subset.**+You+can+only+gra\u0026amp;theme=1423bf5e3b005ceb227321bc\u0026amp;signature=f008330954f99edd7c014777a6ed796aaf8704424246d2e13f51ce91063b3fdc\">\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/yappr/-dhyiEDTEuUg9xPr/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Yappr\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366f1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.goyappr.com/api-reference/api-keys/create\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/api-keys/create.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.goyappr.com/#organization\",\"name\":\"Yappr\",\"url\":\"https://docs.goyappr.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/yappr/E1AQ46GZ-5iPcyPp/logo/light.svg?fit=max\u0026auto=format\u0026n=E1AQ46GZ-5iPcyPp\u0026q=85\u0026s=a117ff3aa08c2017e8d58b0da5be882f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.goyappr.com#website\",\"name\":\"Yappr\",\"url\":\"https://docs.goyappr.com\",\"publisher\":{\"@id\":\"https://docs.goyappr.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.goyappr.com/api-reference/api-keys/create#webpage\",\"url\":\"https://docs.goyappr.com/api-reference/api-keys/create\",\"name\":\"Issue an API key\",\"description\":\"Issues a new key and returns its secret once. There is no way to read it again. Two rules decide what the new key may hold: - Subset. You can only grant scopes the calling key itself holds. Asking for anything more answers 403 API_KEY_SCOPE_ESCALATION, naming the scopes that went beyond. api_keys:manage includes api_keys:read: a key holding manage can grant read even when read is not ticked on it, because it already reads the list. - api_keys:manage is never granted here. A key issued through the API cannot issue keys of its own, even when the calling key can. Ask for it and the answer is 403 API_KEY_MANAGE_NOT_DELEGABLE. Grant it in the dashboard, under Settings → API keys. scopes is required and has no default: a key gets exactly what you ask for. Requires api_keys:manage, which only a key created in the dashboard can hold: there is no bootstrap endpoint, so the first key of a workspace is always made by a person under Settings → API Keys.\",\"dateModified\":\"2026-11-12T15:44:24.993Z\",\"isPartOf\":{\"@id\":\"https://docs.goyappr.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.goyappr.com/api-reference/api-keys/create#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.goyappr.com/api-reference/api-keys/create#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Keys\",\"item\":\"https://docs.goyappr.com/api-reference/api-keys/list\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Issue an API key\",\"item\":\"https://docs.goyappr.com/api-reference/api-keys/create\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.goyappr.com/api-reference/api-keys/create#apireference\",\"headline\":\"Issue an API key\",\"name\":\"Issue an API key\",\"description\":\"Issues a new key and returns its secret once. There is no way to read it again. Two rules decide what the new key may hold: - Subset. You can only grant scopes the calling key itself holds. Asking for anything more answers 403 API_KEY_SCOPE_ESCALATION, naming the scopes that went beyond. api_keys:manage includes api_keys:read: a key holding manage can grant read even when read is not ticked on it, because it already reads the list. - api_keys:manage is never granted here. A key issued through the API cannot issue keys of its own, even when the calling key can. Ask for it and the answer is 403 API_KEY_MANAGE_NOT_DELEGABLE. Grant it in the dashboard, under Settings → API keys. scopes is required and has no default: a key gets exactly what you ask for. Requires api_keys:manage, which only a key created in the dashboard can hold: there is no bootstrap endpoint, so the first key of a workspace is always made by a person under Settings → API Keys.\",\"url\":\"https://docs.goyappr.com/api-reference/api-keys/create\",\"mainEntityOfPage\":{\"@id\":\"https://docs.goyappr.com/api-reference/api-keys/create#webpage\"},\"dateModified\":\"2026-11-12T15:44:24.993Z\",\"publisher\":{\"@id\":\"https://docs.goyappr.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.goyappr.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Yappr\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Yappr\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/api-keys/create.md","siteName":"Yappr","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"},{"title":"Connect through MCP","href":"/api-reference/mcp/connect"},{"title":"Error Codes","href":"/api-reference/errors"},{"title":"Report an issue","openapi":"POST /report-issue","href":"/api-reference/report-issue"}]},{"group":"Billing","pages":[{"title":"Get Billing Status","openapi":"GET /billing","href":"/api-reference/billing/get-status"},{"title":"Get Billing Rates","openapi":"GET /billing/rates","href":"/api-reference/billing/rates"},{"title":"Set Spending Limit","openapi":"PATCH /billing","href":"/api-reference/billing/spending-limit"},{"title":"Setup Payment Method","openapi":"POST /billing/setup","href":"/api-reference/billing/setup-payment"},{"title":"Top Up Credits","openapi":"POST /billing/topup","href":"/api-reference/billing/topup"},{"title":"Billing Consumption","openapi":"GET /billing/consumption","href":"/api-reference/billing/consumption"},{"title":"Billing Transactions","openapi":"GET /billing/transactions","href":"/api-reference/billing/transactions"},{"title":"Get Billing Transaction","openapi":"GET /billing/transactions/{id}","href":"/api-reference/billing/transaction"},{"title":"Get Billing Details","openapi":"GET /billing/details","href":"/api-reference/billing/details"},{"title":"Update Billing Details","openapi":"PATCH /billing/details","href":"/api-reference/billing/update-details"},{"title":"List Invoices","openapi":"GET /billing/invoices","href":"/api-reference/billing/invoices"}]},{"group":"Agents","pages":[{"title":"List Agents","openapi":"GET /agents","href":"/api-reference/agents/list"},{"title":"Create Agent","openapi":"POST /agents","href":"/api-reference/agents/create"},{"title":"Duplicate Agent","openapi":"POST /agents/{id}/duplicate","href":"/api-reference/agents/duplicate"},{"title":"Test an Agent by Phone","openapi":"POST /agents/{id}/test-call","href":"/api-reference/agents/test-call"},{"title":"Which Line Rings a Test Call","openapi":"GET /agents/{id}/test-call","href":"/api-reference/agents/test-call-caller"},{"title":"Get Agent","openapi":"GET /agents/{id}","href":"/api-reference/agents/get"},{"title":"Update Agent","openapi":"PATCH /agents/{id}","href":"/api-reference/agents/update"},{"title":"Read workflow agent settings","openapi":"GET /agents/{id}/settings","href":"/api-reference/agents/settings"},{"title":"Idle reminders","href":"/api-reference/agents/idle-reminders"},{"title":"List an agent's tools \u0026 integrations","openapi":"GET /agents/{id}/tools-and-integrations","href":"/api-reference/agents/tools-and-integrations"},{"title":"List an agent's integrations","openapi":"GET /agents/{id}/integrations","href":"/api-reference/agents/integrations-list"},{"title":"Give an agent a connected app","openapi":"POST /agents/{id}/integrations","href":"/api-reference/agents/integrations-add"},{"title":"Change an integration's actions","openapi":"PATCH /agents/{id}/integrations/{integration_id}","href":"/api-reference/agents/integrations-update"},{"title":"Stop an agent using an app","openapi":"DELETE /agents/{id}/integrations/{integration_id}","href":"/api-reference/agents/integrations-remove"},{"title":"Dry-run Extraction","openapi":"POST /agents/{id}/extraction/dry-run","href":"/api-reference/agents/extraction-dry-run"},{"title":"Remove Agent","openapi":"DELETE /agents/{id}","href":"/api-reference/agents/delete"},{"title":"Models","href":"/api-reference/agents/models"},{"title":"Languages","href":"/api-reference/agents/languages"},{"title":"Voices","href":"/api-reference/agents/voices"},{"title":"Flow Config Schema","href":"/api-reference/agents/flow-config-schema"}]},{"group":"Flow Agents","pages":[{"title":"List Flow Versions","openapi":"GET /agents/{id}/flow/versions","href":"/api-reference/flows/list-versions"},{"title":"Restore Flow Version","openapi":"POST /agents/{id}/flow/restore","href":"/api-reference/flows/restore-version"},{"title":"Test a Flow","openapi":"POST /agents/{id}/flow/test","href":"/api-reference/flows/test"}]},{"group":"Workflows","pages":[{"title":"Read workflow","openapi":"GET /agents/{id}/workflow","href":"/api-reference/workflows/get"},{"title":"Save workflow draft","openapi":"PUT /agents/{id}/workflow","href":"/api-reference/workflows/save"},{"title":"Point bindings at other tools","openapi":"POST /agents/{id}/workflow/rebind","href":"/api-reference/workflows/rebind"},{"title":"Check workflow","openapi":"POST /agents/{id}/workflow/validate","href":"/api-reference/workflows/validate"},{"title":"Publish workflow","openapi":"POST /agents/{id}/workflow/publish","href":"/api-reference/workflows/publish"},{"title":"List workflow versions","openapi":"GET /agents/{id}/workflow/versions","href":"/api-reference/workflows/versions"},{"title":"Get workflow version","openapi":"GET /agents/{id}/workflow/versions/{version_id}","href":"/api-reference/workflows/version"},{"title":"Restore workflow version","openapi":"POST /agents/{id}/workflow/restore","href":"/api-reference/workflows/restore"},{"title":"Teach an agent from a test call","openapi":"POST /agents/{id}/workflow/train","href":"/api-reference/workflows/train"},{"title":"Read workflow tool catalog","openapi":"GET /tools/workflow-catalog","href":"/api-reference/workflows/catalog"},{"title":"Trigger events","href":"/api-reference/workflows/events"},{"title":"Opening line from a Before step","href":"/api-reference/workflows/greeting-from-before"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","href":"/api-reference/webhooks"},{"title":"List Deliveries","openapi":"GET /deliveries","href":"/api-reference/deliveries/list"},{"title":"Get Delivery","openapi":"GET /deliveries/{id}","href":"/api-reference/deliveries/get"},{"title":"Retry Delivery","openapi":"POST /deliveries/{id}/retry","href":"/api-reference/deliveries/retry"}]},{"group":"Tools \u0026 integrations","pages":[{"group":"Connected accounts","pages":[{"title":"List account connection options","openapi":"GET /tool-apps/connection-options","href":"/api-reference/tool-connections/apps"},{"title":"List connected accounts","openapi":"GET /tool-connections","href":"/api-reference/tool-connections/list"},{"title":"Get connection readiness","openapi":"GET /tool-connections/{id}","href":"/api-reference/tool-connections/get"},{"title":"Connect a workspace account","openapi":"POST /tool-connections","href":"/api-reference/tool-connections/connect"},{"title":"Read authorization status","openapi":"GET /tool-connection-auth-attempts/{id}","href":"/api-reference/tool-connections/auth-attempt"},{"title":"Cancel an authorization attempt","openapi":"POST /tool-connections/attempts/{id}/cancel","href":"/api-reference/tool-connections/cancel-attempt"},{"title":"Connect a replacement account","openapi":"POST /tool-connections/{id}/reconnect","href":"/api-reference/tool-connections/reconnect"},{"title":"Disconnect an account","openapi":"DELETE /tool-connections/{id}","href":"/api-reference/tool-connections/disconnect"},{"title":"Rename an account","openapi":"PATCH /tool-connections/{id}","href":"/api-reference/tool-connections/rename"},{"title":"What a connected app can do","openapi":"GET /tool-connections/{id}/actions","href":"/api-reference/tool-connections/actions"},{"title":"Make an app's actions ready","openapi":"POST /tool-connections/{id}/actions/prepare","href":"/api-reference/tool-connections/prepare-actions"},{"title":"List an account's choices for an input","openapi":"GET /tool-connections/{id}/options/{resource}","href":"/api-reference/tool-connections/options"},{"title":"Check that an account works","openapi":"POST /tool-connections/{id}/check","href":"/api-reference/tool-connections/check"},{"title":"The agents using an app","openapi":"GET /tool-connections/{id}/agents","href":"/api-reference/tool-connections/agents"},{"title":"Take an account off the list","openapi":"POST /tool-connections/{id}/remove","href":"/api-reference/tool-connections/remove"},{"title":"Clear the attempts nobody finished","openapi":"POST /tool-connections/cleanup","href":"/api-reference/tool-connections/cleanup"}]},{"group":"Tools","pages":[{"title":"List Tools","openapi":"GET /tools","href":"/api-reference/tools/list"},{"title":"Create Tool","openapi":"POST /tools","href":"/api-reference/tools/create"},{"title":"Discover Apps","openapi":"GET /tool-apps","href":"/api-reference/tools/apps"},{"title":"Get App Versions","openapi":"GET /tool-apps/{slug}","href":"/api-reference/tools/app"},{"title":"Discover Versioned Actions","openapi":"GET /tool-apps/{slug}/actions","href":"/api-reference/tools/actions"},{"title":"Get Full Action Schemas","openapi":"GET /tool-apps/{slug}/actions/{action}","href":"/api-reference/tools/action"},{"title":"Get Tool","openapi":"GET /tools/{id}","href":"/api-reference/tools/get"},{"title":"Get Current Tool Schemas","openapi":"GET /tools/{id}/schema","href":"/api-reference/tools/schema"},{"title":"List Tool Bindings","openapi":"GET /tools/{id}/bindings","href":"/api-reference/tools/bindings"},{"title":"List Tool Contract Revisions","openapi":"GET /tools/{id}/workflow-revisions","href":"/api-reference/tools/revisions"},{"title":"Add a Tool Contract Revision","openapi":"POST /tools/{id}/workflow-revisions","href":"/api-reference/tools/create-revision"},{"title":"Update Tool","openapi":"PATCH /tools/{id}","href":"/api-reference/tools/update"},{"title":"Archive Tool","openapi":"DELETE /tools/{id}","href":"/api-reference/tools/delete"},{"title":"Restore Tool","openapi":"POST /tools/{id}/restore","href":"/api-reference/tools/restore"},{"title":"Attach Tool to Agent","openapi":"POST /tools/attach","href":"/api-reference/tools/attach"},{"title":"Detach Tool from Agent","openapi":"POST /tools/detach","href":"/api-reference/tools/detach"},{"title":"Test Saved Tool","openapi":"POST /tools/{id}/test","href":"/api-reference/tools/test"},{"title":"Get Saved Tool Test","openapi":"GET /tools/{id}/tests/{test_id}","href":"/api-reference/tools/test-get"},{"title":"Cancel Tool Test","openapi":"POST /tools/{id}/tests/{test_id}/cancel","href":"/api-reference/tools/test-cancel"}]}]},{"group":"Phone Numbers","pages":[{"title":"List Owned Numbers","openapi":"GET /phone-numbers","href":"/api-reference/phone-numbers/list"},{"title":"Search Available Numbers","openapi":"POST /phone-numbers/search","href":"/api-reference/phone-numbers/search"},{"title":"Purchase Number","openapi":"POST /phone-numbers/purchase","href":"/api-reference/phone-numbers/purchase"},{"title":"Update Number","openapi":"PATCH /phone-numbers/{id}","href":"/api-reference/phone-numbers/update"},{"title":"Configure Number","openapi":"POST /phone-numbers/configure","href":"/api-reference/phone-numbers/configure"},{"title":"Release Number","openapi":"POST /phone-numbers/{id}/release","href":"/api-reference/phone-numbers/release"},{"title":"Keep Number","openapi":"POST /phone-numbers/{id}/keep","href":"/api-reference/phone-numbers/keep"}]},{"group":"SIP Endpoints","pages":[{"title":"SIP Endpoints Status","openapi":"GET /sip-endpoints/status","href":"/api-reference/sip-endpoints/status"},{"title":"List SIP Endpoints","openapi":"GET /sip-endpoints","href":"/api-reference/sip-endpoints/list"},{"title":"Create SIP Endpoint","openapi":"POST /sip-endpoints","href":"/api-reference/sip-endpoints/create"},{"title":"Get SIP Endpoint","openapi":"GET /sip-endpoints/{id}","href":"/api-reference/sip-endpoints/get"},{"title":"Update SIP Endpoint","openapi":"PATCH /sip-endpoints/{id}","href":"/api-reference/sip-endpoints/update"},{"title":"Delete SIP Endpoint","openapi":"DELETE /sip-endpoints/{id}","href":"/api-reference/sip-endpoints/delete"},{"title":"Rotate SIP Endpoint Password","openapi":"POST /sip-endpoints/{id}/rotate-password","href":"/api-reference/sip-endpoints/rotate-password"}]},{"group":"Carrier accounts","pages":[{"title":"Carrier Accounts Status","openapi":"GET /carrier-accounts/status","href":"/api-reference/carrier-accounts/status"},{"title":"List Carrier Accounts","openapi":"GET /carrier-accounts","href":"/api-reference/carrier-accounts/list"},{"title":"Connect a Telnyx Account","openapi":"POST /carrier-accounts","href":"/api-reference/carrier-accounts/create"},{"title":"Get Carrier Account","openapi":"GET /carrier-accounts/{id}","href":"/api-reference/carrier-accounts/get"},{"title":"Update Carrier Account","openapi":"PATCH /carrier-accounts/{id}","href":"/api-reference/carrier-accounts/update"},{"title":"Disconnect Carrier Account","openapi":"DELETE /carrier-accounts/{id}","href":"/api-reference/carrier-accounts/delete"},{"title":"Choose the Call Control App","openapi":"POST /carrier-accounts/{id}/connection","href":"/api-reference/carrier-accounts/connection"},{"title":"Test Carrier Account","openapi":"POST /carrier-accounts/{id}/test","href":"/api-reference/carrier-accounts/test"},{"title":"Turn a Paused Account Back On","openapi":"POST /carrier-accounts/{id}/reactivate","href":"/api-reference/carrier-accounts/reactivate"},{"title":"Sync Numbers","openapi":"POST /carrier-accounts/{id}/sync","href":"/api-reference/carrier-accounts/sync"},{"title":"Add Number to Carrier Account","openapi":"POST /carrier-accounts/{id}/numbers","href":"/api-reference/carrier-accounts/add-number"},{"title":"Answer a Number's Calls in Yappr","openapi":"POST /carrier-accounts/{id}/numbers/{phone_number_id}/configure","href":"/api-reference/carrier-accounts/configure-number"},{"title":"Stop Answering a Number's Calls in Yappr","openapi":"DELETE /carrier-accounts/{id}/numbers/{phone_number_id}/configure","href":"/api-reference/carrier-accounts/restore-number"},{"title":"Remove Number from This Workspace","openapi":"DELETE /carrier-accounts/{id}/numbers/{phone_number_id}","href":"/api-reference/carrier-accounts/remove-number"}]},{"group":"Calls","pages":[{"title":"Create Outbound Call","openapi":"POST /calls","href":"/api-reference/calls/create"},{"title":"List Calls","openapi":"GET /calls","href":"/api-reference/calls/list"},{"title":"Export Calls","openapi":"GET /calls/export","href":"/api-reference/calls/export"},{"title":"Get Call","openapi":"GET /calls/{id}","href":"/api-reference/calls/get"},{"title":"End an Unopened Browser Session","openapi":"POST /calls/{id}/end","href":"/api-reference/calls/end"},{"title":"Get Call Recording","openapi":"GET /calls/{id}/recording","href":"/api-reference/calls/recording"},{"title":"Revoke Recording Links","openapi":"POST /calls/{id}/recording/revoke","href":"/api-reference/calls/recording-revoke"},{"title":"Create Web Call Request","openapi":"POST /call-requests","href":"/api-reference/calls/request-create"},{"title":"Get Call Request","openapi":"GET /call-requests/{id}","href":"/api-reference/calls/request-get"},{"title":"Start Web Call Request","openapi":"POST /call-requests/{id}/start","href":"/api-reference/calls/request-start"},{"title":"Cancel Call Request","openapi":"POST /call-requests/{id}/cancel","href":"/api-reference/calls/request-cancel"}]},{"group":"Browser calls","pages":[{"title":"TURN Credentials","openapi":"POST /turn-credentials","href":"/api-reference/web-call/turn-credentials"},{"title":"Connect a Browser Call","openapi":"POST /web-call","href":"/api-reference/web-call/offer"},{"title":"Cancel a Browser Session","openapi":"POST /web-call/cancel","href":"/api-reference/web-call/cancel"},{"title":"Create Browser Call Request","openapi":"POST /web-call/call-requests","href":"/api-reference/web-call/request-create"},{"title":"Poll Browser Call Request","openapi":"GET /web-call/call-requests/{id}","href":"/api-reference/web-call/request-get"},{"title":"Start Browser Call Request","openapi":"POST /web-call/call-requests/{id}/start","href":"/api-reference/web-call/request-start"},{"title":"Cancel Browser Call Request","openapi":"POST /web-call/call-requests/{id}/cancel","href":"/api-reference/web-call/request-cancel"}]},{"group":"Do Not Call","pages":[{"title":"List DNC entries","openapi":"GET /do-not-call","href":"/api-reference/do-not-call/list"},{"title":"Add to DNC list","openapi":"POST /do-not-call","href":"/api-reference/do-not-call/add"},{"title":"Get DNC entry","openapi":"GET /do-not-call/{id}","href":"/api-reference/do-not-call/get"},{"title":"Update DNC entry","openapi":"PATCH /do-not-call/{id}","href":"/api-reference/do-not-call/update"},{"title":"Remove from DNC list","openapi":"DELETE /do-not-call/{id}","href":"/api-reference/do-not-call/delete"}]},{"group":"API Keys","pages":[{"title":"List API keys","openapi":"GET /api-keys","description":"Every active API key in your workspace, newest first. The secret is\nnever returned — only `prefix`, which is its first 16 characters.\n`?revoked=true` lists the keys this workspace has revoked instead, newest\nrevocation first, each with `revoked_at` and who revoked it (`revoked_by`,\na person; `revoked_by_key`, a key): a revoked key stays on record and\nnever works again. `revoked_since` and `revoked_until` narrow that list\nto a range, and `pagination.next_cursor` continues it. Revocations are on\nrecord from 22 September 2026, and who revoked a key from 28 September 2026.\nWithout `limit` the answer holds every key,\nas it always has; `limit` and `offset` page it like any other list.\n\nRequires `api_keys:read`, or `api_keys:manage`, which reads the list\nas well. `api_keys:read` is read-only: a key holding it can audit the\ninventory and can neither issue nor revoke anything.\n","href":"/api-reference/api-keys/list"},{"title":"Issue an API key","openapi":"POST /api-keys","href":"/api-reference/api-keys/create"},{"title":"Get an API key","openapi":"GET /api-keys/{id}","description":"One active key, by id. Never returns the secret. For a key limited to\nsome agents, `agents` names each one. Requires `api_keys:read`, or\n`api_keys:manage`, which reads a key as well.\n","href":"/api-reference/api-keys/get"},{"title":"Revoke an API key","openapi":"DELETE /api-keys/{id}","href":"/api-reference/api-keys/delete"}]},{"group":"Call Windows","pages":[{"title":"Get call time windows","openapi":"GET /call-windows","href":"/api-reference/call-windows/get"},{"title":"Update call time windows","openapi":"PUT /call-windows","href":"/api-reference/call-windows/update"}]},{"group":"Dispositions","pages":[{"title":"List Dispositions","openapi":"GET /dispositions","href":"/api-reference/dispositions/list"},{"title":"Create Disposition","openapi":"POST /dispositions","href":"/api-reference/dispositions/create"},{"title":"Get Disposition","openapi":"GET /dispositions/{id}","href":"/api-reference/dispositions/get"},{"title":"Update Disposition","openapi":"PATCH /dispositions/{id}","href":"/api-reference/dispositions/update"},{"title":"Delete Disposition","openapi":"DELETE /dispositions/{id}","href":"/api-reference/dispositions/delete"}]},{"group":"Leads","pages":[{"title":"List Leads","openapi":"GET /leads","href":"/api-reference/leads/list"},{"title":"Create Lead","openapi":"POST /leads","href":"/api-reference/leads/create"},{"title":"Get Lead","openapi":"GET /leads/{id}","href":"/api-reference/leads/get"},{"title":"Update Lead","openapi":"PATCH /leads/{id}","href":"/api-reference/leads/update"},{"title":"Delete Lead","openapi":"DELETE /leads/{id}","href":"/api-reference/leads/delete"}]},{"group":"Lead Tags","pages":[{"title":"List Lead Tags","openapi":"GET /lead-tags","href":"/api-reference/lead-tags/list"},{"title":"Create Lead Tag","openapi":"POST /lead-tags","href":"/api-reference/lead-tags/create"},{"title":"Get Lead Tag","openapi":"GET /lead-tags/{id}","href":"/api-reference/lead-tags/get"},{"title":"Update Lead Tag","openapi":"PATCH /lead-tags/{id}","href":"/api-reference/lead-tags/update"},{"title":"Delete Lead Tag","openapi":"DELETE /lead-tags/{id}","href":"/api-reference/lead-tags/delete"}]},{"group":"Campaigns","pages":[{"title":"List campaigns","openapi":"GET /campaigns","href":"/api-reference/campaigns/list"},{"title":"Suggested campaign settings","openapi":"GET /campaigns/defaults","href":"/api-reference/campaigns/defaults"},{"title":"Create a campaign","openapi":"POST /campaigns","href":"/api-reference/campaigns/create"},{"title":"Get a campaign","openapi":"GET /campaigns/{id}","href":"/api-reference/campaigns/get"},{"title":"Update a campaign","openapi":"PATCH /campaigns/{id}","href":"/api-reference/campaigns/update"},{"title":"Archive a campaign","openapi":"DELETE /campaigns/{id}","href":"/api-reference/campaigns/archive"},{"title":"Restore a campaign","openapi":"POST /campaigns/{id}/restore","href":"/api-reference/campaigns/restore"},{"title":"Launch a campaign","openapi":"POST /campaigns/{id}/launch","href":"/api-reference/campaigns/launch"},{"title":"Pause a campaign","openapi":"POST /campaigns/{id}/pause","href":"/api-reference/campaigns/pause"},{"title":"Resume a campaign","openapi":"POST /campaigns/{id}/resume","href":"/api-reference/campaigns/resume"},{"title":"Stop a campaign","openapi":"POST /campaigns/{id}/stop","href":"/api-reference/campaigns/stop"},{"title":"Campaign stats","openapi":"GET /campaigns/{id}/stats","href":"/api-reference/campaigns/stats"},{"group":"Contacts","pages":[{"title":"Enroll contacts","openapi":"POST /campaigns/{id}/leads","href":"/api-reference/campaigns/enroll"},{"title":"List enrolled contacts","openapi":"GET /campaigns/{id}/leads","href":"/api-reference/campaigns/list-leads"},{"title":"Exclude a contact","openapi":"DELETE /campaigns/{id}/leads/{lead_id}","href":"/api-reference/campaigns/exclude"}]}]},{"group":"Shared Links","pages":[{"title":"List Shared Links","openapi":"GET /shared-links","href":"/api-reference/shared-links/list"},{"title":"Create Shared Link","openapi":"POST /shared-links","href":"/api-reference/shared-links/create"},{"title":"Get Shared Link","openapi":"GET /shared-links/{id}","href":"/api-reference/shared-links/get"},{"title":"Revoke Shared Link","openapi":"PATCH /shared-links/{id}","href":"/api-reference/shared-links/update"}]},{"group":"Affiliates","pages":[{"title":"Affiliate stats","openapi":"GET /affiliates/stats","href":"/api-reference/affiliates/stats"},{"title":"List sub-affiliates","openapi":"GET /affiliates/downline","href":"/api-reference/affiliates/downline"}]},{"group":"Agent Eval","pages":[{"group":"Personas","pages":[{"title":"List Personas","openapi":"GET /agent-eval/personas","href":"/api-reference/agent-eval/personas/list"},{"title":"Create Persona","openapi":"POST /agent-eval/personas","href":"/api-reference/agent-eval/personas/create"},{"title":"Get Persona","openapi":"GET /agent-eval/personas/{id}","href":"/api-reference/agent-eval/personas/get"},{"title":"Update Persona","openapi":"PATCH /agent-eval/personas/{id}","href":"/api-reference/agent-eval/personas/update"},{"title":"Delete Persona","openapi":"DELETE /agent-eval/personas/{id}","href":"/api-reference/agent-eval/personas/delete"}]},{"group":"Cases","pages":[{"title":"List Cases","openapi":"GET /agent-eval/cases","href":"/api-reference/agent-eval/cases/list"},{"title":"Create Case","openapi":"POST /agent-eval/cases","href":"/api-reference/agent-eval/cases/create"},{"title":"Get Case","openapi":"GET /agent-eval/cases/{id}","href":"/api-reference/agent-eval/cases/get"},{"title":"Update Case","openapi":"PATCH /agent-eval/cases/{id}","href":"/api-reference/agent-eval/cases/update"},{"title":"Delete Case","openapi":"DELETE /agent-eval/cases/{id}","href":"/api-reference/agent-eval/cases/delete"},{"title":"Run a Case","openapi":"POST /agent-eval/cases/{case_id}/run","href":"/api-reference/agent-eval/cases/run"}]},{"group":"Suites","pages":[{"title":"List Suites","openapi":"GET /agent-eval/suites","href":"/api-reference/agent-eval/suites/list"},{"title":"Create Suite","openapi":"POST /agent-eval/suites","href":"/api-reference/agent-eval/suites/create"},{"title":"Get Suite","openapi":"GET /agent-eval/suites/{id}","href":"/api-reference/agent-eval/suites/get"},{"title":"Update Suite","openapi":"PATCH /agent-eval/suites/{id}","href":"/api-reference/agent-eval/suites/update"},{"title":"Delete Suite","openapi":"DELETE /agent-eval/suites/{id}","href":"/api-reference/agent-eval/suites/delete"},{"title":"Run a Suite","openapi":"POST /agent-eval/suites/{id}/run","href":"/api-reference/agent-eval/suites/run"},{"title":"List Suite Executions","openapi":"GET /agent-eval/suites/{id}/runs","href":"/api-reference/agent-eval/suites/runs/list"},{"title":"Get Suite Execution","openapi":"GET /agent-eval/suites/{id}/runs/{suite_run_id}","href":"/api-reference/agent-eval/suites/runs/get"}]},{"group":"Runs","pages":[{"title":"List Runs","openapi":"GET /agent-eval/runs","href":"/api-reference/agent-eval/runs/list"},{"title":"Get Run","openapi":"GET /agent-eval/runs/{id}","href":"/api-reference/agent-eval/runs/get"},{"title":"Get Run Turns","openapi":"GET /agent-eval/runs/{id}/turns","href":"/api-reference/agent-eval/runs/turns"},{"title":"Get Run Evaluation","openapi":"GET /agent-eval/runs/{id}/evaluation","href":"/api-reference/agent-eval/runs/evaluation"},{"title":"Cancel a Run","openapi":"POST /agent-eval/runs/{id}/cancel","href":"/api-reference/agent-eval/runs/cancel"}]}]}]}]},"basePath":"","title":"Issue an API key - Yappr","deploymentId":"dpl_EtLmMeZHkKGqAjV1DiX4ZXCriDj3","buildId":"dpl_EtLmMeZHkKGqAjV1DiX4ZXCriDj3","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CWRF67qg.js","snippetPresets-BR8BoZAC.js","utils-D5WEoDBM.js","style-to-object-BY3JEAdk.js","utils-B79vXYXV.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-C59iNs-S.js","conditional-requirements-CFM0id0Q.js","cloneDeep-455jK_K_.js","_Uint8Array-BEecbuUl.js","isObject-FP1Yky1u.js","ApiExamples-CFRHL52q.js","usePlaygroundInputsStore-Caip2xMX.js","shallow-BS-qcxmX.js","isEqual-CEpbaqh9.js","CodeSnippets-B-R0FAqw.js","CodeSnippet-Bkkti1IB.js","use-playground-group-access-BLvLSz8w.js","Page-UFatEFaf.js","api-description-markdown-Cny85OC3.js","DynamicMarkdown-Czhs88Hc.js","SectionHeading-B08KBUKT.js","MethodPill-D8OvWg5y.js","getPastedJson-tB5m0_yh.js","Check2Icon-CeP__a4S.js","axios-CsQoIw0U.js","Markdown-LI7DSqeK.js","AssistantPageLink-bYxdsqKl.js","dist-DXTH2WLA.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}