: "${KARTA_API_KEY:?Set your API key}": "${KARTA_REQUEST_ID:?Set a unique ID; preserve it for retries}"curl --fail-with-body 'https://api.getkarta.ai/public/v1/voice/calls/phone' \ -H "Authorization: Bearer $KARTA_API_KEY" \ -H "X-Request-ID: $KARTA_REQUEST_ID" \ -H 'Content-Type: application/json' \ -d '{ "agent_id": "agentexample", "to_number": "+12025550123"}'
import json
import os
from urllib.request import Request, urlopen
# Preserve KARTA_REQUEST_ID and the body when retrying this action.
body = {'agent_id': 'agentexample', 'to_number': '+12025550123'}
request = Request(
'https://api.getkarta.ai/public/v1/voice/calls/phone',
data=json.dumps(body).encode(),
headers={
"Authorization": f"Bearer {os.environ['KARTA_API_KEY']}",
"X-Request-ID": os.environ["KARTA_REQUEST_ID"],
"Content-Type": "application/json",
},
method="POST",
)
with urlopen(request, timeout=30) as response:
print(response.status, json.load(response))
// Run on your server. Preserve this ID and body when retrying.
const { KARTA_API_KEY, KARTA_REQUEST_ID } = process.env;
if (!KARTA_API_KEY || !KARTA_REQUEST_ID) throw new Error("Set API key and request ID");
const response = await fetch("https://api.getkarta.ai/public/v1/voice/calls/phone", {
method: "POST",
headers: {
"Authorization": `Bearer ${KARTA_API_KEY}`,
"X-Request-ID": KARTA_REQUEST_ID,
"Content-Type": "application/json",
},
body: JSON.stringify({
"agent_id": "agentexample",
"to_number": "+12025550123"
}),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
console.log(await response.json());
: "${KARTA_API_KEY:?Set your API key}": "${KARTA_REQUEST_ID:?Set a unique ID; preserve it for retries}"curl --fail-with-body 'https://api.getkarta.ai/public/v1/voice/calls/phone' \ -H "Authorization: Bearer $KARTA_API_KEY" \ -H "X-Request-ID: $KARTA_REQUEST_ID" \ -H 'Content-Type: application/json' \ -d '{ "agent_id": "agentexample", "to_number": "+12025550123"}'
import json
import os
from urllib.request import Request, urlopen
# Preserve KARTA_REQUEST_ID and the body when retrying this action.
body = {'agent_id': 'agentexample', 'to_number': '+12025550123'}
request = Request(
'https://api.getkarta.ai/public/v1/voice/calls/phone',
data=json.dumps(body).encode(),
headers={
"Authorization": f"Bearer {os.environ['KARTA_API_KEY']}",
"X-Request-ID": os.environ["KARTA_REQUEST_ID"],
"Content-Type": "application/json",
},
method="POST",
)
with urlopen(request, timeout=30) as response:
print(response.status, json.load(response))
// Run on your server. Preserve this ID and body when retrying.
const { KARTA_API_KEY, KARTA_REQUEST_ID } = process.env;
if (!KARTA_API_KEY || !KARTA_REQUEST_ID) throw new Error("Set API key and request ID");
const response = await fetch("https://api.getkarta.ai/public/v1/voice/calls/phone", {
method: "POST",
headers: {
"Authorization": `Bearer ${KARTA_API_KEY}`,
"X-Request-ID": KARTA_REQUEST_ID,
"Content-Type": "application/json",
},
body: JSON.stringify({
"agent_id": "agentexample",
"to_number": "+12025550123"
}),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
console.log(await response.json());
Caller number. Omit or pass null to use the agent’s configured outbound number.
Example:
"+12025550124"
llm_dynamic_variables
object | null
Agent prompt variables for this call.
Example:
{ "customer_name": "Alex" }
transit_data
object | null
Application metadata associated with this call.
Example:
{ "external_id": "example-001" }
batch_item_id
string | null
Optional existing batch-item reference; omit for a standalone call.
Example:
null
Response
Accepted for processing.
call_id
string
Call identifier.
Example:
"call_example"
call_status
string
Current call status.
Example:
"call_registered"
call_type
string | null
Call type.
Example:
"sip_call"
agent_id
string | null
Voice agent identifier.
Example:
"agentexample"
llm_dynamic_variables
object | null
Agent prompt variables for this call.
Example:
{ "customer_name": "Alex" }
transit_data
object | null
Application metadata associated with this call.
Example:
{ "external_id": "example-001" }
to_number
string | null
Destination phone number for the call.
Example:
"+12025550123"
from_number
string | null
Caller phone number.
Example:
"+12025550124"
batch_item_id
string | null
Batch item identifier, if applicable.
Example:
null
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Karta API","description":"Public API documentation for Karta","colors":{"primary":"#FF8256","light":"#FF8256","dark":"#FF8256"},"logo":{"light":"https://mintcdn.com/karta-ai/yiE-h5kOgKoDT-G-/logo/light.svg?fit=max\u0026auto=format\u0026n=yiE-h5kOgKoDT-G-\u0026q=85\u0026s=8df96a7426f71bb793915ed039564b6b","dark":"https://mintcdn.com/karta-ai/yiE-h5kOgKoDT-G-/logo/dark.svg?fit=max\u0026auto=format\u0026n=yiE-h5kOgKoDT-G-\u0026q=85\u0026s=18f9f0036a7fc5dc01d890b1e9bf2e16"},"favicon":"https://mintcdn.com/karta-ai/dUWfvinbcsvHjZta/favicon.ico?fit=max\u0026auto=format\u0026n=dUWfvinbcsvHjZta\u0026q=85\u0026s=e13cab584c9db65ef254944157ea4359","api":{"playground":{"display":"interactive","proxy":false},"examples":{"defaults":"required","languages":["curl","python","javascript"]}},"navbar":{"links":[{"href":"mailto:support@getkarta.ai","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.getkarta.ai"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/getkarta"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"karta-ai","hasAudioNarration":false,"actualSubdomain":"karta-ai","customDomains":["docs.getkarta.ai"],"gitSource":{"type":"github","owner":"getkarta","repo":"karta-public-api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ae04eb359d1c248245fb90a","clientVersion":"0.0.4138","searchFilterCounts":[{"language":"default","tag":"API reference","count":16},{"language":"default","tag":"Documentation","count":10},{"language":"default","tag":"Get started","count":5},{"language":"default","tag":"Voice","count":4},{"language":"default","tag":"Agents","count":3},{"language":"default","tag":"Calls","count":3},{"language":"default","tag":"Campaigns","count":3},{"language":"default","tag":"Account","count":2},{"language":"default","tag":"Billing","count":2},{"language":"default","tag":"Webhooks","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/calls/create-phone-call","slug":"/api-reference/calls/create-phone-call","pageMetadata":{"openapi":"openapi.json POST /voice/calls/phone","description":"Create an outbound phone call.","title":"Create phone call","href":"/api-reference/calls/create-phone-call"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create an outbound phone call.\"\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`,..._provideComponents(),...props.components},{Accordion,CodeBlock,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Warning,{children:_jsx(_components.p,{children:`Phone calls consume credits.`})}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`202`}),` response confirms the request was accepted. Use `,_jsx(_components.code,{children:`call_id`}),` to `,_jsx(_components.a,{href:`/api-reference/calls/get-call`,children:`check its status`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`For setup, see `,_jsx(_components.a,{href:`/guides/phone-calls`,children:`make a phone call`}),`. For retries, see `,_jsx(_components.a,{href:`/idempotency`,children:`idempotency`}),`.`]}),`\n`,_jsxs(Accordion,{title:`Include a caller number, prompt variables, and metadata`,id:`include-a-caller-number-prompt-variables-and-metadata`,children:[_jsx(_components.p,{children:`Use this JSON body in place of the minimal example. Replace the identifiers and numbers with values for your account.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`11`,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:`11`,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:` \"agent_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"agentexample\"`}),_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:` \"to_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+12025550123\"`}),_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:` \"from_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+12025550124\"`}),_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:` \"llm_dynamic_variables\"`}),_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:` \"customer_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Alex\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"transit_data\"`}),_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:` \"external_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"example-001\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})}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":{"openapi":"openapi.json POST /voice/calls/phone","description":"Create an outbound phone call.","title":"Create phone call","href":"/api-reference/calls/create-phone-call"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createPhoneCall","summary":"Create phone call","description":"Create an outbound phone call.","tags":["Calls"],"parameters":["9f7220ec-5984-4735-9953-9c7f43b391e0"],"responses":{"202":"402b017b-4b55-4ed0-ba32-5c697b0830ef","400":"bab1b5c6-2245-4386-ab43-2fb9296e3dda","401":"16d7572c-ef3a-4ad9-94b2-d1d2eb09b422","403":"0b1ed8de-9a57-4134-b84f-00c766e39d8f","404":"27021e2c-3cae-43de-a609-8db5c24df1c2","409":"00b7b70e-217a-4ab9-a5a3-31fa52ea88fc","422":"2d389abc-377b-44bd-bb09-3b62e64b5b40","500":"f3589ca0-6da9-4c74-ba0e-210b8ee1cf8b","503":"8ddd0481-443d-4263-80e7-825b217ec5dc"},"requestBody":"edc2d5aa-1da6-4b71-ba5e-df665b309187","x-codeSamples":[{"lang":"bash","label":"cURL","source":": \"${KARTA_API_KEY:?Set your API key}\"\n: \"${KARTA_REQUEST_ID:?Set a unique ID; preserve it for retries}\"\n\ncurl --fail-with-body 'https://api.getkarta.ai/public/v1/voice/calls/phone' \\\n -H \"Authorization: Bearer $KARTA_API_KEY\" \\\n -H \"X-Request-ID: $KARTA_REQUEST_ID\" \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"agent_id\": \"agentexample\",\n \"to_number\": \"+12025550123\"\n}'"},{"lang":"python","label":"Python","source":"import json\nimport os\nfrom urllib.request import Request, urlopen\n\n# Preserve KARTA_REQUEST_ID and the body when retrying this action.\nbody = {'agent_id': 'agentexample', 'to_number': '+12025550123'}\nrequest = Request(\n 'https://api.getkarta.ai/public/v1/voice/calls/phone',\n data=json.dumps(body).encode(),\n headers={\n \"Authorization\": f\"Bearer {os.environ['KARTA_API_KEY']}\",\n \"X-Request-ID\": os.environ[\"KARTA_REQUEST_ID\"],\n \"Content-Type\": \"application/json\",\n },\n method=\"POST\",\n)\nwith urlopen(request, timeout=30) as response:\n print(response.status, json.load(response))"},{"lang":"javascript","label":"JavaScript","source":"// Run on your server. Preserve this ID and body when retrying.\nconst { KARTA_API_KEY, KARTA_REQUEST_ID } = process.env;\nif (!KARTA_API_KEY || !KARTA_REQUEST_ID) throw new Error(\"Set API key and request ID\");\nconst response = await fetch(\"https://api.getkarta.ai/public/v1/voice/calls/phone\", {\n method: \"POST\",\n headers: {\n \"Authorization\": `Bearer ${KARTA_API_KEY}`,\n \"X-Request-ID\": KARTA_REQUEST_ID,\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n \"agent_id\": \"agentexample\",\n \"to_number\": \"+12025550123\"\n}),\n});\nif (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);\nconsole.log(await response.json());"}],"method":"post","type":"path","servers":["fdb5da59-212d-4ac7-85a3-40f1ff887f55"],"security":["fb88960d-b0c9-461e-a4a8-ead0aba73061"],"path":"/voice/calls/phone","baseUrlOptions":["https://api.getkarta.ai/public/v1"],"title":"Create phone call","codeSamples":[{"label":"cURL","lang":"bash","source":": \"${KARTA_API_KEY:?Set your API key}\"\n: \"${KARTA_REQUEST_ID:?Set a unique ID; preserve it for retries}\"\n\ncurl --fail-with-body 'https://api.getkarta.ai/public/v1/voice/calls/phone' \\\n -H \"Authorization: Bearer $KARTA_API_KEY\" \\\n -H \"X-Request-ID: $KARTA_REQUEST_ID\" \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"agent_id\": \"agentexample\",\n \"to_number\": \"+12025550123\"\n}'"},{"label":"Python","lang":"python","source":"import json\nimport os\nfrom urllib.request import Request, urlopen\n\n# Preserve KARTA_REQUEST_ID and the body when retrying this action.\nbody = {'agent_id': 'agentexample', 'to_number': '+12025550123'}\nrequest = Request(\n 'https://api.getkarta.ai/public/v1/voice/calls/phone',\n data=json.dumps(body).encode(),\n headers={\n \"Authorization\": f\"Bearer {os.environ['KARTA_API_KEY']}\",\n \"X-Request-ID\": os.environ[\"KARTA_REQUEST_ID\"],\n \"Content-Type\": \"application/json\",\n },\n method=\"POST\",\n)\nwith urlopen(request, timeout=30) as response:\n print(response.status, json.load(response))"},{"label":"JavaScript","lang":"javascript","source":"// Run on your server. Preserve this ID and body when retrying.\nconst { KARTA_API_KEY, KARTA_REQUEST_ID } = process.env;\nif (!KARTA_API_KEY || !KARTA_REQUEST_ID) throw new Error(\"Set API key and request ID\");\nconst response = await fetch(\"https://api.getkarta.ai/public/v1/voice/calls/phone\", {\n method: \"POST\",\n headers: {\n \"Authorization\": `Bearer ${KARTA_API_KEY}`,\n \"X-Request-ID\": KARTA_REQUEST_ID,\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n \"agent_id\": \"agentexample\",\n \"to_number\": \"+12025550123\"\n}),\n});\nif (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);\nconsole.log(await response.json());"}],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":true,"requestExampleType":"codeSamples","responseExampleType":"generated","disableProxy":true},"dependencies":{"parameters":{"9f7220ec-5984-4735-9953-9c7f43b391e0":{"name":"X-Request-ID","in":"header","required":false,"description":"Optional request-tracing identifier.","schema":{"type":"string","isRequired":false,"description":"Optional request-tracing identifier.","uniqueKey":"","typeLabel":"string"},"example":"example-request-001"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Voice agent ID returned by List agents.","example":"agentexample","isRequired":true,"uniqueKey":"agent_id","typeLabel":"string"},"to_number":{"type":"string","description":"Destination phone number in international format.","example":"+12025550123","isRequired":true,"uniqueKey":"to_number","typeLabel":"string"},"from_number":{"oneOf":[{"type":"string","description":"Caller number. Omit or pass null to use the agent’s configured outbound number.","example":"+12025550124","uniqueKey":"from_number.oneOf.0","typeLabel":"string"},{"type":"null","description":"Caller number. Omit or pass null to use the agent’s configured outbound number.","example":"+12025550124","uniqueKey":"from_number.oneOf.1","typeLabel":"null"}],"uniqueKey":"from_number","typeLabel":"string | null"},"llm_dynamic_variables":{"oneOf":[{"type":"object","properties":{},"description":"Agent prompt variables for this call.","additionalProperties":true,"example":{"customer_name":"Alex"},"uniqueKey":"llm_dynamic_variables.oneOf.0","typeLabel":"object"},{"type":"null","properties":{},"description":"Agent prompt variables for this call.","additionalProperties":true,"example":{"customer_name":"Alex"},"uniqueKey":"llm_dynamic_variables.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_dynamic_variables","typeLabel":"object | null"},"transit_data":{"oneOf":[{"type":"object","properties":{},"description":"Application metadata associated with this call.","additionalProperties":true,"example":{"external_id":"example-001"},"uniqueKey":"transit_data.oneOf.0","typeLabel":"object"},{"type":"null","properties":{},"description":"Application metadata associated with this call.","additionalProperties":true,"example":{"external_id":"example-001"},"uniqueKey":"transit_data.oneOf.1","typeLabel":"null"}],"uniqueKey":"transit_data","typeLabel":"object | null"},"batch_item_id":{"oneOf":[{"type":"string","description":"Optional existing batch-item reference; omit for a standalone call.","example":null,"uniqueKey":"batch_item_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional existing batch-item reference; omit for a standalone call.","example":null,"uniqueKey":"batch_item_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"batch_item_id","typeLabel":"string | null"}},"required":["agent_id","to_number"],"uniqueKey":"","typeLabel":"object"},"example":{"agent_id":"agentexample","to_number":"+12025550123"},"examples":{"Example":{"title":"Example","value":{"agent_id":"agentexample","to_number":"+12025550123"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"402b017b-4b55-4ed0-ba32-5c697b0830ef":{"description":"Accepted for processing.","headers":{"X-Request-ID":{"description":"Request identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"call_id":{"type":"string","description":"Call identifier.","example":"call_example","uniqueKey":"call_id","typeLabel":"string"},"call_status":{"type":"string","description":"Current call status.","example":"call_registered","uniqueKey":"call_status","typeLabel":"string"},"call_type":{"oneOf":[{"type":"string","description":"Call type.","example":"sip_call","uniqueKey":"call_type.oneOf.0","typeLabel":"string"},{"type":"null","description":"Call type.","example":"sip_call","uniqueKey":"call_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"call_type","typeLabel":"string | null"},"agent_id":{"oneOf":[{"type":"string","description":"Voice agent identifier.","example":"agentexample","uniqueKey":"agent_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Voice agent identifier.","example":"agentexample","uniqueKey":"agent_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"agent_id","typeLabel":"string | null"},"llm_dynamic_variables":{"oneOf":[{"type":"object","properties":{},"description":"Agent prompt variables for this call.","additionalProperties":true,"example":{"customer_name":"Alex"},"uniqueKey":"llm_dynamic_variables.oneOf.0","typeLabel":"object"},{"type":"null","properties":{},"description":"Agent prompt variables for this call.","additionalProperties":true,"example":{"customer_name":"Alex"},"uniqueKey":"llm_dynamic_variables.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_dynamic_variables","typeLabel":"object | null"},"transit_data":{"oneOf":[{"type":"object","properties":{},"description":"Application metadata associated with this call.","additionalProperties":true,"example":{"external_id":"example-001"},"uniqueKey":"transit_data.oneOf.0","typeLabel":"object"},{"type":"null","properties":{},"description":"Application metadata associated with this call.","additionalProperties":true,"example":{"external_id":"example-001"},"uniqueKey":"transit_data.oneOf.1","typeLabel":"null"}],"uniqueKey":"transit_data","typeLabel":"object | null"},"to_number":{"oneOf":[{"type":"string","description":"Destination phone number for the call.","example":"+12025550123","uniqueKey":"to_number.oneOf.0","typeLabel":"string"},{"type":"null","description":"Destination phone number for the call.","example":"+12025550123","uniqueKey":"to_number.oneOf.1","typeLabel":"null"}],"uniqueKey":"to_number","typeLabel":"string | null"},"from_number":{"oneOf":[{"type":"string","description":"Caller phone number.","example":"+12025550124","uniqueKey":"from_number.oneOf.0","typeLabel":"string"},{"type":"null","description":"Caller phone number.","example":"+12025550124","uniqueKey":"from_number.oneOf.1","typeLabel":"null"}],"uniqueKey":"from_number","typeLabel":"string | null"},"batch_item_id":{"oneOf":[{"type":"string","description":"Batch item identifier, if applicable.","example":null,"uniqueKey":"batch_item_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Batch item identifier, if applicable.","example":null,"uniqueKey":"batch_item_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"batch_item_id","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"example":{"call_id":"call_example","call_status":"call_registered","call_type":"sip_call","agent_id":"agentexample","to_number":"+12025550123","from_number":"+12025550124","llm_dynamic_variables":{"customer_name":"Alex"},"transit_data":{"external_id":"example-001"},"batch_item_id":null},"examples":{"Example":{"title":"Example","value":{"call_id":"call_example","call_status":"call_registered","call_type":"sip_call","agent_id":"agentexample","to_number":"+12025550123","from_number":"+12025550124","llm_dynamic_variables":{"customer_name":"Alex"},"transit_data":{"external_id":"example-001"},"batch_item_id":null}}},"exampleType":"examples"}},"exampleType":"examples"},"bab1b5c6-2245-4386-ab43-2fb9296e3dda":{"description":"Invalid request or account configuration.","headers":{"X-Request-ID":{"description":"Request identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Authentication or account configuration error","properties":{"type":{"type":"string","description":"Identifier for this error category.","uniqueKey":"oneOf.0.type","typeLabel":"string"},"title":{"type":"string","description":"Short summary of the error.","uniqueKey":"oneOf.0.title","typeLabel":"string"},"status":{"type":"integer","description":"HTTP status code for this response.","uniqueKey":"oneOf.0.status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation of the failure.","uniqueKey":"oneOf.0.detail","typeLabel":"string"},"instance":{"type":"string","description":"Request identifier.","uniqueKey":"oneOf.0.instance","typeLabel":"string"},"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"oneOf.0.code","typeLabel":"string"}},"uniqueKey":"oneOf.0","typeLabel":"Authentication or account configuration error · object"},{"type":"object","title":"Request processing error","properties":{"message":{"type":"string","description":"Description of the request-processing failure.","uniqueKey":"oneOf.1.message","typeLabel":"string"},"errors":{"type":"array","items":{"additionalProperties":true,"type":"object","uniqueKey":"oneOf.1.errors.items.[INDEX]","typeLabel":"object"},"description":"Additional error details, when supplied.","uniqueKey":"oneOf.1.errors","typeLabel":"object[]"}},"uniqueKey":"oneOf.1","typeLabel":"Request processing error · object"}],"uniqueKey":"","typeLabel":"Authentication or account configuration error · object | Request processing error · object"},"examples":{"configuration":{"title":"configuration","value":{"type":"https://httpstatus.es/400","title":"Missing Data Residency","status":400,"detail":"Client dataResidency not set. Please contact support.","instance":"example-request-001","code":"missing_data_residency"}},"request":{"title":"request","value":{"message":"Unexpected end of JSON input"}}},"exampleType":"examples"},"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Identifier for this error category.","uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"Short summary of the error.","uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"HTTP status code for this response.","uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation of the failure.","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","description":"Request path.","uniqueKey":"instance","typeLabel":"string"},"trace_id":{"type":"string","description":"Request identifier for support and troubleshooting.","uniqueKey":"trace_id","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","uniqueKey":"errors.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"type":{"type":"string","uniqueKey":"errors.items.[INDEX].type","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"title":"Voice service error","uniqueKey":"","typeLabel":"Voice service error · object"},"example":{"type":"https://api.karta.com/problems/bad-request","title":"Bad Request","status":400,"detail":"X-Request-ID header is required for this idempotent operation","instance":"/voice/public/v1/calls/phone","trace_id":"example-request-001"},"examples":{"Example":{"title":"Example","value":{"type":"https://api.karta.com/problems/bad-request","title":"Bad Request","status":400,"detail":"X-Request-ID header is required for this idempotent operation","instance":"/voice/public/v1/calls/phone","trace_id":"example-request-001"}}},"exampleType":"examples"}},"exampleType":"examples"},"16d7572c-ef3a-4ad9-94b2-d1d2eb09b422":{"description":"Authentication failed.","headers":{"X-Request-ID":{"description":"Request identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Identifier for this error category.","uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"Short summary of the error.","uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"HTTP status code for this response.","uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation of the failure.","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","description":"Request identifier.","uniqueKey":"instance","typeLabel":"string"},"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"}},"title":"Authentication or account configuration error","uniqueKey":"","typeLabel":"Authentication or account configuration error · object"},"examples":{"authentication":{"title":"authentication","value":{"type":"https://httpstatus.es/401","title":"Invalid API Key","status":401,"detail":"API key is required","instance":"example-request-001","code":"invalid_api_key"}}},"exampleType":"examples"}},"exampleType":"examples"},"0b1ed8de-9a57-4134-b84f-00c766e39d8f":{"description":"API key not permitted for this operation.","headers":{"X-Request-ID":{"description":"Request identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Identifier for this error category.","uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"Short summary of the error.","uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"HTTP status code for this response.","uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation of the failure.","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","description":"Request identifier.","uniqueKey":"instance","typeLabel":"string"},"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"}},"title":"Authentication or account configuration error","uniqueKey":"","typeLabel":"Authentication or account configuration error · object"},"examples":{"authentication":{"title":"authentication","value":{"type":"https://httpstatus.es/403","title":"Wrong API Key Type","status":403,"detail":"Widget API keys may only be used on /widget paths","instance":"example-request-001","code":"wrong_key_audience"}}},"exampleType":"examples"}},"exampleType":"examples"},"27021e2c-3cae-43de-a609-8db5c24df1c2":{"description":"Resource not found for this account.","headers":{"X-Request-ID":{"description":"Request identifier.","schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Identifier for this error category.","uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"Short summary of the error.","uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"HTTP status code for this response.","uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation of the failure.","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","description":"Request path.","uniqueKey":"instance","typeLabel":"string"},"trace_id":{"type":"string","description":"Request identifier for support and troubleshooting.","uniqueKey":"trace_id","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","uniqueKey":"errors.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"type":{"type":"string","uniqueKey":"errors.items.[INDEX].type","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"title":"Voice service error","uniqueKey":"","typeLabel":"Voice service error · object"},"example":{"type":"https://api.karta.com/problems/not-found","title":"Not Found","status":404,"detail":"agent not found","instance":"/voice/public/v1/calls/phone","trace_id":"example-request-001"},"examples":{"Example":{"title":"Example","value":{"type":"https://api.karta.com/problems/not-found","title":"Not Found","status":404,"detail":"agent not found","instance":"/voice/public/v1/calls/phone","trace_id":"example-request-001"}}},"exampleType":"examples"}},"exampleType":"examples"},"00b7b70e-217a-4ab9-a5a3-31fa52ea88fc":{"description":"Request ID is in progress or was reused with a different payload.","headers":{"X-Request-ID":{"description":"Request identifier.","schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Identifier for this error category.","uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"Short summary of the error.","uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"HTTP status code for this response.","uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation of the failure.","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","description":"Request path.","uniqueKey":"instance","typeLabel":"string"},"trace_id":{"type":"string","description":"Request identifier for support and troubleshooting.","uniqueKey":"trace_id","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","uniqueKey":"errors.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"type":{"type":"string","uniqueKey":"errors.items.[INDEX].type","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"title":"Voice service error","uniqueKey":"","typeLabel":"Voice service error · object"},"example":{"type":"https://api.karta.com/problems/conflict","title":"Conflict","status":409,"detail":"Request with this X-Request-ID is already in progress","instance":"/voice/public/v1/calls/phone","trace_id":"example-request-001"},"examples":{"Example":{"title":"Example","value":{"type":"https://api.karta.com/problems/conflict","title":"Conflict","status":409,"detail":"Request with this X-Request-ID is already in progress","instance":"/voice/public/v1/calls/phone","trace_id":"example-request-001"}}},"exampleType":"examples"}},"exampleType":"examples"},"2d389abc-377b-44bd-bb09-3b62e64b5b40":{"description":"Request validation failed.","headers":{"X-Request-ID":{"description":"Request identifier.","schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Identifier for this error category.","uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"Short summary of the error.","uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"HTTP status code for this response.","uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation of the failure.","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","description":"Request path.","uniqueKey":"instance","typeLabel":"string"},"trace_id":{"type":"string","description":"Request identifier for support and troubleshooting.","uniqueKey":"trace_id","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","uniqueKey":"errors.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"type":{"type":"string","uniqueKey":"errors.items.[INDEX].type","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"title":"Voice service error","uniqueKey":"","typeLabel":"Voice service error · object"},"example":{"type":"https://api.karta.com/problems/validation-error","title":"Unprocessable Entity","status":422,"detail":"Validation failed","instance":"/voice/public/v1/calls/phone","trace_id":"example-request-001","errors":[{"path":"body.agent_id","message":"Field required","type":"missing"}]},"examples":{"Example":{"title":"Example","value":{"type":"https://api.karta.com/problems/validation-error","title":"Unprocessable Entity","status":422,"detail":"Validation failed","instance":"/voice/public/v1/calls/phone","trace_id":"example-request-001","errors":[{"path":"body.agent_id","message":"Field required","type":"missing"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"f3589ca0-6da9-4c74-ba0e-210b8ee1cf8b":{"description":"Internal server error.","headers":{"X-Request-ID":{"description":"Request identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Authentication or account configuration error","properties":{"type":{"type":"string","description":"Identifier for this error category.","uniqueKey":"oneOf.0.type","typeLabel":"string"},"title":{"type":"string","description":"Short summary of the error.","uniqueKey":"oneOf.0.title","typeLabel":"string"},"status":{"type":"integer","description":"HTTP status code for this response.","uniqueKey":"oneOf.0.status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation of the failure.","uniqueKey":"oneOf.0.detail","typeLabel":"string"},"instance":{"type":"string","description":"Request identifier.","uniqueKey":"oneOf.0.instance","typeLabel":"string"},"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"oneOf.0.code","typeLabel":"string"}},"uniqueKey":"oneOf.0","typeLabel":"Authentication or account configuration error · object"},{"type":"object","title":"Request processing error","properties":{"message":{"type":"string","description":"Description of the request-processing failure.","uniqueKey":"oneOf.1.message","typeLabel":"string"},"errors":{"type":"array","items":{"additionalProperties":true,"type":"object","uniqueKey":"oneOf.1.errors.items.[INDEX]","typeLabel":"object"},"description":"Additional error details, when supplied.","uniqueKey":"oneOf.1.errors","typeLabel":"object[]"}},"uniqueKey":"oneOf.1","typeLabel":"Request processing error · object"},{"type":"object","title":"Upstream connection error","properties":{"error":{"type":"string","enum":["Internal Server Error"],"description":"Machine-readable error code.","uniqueKey":"oneOf.2.error","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Explanation of the failure.","uniqueKey":"oneOf.2.message","typeLabel":"string"}},"uniqueKey":"oneOf.2","typeLabel":"Upstream connection error · object"}],"uniqueKey":"","typeLabel":"Authentication or account configuration error · object | Request processing error · object | Upstream connection error · object"},"examples":{"authentication":{"title":"authentication","value":{"type":"https://httpstatus.es/500","title":"Internal Server Error","status":500,"detail":"Authentication failed","instance":"example-request-001","code":"internal_error"}},"request":{"title":"request","value":{"message":"Internal Server Error"}},"ProxyConnectionError":{"title":"ProxyConnectionError","value":{"error":"Internal Server Error","message":"Error connecting to voice agent service"}}},"exampleType":"examples"},"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Identifier for this error category.","uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"Short summary of the error.","uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"HTTP status code for this response.","uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation of the failure.","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","description":"Request path.","uniqueKey":"instance","typeLabel":"string"},"trace_id":{"type":"string","description":"Request identifier for support and troubleshooting.","uniqueKey":"trace_id","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","uniqueKey":"errors.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"type":{"type":"string","uniqueKey":"errors.items.[INDEX].type","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"title":"Voice service error","uniqueKey":"","typeLabel":"Voice service error · object"},"example":{"type":"https://api.karta.com/problems/internal-server-error","title":"Internal Server Error","status":500,"detail":"An internal server error occurred","instance":"/voice/public/v1/calls/phone","trace_id":"example-request-001"},"examples":{"Example":{"title":"Example","value":{"type":"https://api.karta.com/problems/internal-server-error","title":"Internal Server Error","status":500,"detail":"An internal server error occurred","instance":"/voice/public/v1/calls/phone","trace_id":"example-request-001"}}},"exampleType":"examples"}},"exampleType":"examples"},"8ddd0481-443d-4263-80e7-825b217ec5dc":{"description":"Service temporarily unavailable.","headers":{"X-Request-ID":{"description":"Request identifier.","schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Identifier for this error category.","uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"Short summary of the error.","uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"HTTP status code for this response.","uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation of the failure.","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","description":"Request path.","uniqueKey":"instance","typeLabel":"string"},"trace_id":{"type":"string","description":"Request identifier for support and troubleshooting.","uniqueKey":"trace_id","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","uniqueKey":"errors.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"type":{"type":"string","uniqueKey":"errors.items.[INDEX].type","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"title":"Voice service error","uniqueKey":"","typeLabel":"Voice service error · object"},"example":{"type":"https://api.karta.com/problems/internal-server-error","title":"Service Unavailable","status":503,"detail":"Idempotency store unavailable","instance":"/voice/public/v1/calls/phone","trace_id":"example-request-001"},"examples":{"Example":{"title":"Example","value":{"type":"https://api.karta.com/problems/internal-server-error","title":"Service Unavailable","status":503,"detail":"Idempotency store unavailable","instance":"/voice/public/v1/calls/phone","trace_id":"example-request-001"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"fb88960d-b0c9-461e-a4a8-ead0aba73061":{"BearerApiKey":{"type":"http","scheme":"bearer","description":"API key in the format: Bearer YOUR_KARTA_API_KEY.","scopes":[],"schemeName":"BearerApiKey"}}},"servers":{"fdb5da59-212d-4ac7-85a3-40f1ff887f55":{"url":"https://api.getkarta.ai/public/v1","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"API key in the format: Bearer YOUR_KARTA_API_KEY.","scopes":[],"schemeName":"BearerApiKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key in the format: Bearer YOUR_KARTA_API_KEY.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerApiKey","name":"Authorization"}],"title":"BearerApiKey"}]},"originalFileLocation":"openapi.json"},"subdomain":"karta-ai","siteName":"Karta API","title":"Create phone call - Karta API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-08T05:01:19.790Z","originalFileLocation":"api-reference/calls/create-phone-call.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=\"Create an outbound phone call.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Karta API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/karta-ai/uk0rRc4uKsjKwtaR/_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/karta-ai/uk0rRc4uKsjKwtaR/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/karta-ai/uk0rRc4uKsjKwtaR/_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/karta-ai/uk0rRc4uKsjKwtaR/_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/karta-ai/uk0rRc4uKsjKwtaR/_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/karta-ai/uk0rRc4uKsjKwtaR/_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/karta-ai/uk0rRc4uKsjKwtaR/_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/karta-ai/uk0rRc4uKsjKwtaR/_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/karta-ai/uk0rRc4uKsjKwtaR/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create phone call - Karta API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create an outbound phone call.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Karta API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.getkarta.ai/api-reference/calls/create-phone-call\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://karta-ai.mintlify.site/_mintlify/api/og/v2?division=Calls\u0026amp;title=Create+phone+call\u0026amp;description=Create+an+outbound+phone+call.\u0026amp;theme=1a84d298eeb1b9a7917fc4bf\u0026amp;signature=11dd203ef0d98bc20e508b6658d5c2a3dac257a0dbd12176d6aa208f52bf392c\">\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=\"Create phone call - Karta API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create an outbound phone call.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://karta-ai.mintlify.site/_mintlify/api/og/v2?division=Calls\u0026amp;title=Create+phone+call\u0026amp;description=Create+an+outbound+phone+call.\u0026amp;theme=1a84d298eeb1b9a7917fc4bf\u0026amp;signature=11dd203ef0d98bc20e508b6658d5c2a3dac257a0dbd12176d6aa208f52bf392c\">\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/karta-ai/uk0rRc4uKsjKwtaR/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Karta API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF8256\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.getkarta.ai/api-reference/calls/create-phone-call\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/calls/create-phone-call.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.getkarta.ai/#organization\",\"name\":\"Karta API\",\"url\":\"https://docs.getkarta.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/karta-ai/yiE-h5kOgKoDT-G-/logo/light.svg?fit=max\u0026auto=format\u0026n=yiE-h5kOgKoDT-G-\u0026q=85\u0026s=8df96a7426f71bb793915ed039564b6b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.getkarta.ai#website\",\"name\":\"Karta API\",\"url\":\"https://docs.getkarta.ai\",\"publisher\":{\"@id\":\"https://docs.getkarta.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.getkarta.ai/api-reference/calls/create-phone-call#webpage\",\"url\":\"https://docs.getkarta.ai/api-reference/calls/create-phone-call\",\"name\":\"Create phone call\",\"description\":\"Create an outbound phone call.\",\"dateModified\":\"2026-10-08T05:01:19.790Z\",\"isPartOf\":{\"@id\":\"https://docs.getkarta.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.getkarta.ai/api-reference/calls/create-phone-call#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.getkarta.ai/api-reference/calls/create-phone-call#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Karta API\",\"item\":\"https://docs.getkarta.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create phone call\",\"item\":\"https://docs.getkarta.ai/api-reference/calls/create-phone-call\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.getkarta.ai/api-reference/calls/create-phone-call#apireference\",\"headline\":\"Create phone call\",\"name\":\"Create phone call\",\"description\":\"Create an outbound phone call.\",\"url\":\"https://docs.getkarta.ai/api-reference/calls/create-phone-call\",\"mainEntityOfPage\":{\"@id\":\"https://docs.getkarta.ai/api-reference/calls/create-phone-call#webpage\"},\"dateModified\":\"2026-10-08T05:01:19.790Z\",\"publisher\":{\"@id\":\"https://docs.getkarta.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.getkarta.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Karta API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Karta API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/calls/create-phone-call.md","siteName":"Karta API","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API reference","groups":[{"group":"Get started","pages":[{"title":"Karta API reference","sidebarTitle":"Introduction","href":"/api-reference/overview"}]},{"group":"Account","pages":[{"openapi":"openapi.json GET /client","title":"Get account","href":"/api-reference/account/get-account"}]},{"group":"Agents","pages":[{"openapi":"openapi.json GET /client/agents","title":"List agents","href":"/api-reference/agents/list-agents"},{"openapi":"openapi.json GET /voice/agents/{agent_id}","title":"Get voice agent details","href":"/api-reference/agents/get-voice-agent-details"},{"openapi":"openapi.json POST /agent/logs","description":"Search call logs to review agent activity and troubleshoot calls.","title":"Get agent logs","href":"/api-reference/agents/list-agent-logs"}]},{"group":"Calls","pages":[{"openapi":"openapi.json POST /voice/calls/phone","title":"Create phone call","href":"/api-reference/calls/create-phone-call"},{"openapi":"openapi.json POST /voice/calls/web","description":"Create a web call and retrieve its connection credentials.","title":"Create web call","href":"/api-reference/calls/create-web-call"},{"openapi":"openapi.json GET /voice/calls/{call_id}","title":"Get call","href":"/api-reference/calls/get-call"}]},{"group":"Phone numbers","pages":[{"openapi":"openapi.json GET /voice/phone-numbers","title":"List phone numbers","href":"/api-reference/phone-numbers/list-phone-numbers"}]},{"group":"Campaigns","pages":[{"openapi":"openapi.json POST /voice/campaigns","title":"Create campaign","href":"/api-reference/campaigns/create-campaign"},{"openapi":"openapi.json GET /voice/campaigns","title":"List campaigns","href":"/api-reference/campaigns/list-campaigns"},{"openapi":"openapi.json PATCH /voice/campaigns/{campaign_id}","title":"Cancel campaign","href":"/api-reference/campaigns/cancel-campaign"}]},{"group":"WebSocket sessions","pages":[{"openapi":"openapi.json POST /websocket/sessions","title":"Create WebSocket session","href":"/api-reference/realtime/create-websocket-session"}]},{"group":"Billing","pages":[{"openapi":"openapi.json GET /billing","title":"Get credit balance","href":"/api-reference/billing/get-credit-balance"},{"openapi":"openapi.json GET /billing/transactions","title":"List transactions","href":"/api-reference/billing/list-transactions"}]},{"group":"Webhooks","pages":[{"openapi":"openapi.json webhook callEvent","playground":"none","title":"Call events","href":"/api-reference/webhooks/call-events"}]}]}]},"basePath":"","title":"Create phone call - Karta API","buildId":"dpl_715YoAgvjTGBDdo8RtXmHKM22b5p","deploymentId":"dpl_715YoAgvjTGBDdo8RtXmHKM22b5p","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BvKnMd7F.js","utils-BMt52org.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-CGXZuDGO.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dl57XWH2.js","snippetPresets-CWd8CxSk.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BR-Wkc_D.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-YMmi08aZ.js","shallow-DBC1OB78.js","getApiPlaygroundDisplay-Be7mmEzP.js","CodeSnippet-B14o1TgQ.js","CodeSnippets-CJ2q3fTq.js","Page-Chgj7sZe.js","getPastedJson-DnpLXm8x.js","icon-BpkSFtdK.js","MethodPill-BO3zPf-g.js","DuplicateIcon-Bib3qwfw.js","createIcon-CY2noFo3.js","DynamicMarkdown-TAXIW2vN.js","SectionHeading-Dfs3Fmfw.js","axios-vUo_bRtp.js","Markdown-CGAo_eqA.js","clsx-BNa-H6W6.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-r2tNEC1n.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-B7oWe6jc.js"]}