Returns the log lines written by the GenAI functions of an account, one entry per line, with the event label and the span the function ran in. Filter by conversation, function, level, environment, error type, whole-word text, or the exact span. The raw log line and its payload are never returned. See the overview for how lines link to spans.
Request
Headers
string
required
Account API key with read access to conversations.
Body
string
Restrict to one agent. Omit to search the whole account.
string
Matches the conversation ID or the call SID.
string[]
Function (tool) names, up to 20.
string[]
debug, info, warning, error, critical.
string[]
Environments: test, sandbox, pre-release, live, scenarios. pre-release is the Staging environment.
string[]
Exception classes on failure lines, for example KeyError, up to 20.
object
Whole-word, case-insensitive terms matched on the event label: { "all": [...], "any": [...], "none": [...] }, up to 10 terms each. api request finds API request error; api req does not.
string
Trace ID of the function-execution span.
string
Span ID of the function-execution span. Returns exactly the lines that one execution wrote.
integer
0-based turn the function call belongs to. Must be an integer.
datetime
Inclusive window start. Defaults to 24 hours before to. The window may span at most 30 days.
datetime
Exclusive window end. Defaults to now. The response echoes the value used; pass it back when paging so new lines do not shift the pages.
string
default:"desc"
desc (newest first) or asc.
integer
default:"50"
Lines per page, 1–100.
integer
default:"0"
Lines to skip, 0–1000.
Response
object[]
One entry per log line.
Show properties
datetime
string
string
string
string
string
string
string
The event label the function logged, for example API request error.
string
Exception class on a failure line, for example KeyError. Empty otherwise.
string
Trace ID of the function-execution span. Empty when the line is not linked.
string
Span ID of the function-execution span. Empty when the line is not linked.
string
0-based turn the call belongs to, as a string. Empty when unknown.
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"PolyAI Platform","description":"PolyAI Platform documentation. Build, deploy, and monitor enterprise voice and chat agents ready for real customer conversations.","colors":{"primary":"#4a7c10","light":"#d9ee50","dark":"#3a6b08"},"logo":{"light":"https://mintcdn.com/polyai/V_YcZRE9nVwqIC42/logo/light.png?fit=max\u0026auto=format\u0026n=V_YcZRE9nVwqIC42\u0026q=85\u0026s=9b0704a17c929bf077c3b76f8dd9b852","dark":"https://mintcdn.com/polyai/V_YcZRE9nVwqIC42/logo/dark.png?fit=max\u0026auto=format\u0026n=V_YcZRE9nVwqIC42\u0026q=85\u0026s=8259c01154fc1823ae0d1a563bb20485"},"favicon":"https://mintcdn.com/polyai/5TqB0Il1JYn5J7QH/favicon.png?fit=max\u0026auto=format\u0026n=5TqB0Il1JYn5J7QH\u0026q=85\u0026s=8c7b583905e3376fb8df880384dc2421","background":{"decoration":"windows"},"navbar":{"links":[{"href":"https://docs.poly.ai/releases/overview","label":"Release notes"},{"href":"https://studio.us.poly.ai/","label":"Studio"},{"href":"https://github.com/polyai/android-sdk","label":"Android SDK"},{"href":"https://github.com/polyai/ios-sdk","label":"iOS SDK"}],"primary":{"type":"button","label":"Request a demo","href":"https://poly.ai/request-a-demo/"}},"footer":{"socials":{"x":"https://x.com/polyaivoice","youtube":"https://www.youtube.com/@polyaivoice","facebook":"https://www.facebook.com/PolyAIVoice","linkedin":"https://www.linkedin.com/company/polyai","discord":"https://discord.gg/wvyMKEpjkX"},"links":[{"header":"Resources","items":[{"label":"PolyAI website","href":"https://www.poly.ai"},{"label":"Request a demo","href":"https://poly.ai/request-a-demo"}]},{"header":"Legal","items":[{"label":"Privacy policy","href":"https://www.poly.ai/privacy-policy"},{"label":"Terms of use","href":"https://poly.ai/terms-of-use"}]}]},"search":{"prompt":"Search PolyAI docs..."},"seo":{"organization":{"id":"https://poly.ai/#organization","name":"PolyAI","legalName":"PolyAI Limited","url":"https://poly.ai","logo":"https://docs.poly.ai/logo/dark.png","sameAs":["https://poly.ai","https://github.com/polyai","https://www.linkedin.com/company/polyai/","https://pypi.org/project/polyai-adk/"]},"indexing":"navigable"},"fonts":{"heading":{"family":"Inter","weight":600},"body":{"family":"Inter","weight":400}},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":false},"integrations":{"ga4":{"measurementId":"G-6NHTTPDGSX"}},"banner":{"content":"Agent Studio has a new look. [See what changed](/get-started/whats-new)","dismissible":true},"errors":{"404":{"redirect":false,"title":"Page not found","description":"This page doesn't exist. Try the [documentation home](/home), the [API reference](/api-reference/introduction), or use search to find what you need."}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"navigation":{"global":{"anchors":[{"anchor":"Home","icon":"book-open-cover","href":"https://docs.poly.ai/home"},{"anchor":"Community","icon":"slack","href":"https://polyaijupiter-uki8686.slack.com/archives/C075ST5UK7Y"},{"anchor":"Blog","icon":"newspaper","href":"https://poly.ai/resources/?_resource_type=post"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"polyai","hasAudioNarration":false,"actualSubdomain":"polyai","customDomains":["docs.poly.ai"],"gitSource":{"type":"github","owner":"polyai-ldn","repo":"polyai-mintlify-doc","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b00bbfdc524b540ef007b02","clientVersion":"0.0.4248","searchFilterCounts":[{"language":"default","tag":"API reference","count":208},{"language":"default","tag":"Agent Studio","count":151},{"language":"default","tag":"Build \u0026 deploy","count":136},{"language":"default","tag":"Agents API","count":119},{"language":"default","tag":"Runtime \u0026 data","count":46},{"language":"default","tag":"ADK","count":41},{"language":"default","tag":"Integrations","count":41},{"language":"default","tag":"Academy","count":30},{"language":"default","tag":"Dialog-RSN-1","count":24},{"language":"default","tag":"Release notes","count":24}]},"assistantConfig":{"enableStarterQuestions":false},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":":root{--studio-lime: #d9ee50;--studio-lime-12: rgba(217, 238, 80, 0.12);--studio-lime-22: rgba(217, 238, 80, 0.22);--studio-lime-35: rgba(217, 238, 80, 0.35);--studio-ink: #161617;--studio-paper: #fcfcfc}footer{position:relative;z-index:10;background:transparent!important;border-top:none!important;box-shadow:none!important;font-size:0.85rem!important}footer a[href=\"/\"] img{height:auto!important;width:auto!important;max-height:24px!important}footer a{color:inherit!important;text-decoration:none!important;text-decoration-thickness:0.08em;text-underline-offset:0.14em;transition:color 140ms ease, text-decoration-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease}footer a:hover{text-decoration:underline!important;text-decoration-color:var(--studio-lime)!important}footer a:focus-visible{outline:2px solid var(--studio-lime)!important;outline-offset:2px!important;border-radius:8px}footer a[href*=\"facebook\"],footer a[href*=\"linkedin\"],footer a[href*=\"youtube\"],footer a[href*=\"x.com\"],footer a[href*=\"twitter\"],footer a[href*=\"instagram\"]{margin:0 0.25rem!important;display:inline-flex;align-items:center;justify-content:center;padding:0.2rem 0.3rem!important;border-radius:10px}footer a[href*=\"facebook\"]:hover,footer a[href*=\"linkedin\"]:hover,footer a[href*=\"youtube\"]:hover,footer a[href*=\"x.com\"]:hover,footer a[href*=\"twitter\"]:hover,footer a[href*=\"instagram\"]:hover{background:var(--studio-lime-12)!important;box-shadow:inset 0 0 0 1px var(--studio-lime-22);transform:translateY(-1px)}footer a[href*=\"facebook\"] svg,footer a[href*=\"linkedin\"] svg,footer a[href*=\"youtube\"] svg,footer a[href*=\"x.com\"] svg,footer a[href*=\"twitter\"] svg,footer a[href*=\"instagram\"] svg{width:18px!important;height:18px!important;vertical-align:middle!important;transition:filter 140ms ease, transform 140ms ease}footer a[href*=\"facebook\"]:hover svg,footer a[href*=\"linkedin\"]:hover svg,footer a[href*=\"youtube\"]:hover svg,footer a[href*=\"x.com\"]:hover svg,footer a[href*=\"twitter\"]:hover svg,footer a[href*=\"instagram\"]:hover svg{filter:drop-shadow(0 0 6px var(--studio-lime-35));transform:scale(1.03)}footer a[href*=\"facebook\"]:focus-visible,footer a[href*=\"linkedin\"]:focus-visible,footer a[href*=\"youtube\"]:focus-visible,footer a[href*=\"x.com\"]:focus-visible,footer a[href*=\"twitter\"]:focus-visible,footer a[href*=\"instagram\"]:focus-visible{background:var(--studio-lime-12)!important;box-shadow:inset 0 0 0 1px var(--studio-lime-22)}footer a[href=\"/\"]{text-align:left!important}footer a[href=\"/\"]:hover img{filter:drop-shadow(0 0 10px var(--studio-lime-22))}footer a[href=\"/\"]:focus-visible img{filter:drop-shadow(0 0 10px var(--studio-lime-22))}[data-mint-footer-bottom]{padding-top:0!important}footer+div{padding-top:0!important}@media (prefers-reduced-motion: reduce){footer a,footer a svg,footer a img{transition:none!important;transform:none!important}}[data-tag=\"Code\"] [data-testid=\"tag\"],nav [data-testid=\"tag\"]:has-text(\"Code\"){background-color:rgba(99, 102, 241, 0.1)!important;color:#5b5de7!important;border:1px solid rgba(99, 102, 241, 0.2)!important}[data-tag=\"Advanced\"] [data-testid=\"tag\"],nav [data-testid=\"tag\"]:has-text(\"Advanced\"){background-color:rgba(234, 88, 12, 0.09)!important;color:#c2410c!important;border:1px solid rgba(234, 88, 12, 0.2)!important}.audience-callout{display:flex;align-items:flex-start;gap:0.65rem;padding:0.7rem 1rem;border-radius:8px;border-left:4px solid;font-size:0.88rem;line-height:1.55;margin-bottom:1.5rem}.audience-callout--ui{background:rgba(217, 238, 80, 0.08);border-color:var(--studio-lime);color:inherit}.audience-callout--developer{background:rgba(99, 102, 241, 0.07);border-color:#6366f1;color:inherit}.audience-callout--advanced{background:rgba(234, 88, 12, 0.07);border-color:#ea580c;color:inherit}:root{--home-tile-bg: #ffffff;--home-tile-border: rgba(22, 22, 23, 0.09);--home-fg: #161617;--home-muted: #5b6270;--home-eyebrow: #4a7c10;--home-code-bg: #fbfcf6}html.dark{--home-tile-bg: #17181a;--home-tile-border: rgba(255, 255, 255, 0.08);--home-fg: #f4f5ef;--home-muted: #99a0ab;--home-eyebrow: #bcdb4d;--home-code-bg: #101110}.home-eyebrow{display:inline-block;font-size:0.72rem;font-weight:600;letter-spacing:0.08em;text-transform:uppercase;color:var(--home-eyebrow);margin-bottom:0.4rem}.home-hero{position:relative;margin:0.75rem 0 3rem;padding:2.4rem 2.4rem 2.6rem;border-radius:20px;background:linear-gradient(158deg, rgba(217, 238, 80, 0.16), rgba(74, 124, 16, 0.05) 70%);border:1px solid rgba(74, 124, 16, 0.22)}html.dark .home-hero{background:linear-gradient(158deg, rgba(74, 124, 16, 0.28), rgba(217, 238, 80, 0.04) 75%);border-color:rgba(217, 238, 80, 0.18)}.home-hero-title{font-size:2.4rem;line-height:1.08;font-weight:700;letter-spacing:-0.01em;margin:0.5rem 0 0.85rem;color:var(--home-fg);max-width:18ch}.home-hero-sub{font-size:1.1rem;line-height:1.55;color:var(--home-muted);margin:0 0 1.7rem;max-width:62ch}.home-cta-row{display:flex;flex-wrap:wrap;gap:0.6rem}.home-btn{display:inline-flex;align-items:center;gap:0.45rem;padding:0.62rem 1.1rem;border-radius:11px;font-size:0.95rem;font-weight:600;text-decoration:none;transition:transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease}.home-btn-primary{background:#d9ee50;color:#1f3a04;box-shadow:0 8px 22px -10px rgba(74, 124, 16, 0.7)}.home-btn-primary:hover{transform:translateY(-1px)}.home-btn-ghost{background:transparent;color:var(--home-fg);border:1px solid var(--home-tile-border);font-weight:500}.home-btn-ghost:hover{border-color:rgba(74, 124, 16, 0.45)}.home-term{max-width:620px;margin:1.75rem 0 0;border-radius:14px;border:1px solid var(--home-tile-border);background:var(--home-tile-bg);overflow:hidden}.term-head{display:flex;align-items:center;gap:0.4rem;padding:0.7rem 1.1rem;border-bottom:1px solid var(--home-tile-border)}.term-dot{width:10px;height:10px;border-radius:50%;background:var(--home-tile-border)}.term-title{margin-left:0.45rem;font-size:0.82rem;font-weight:600;color:var(--home-fg)}.term-body{padding:1.1rem 1.3rem;background:var(--home-code-bg);font-family:var(--font-mono, ui-monospace, \"SF Mono\", Menlo, monospace);font-size:0.83rem;line-height:1.5;overflow-x:auto}.term-line{display:flex;gap:1rem;padding:0.22rem 0;white-space:nowrap}.term-cmd{flex:none;min-width:6.5rem;color:var(--home-fg)}.term-cmd .term-p{color:#4a7c10;margin-right:0.5rem}html.dark .term-cmd .term-p{color:#bcdb4d}.term-c{color:var(--home-muted)}.term-foot{display:block;padding:0.85rem 1.3rem;border-top:1px solid var(--home-tile-border);font-size:0.85rem;font-weight:600;color:var(--home-eyebrow);text-decoration:none;transition:background 140ms ease}.term-foot:hover{background:rgba(74, 124, 16, 0.06)}html.dark .term-foot:hover{background:rgba(217, 238, 80, 0.08)}html[data-current-path=\"/home\"] .mdx-content{max-width:880px}html[data-current-path=\"/home\"] .home-hero{margin:1rem 0 4rem;padding:2.75rem 2.75rem 3rem}html[data-current-path=\"/home\"] .mdx-content>h2{margin-top:4.5rem;margin-bottom:1.25rem;scroll-margin-top:6rem}html[data-current-path=\"/home\"] .mdx-content>p{margin:0 0 1.4rem;line-height:1.72}html[data-current-path=\"/home\"] .mdx-content>ul{margin:0.25rem 0 1.75rem}html[data-current-path=\"/home\"] .mdx-content>ul>li{margin:0.6rem 0;line-height:1.68}html[data-current-path=\"/home\"] .home-term{margin:2.25rem auto 0.5rem}@media (max-width: 640px){.home-hero{padding:1.8rem 1.5rem 2rem}.home-hero-title{font-size:2rem}.term-line{white-space:normal}html[data-current-path=\"/home\"] .home-hero{padding:1.9rem 1.6rem 2.1rem;margin-bottom:3rem}html[data-current-path=\"/home\"] .mdx-content>h2{margin-top:3.25rem}}@media (prefers-reduced-motion: reduce){.home-btn{transition:none!important;transform:none!important}}#navbar a[href=\"/login\"],#navbar button[data-testid=\"login-button\"],nav a[href=\"/login\"]{display:none!important}.mdx-content table th,.mdx-content table th strong,.prose table th{font-weight:600!important}"}]}
{"page":{"pagePath":"api-reference/traces/endpoint/search-logs","slug":"/api-reference/traces/endpoint/search-logs","pageMetadata":{"title":"Search function logs","api":"POST /api/v1/traces/logs/search","description":"Page through the log lines your GenAI functions wrote, newest first.","href":"/api-reference/traces/endpoint/search-logs"},"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: \"Page through the log lines your GenAI functions wrote, newest first.\"\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`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Expandable,Heading,ParamField,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Returns the log lines written by the GenAI functions of an account, one entry per line, with the event label and the span the function ran in. Filter by conversation, function, level, environment, error type, whole-word text, or the exact span. The raw log line and its payload are never returned. See the `,_jsx(_components.a,{href:`/api-reference/traces/introduction#function-logs`,children:`overview`}),` for how lines link to spans.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`X-API-KEY`,type:`string`,required:true,id:`param-x-api-key`,children:_jsx(_components.p,{children:`Account API key with read access to conversations.`})}),`\n`,_jsx(Heading,{level:`3`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`project_id`,type:`string`,id:`param-project-id`,children:_jsx(_components.p,{children:`Restrict to one agent. Omit to search the whole account.`})}),`\n`,_jsx(ParamField,{body:`conversation_id`,type:`string`,id:`param-conversation-id`,children:_jsx(_components.p,{children:`Matches the conversation ID or the call SID.`})}),`\n`,_jsx(ParamField,{body:`function_names`,type:`string[]`,id:`param-function-names`,children:_jsx(_components.p,{children:`Function (tool) names, up to 20.`})}),`\n`,_jsx(ParamField,{body:`levels`,type:`string[]`,id:`param-levels`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`debug`}),`, `,_jsx(_components.code,{children:`info`}),`, `,_jsx(_components.code,{children:`warning`}),`, `,_jsx(_components.code,{children:`error`}),`, `,_jsx(_components.code,{children:`critical`}),`.`]})}),`\n`,_jsx(ParamField,{body:`client_envs`,type:`string[]`,id:`param-client-envs`,children:_jsxs(_components.p,{children:[`Environments: `,_jsx(_components.code,{children:`test`}),`, `,_jsx(_components.code,{children:`sandbox`}),`, `,_jsx(_components.code,{children:`pre-release`}),`, `,_jsx(_components.code,{children:`live`}),`, `,_jsx(_components.code,{children:`scenarios`}),`. `,_jsx(_components.code,{children:`pre-release`}),` is the Staging environment.`]})}),`\n`,_jsx(ParamField,{body:`error_types`,type:`string[]`,id:`param-error-types`,children:_jsxs(_components.p,{children:[`Exception classes on failure lines, for example `,_jsx(_components.code,{children:`KeyError`}),`, up to 20.`]})}),`\n`,_jsx(ParamField,{body:`text`,type:`object`,id:`param-text`,children:_jsxs(_components.p,{children:[`Whole-word, case-insensitive terms matched on the event label: `,_jsx(_components.code,{children:`{ \"all\": [...], \"any\": [...], \"none\": [...] }`}),`, up to 10 terms each. `,_jsx(_components.code,{children:`api request`}),` finds `,_jsx(_components.code,{children:`API request error`}),`; `,_jsx(_components.code,{children:`api req`}),` does not.`]})}),`\n`,_jsx(ParamField,{body:`trace_id`,type:`string`,id:`param-trace-id`,children:_jsx(_components.p,{children:`Trace ID of the function-execution span.`})}),`\n`,_jsx(ParamField,{body:`span_id`,type:`string`,id:`param-span-id`,children:_jsx(_components.p,{children:`Span ID of the function-execution span. Returns exactly the lines that one execution wrote.`})}),`\n`,_jsx(ParamField,{body:`turn_index`,type:`integer`,id:`param-turn-index`,children:_jsx(_components.p,{children:`0-based turn the function call belongs to. Must be an integer.`})}),`\n`,_jsx(ParamField,{body:`from`,type:`datetime`,id:`param-from`,children:_jsxs(_components.p,{children:[`Inclusive window start. Defaults to 24 hours before `,_jsx(_components.code,{children:`to`}),`. The window may span at most 30 days.`]})}),`\n`,_jsx(ParamField,{body:`to`,type:`datetime`,id:`param-to`,children:_jsx(_components.p,{children:`Exclusive window end. Defaults to now. The response echoes the value used; pass it back when paging so new lines do not shift the pages.`})}),`\n`,_jsx(ParamField,{body:`order`,type:`string`,default:`desc`,id:`param-order`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`desc`}),` (newest first) or `,_jsx(_components.code,{children:`asc`}),`.`]})}),`\n`,_jsx(ParamField,{body:`limit`,type:`integer`,default:`50`,id:`param-limit`,children:_jsx(_components.p,{children:`Lines per page, 1–100.`})}),`\n`,_jsx(ParamField,{body:`offset`,type:`integer`,default:`0`,id:`param-offset`,children:_jsx(_components.p,{children:`Lines to skip, 0–1000.`})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(ResponseField,{name:`logs`,type:`object[]`,id:`param-logs`,children:[_jsx(_components.p,{children:`One entry per log line.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`timestamp`,type:`datetime`,id:`param-timestamp`}),_jsx(ResponseField,{name:`level`,type:`string`,id:`param-level`}),_jsx(ResponseField,{name:`project_id`,type:`string`,id:`param-project-id-1`}),_jsx(ResponseField,{name:`client_env`,type:`string`,id:`param-client-env`}),_jsx(ResponseField,{name:`function_name`,type:`string`,id:`param-function-name`}),_jsx(ResponseField,{name:`conversation_id`,type:`string`,id:`param-conversation-id-1`}),_jsx(ResponseField,{name:`call_sid`,type:`string`,id:`param-call-sid`}),_jsx(ResponseField,{name:`event`,type:`string`,id:`param-event`,children:_jsxs(_components.p,{children:[`The event label the function logged, for example `,_jsx(_components.code,{children:`API request error`}),`.`]})}),_jsx(ResponseField,{name:`error_type`,type:`string`,id:`param-error-type`,children:_jsxs(_components.p,{children:[`Exception class on a failure line, for example `,_jsx(_components.code,{children:`KeyError`}),`. Empty otherwise.`]})}),_jsx(ResponseField,{name:`trace_id`,type:`string`,id:`param-trace-id-1`,children:_jsx(_components.p,{children:`Trace ID of the function-execution span. Empty when the line is not linked.`})}),_jsx(ResponseField,{name:`span_id`,type:`string`,id:`param-span-id-1`,children:_jsx(_components.p,{children:`Span ID of the function-execution span. Empty when the line is not linked.`})}),_jsx(ResponseField,{name:`turn_index`,type:`string`,id:`param-turn-index-1`,children:_jsx(_components.p,{children:`0-based turn the call belongs to, as a string. Empty when unknown.`})})]})]}),`\n`,_jsx(ResponseField,{name:`from`,type:`datetime`,id:`param-from-1`,children:_jsx(_components.p,{children:`Window start actually used.`})}),`\n`,_jsx(ResponseField,{name:`to`,type:`datetime`,id:`param-to-1`,children:_jsx(_components.p,{children:`Window end actually used.`})}),`\n`,_jsx(ResponseField,{name:`limit`,type:`integer`,id:`param-limit-1`}),`\n`,_jsx(ResponseField,{name:`offset`,type:`integer`,id:`param-offset-1`}),`\n`,_jsx(ResponseField,{name:`has_more`,type:`boolean`,id:`param-has-more`}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(Heading,{level:`3`,id:`errors-from-one-function-in-the-last-24-hours`,children:`Errors from one function in the last 24 hours`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` POST`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` https://api.us.poly.ai/api/v1/traces/logs/search`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"X-API-KEY: YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -d`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"project_id\": \"PROJECT-V258TF29\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"function_names\": [\"send_sms\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"levels\": [\"error\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"limit\": 2`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Response`,numberOfLines:`23`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`23`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"logs\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-10-26T18:22:36.175000+00:00\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"level\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"project_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"PROJECT-V258TF29\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"client_env\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"live\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"function_name\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"send_sms\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"conversation_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"CA3f2c1e9d6b7a4f8e9c0d1b2a3c4d5e6f\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"call_sid\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"CA3f2c1e9d6b7a4f8e9c0d1b2a3c4d5e6f\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"event\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"SMS failed to send\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"trace_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"183208fafb304cebf5e07c90f7b48f0f\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"span_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"8cff57c6d5aaa768\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"turn_index\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"10\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"from\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-10-26T13:57:43.353614+00:00\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"to\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-10-27T13:57:43.353614+00:00\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"limit\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`2`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"offset\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"has_more\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`everything-one-execution-wrote`,children:`Everything one execution wrote`}),`\n`,_jsxs(_components.p,{children:[`Take `,_jsx(_components.code,{children:`span_id`}),` from a search result, or from a span search, and pass it back:`]}),`\n`,_jsx(CodeBlock,{filename:`Request`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"project_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"PROJECT-V258TF29\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"span_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"8cff57c6d5aaa768\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"order\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"asc\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`uncaught-exceptions-in-a-conversation`,children:`Uncaught exceptions in a conversation`}),`\n`,_jsx(CodeBlock,{filename:`Request`,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"project_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"PROJECT-V258TF29\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"conversation_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"CA3f2c1e9d6b7a4f8e9c0d1b2a3c4d5e6f\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_types\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"KeyError\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"TimeoutError\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"from\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-10-20T00:00:00Z\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"to\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-10-27T00:00:00Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\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:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:`The window is empty or exceeds 30 days.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:`Missing or invalid API key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`The key cannot read conversations.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsxs(_components.td,{children:[`A value is outside its enum or range, or `,_jsx(_components.code,{children:`turn_index`}),` is not an integer.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`502`})}),_jsx(_components.td,{children:`The log backend did not answer.`})]})]})]})]})}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":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Search function logs","api":"POST /api/v1/traces/logs/search","description":"Page through the log lines your GenAI functions wrote, newest first.","href":"/api-reference/traces/endpoint/search-logs"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request","slug":"request","depth":2,"children":[{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Body","slug":"body","depth":3,"children":[]}]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Examples","slug":"examples","depth":2,"children":[{"title":"Errors from one function in the last 24 hours","slug":"errors-from-one-function-in-the-last-24-hours","depth":3,"children":[]},{"title":"Everything one execution wrote","slug":"everything-one-execution-wrote","depth":3,"children":[]},{"title":"Uncaught exceptions in a conversation","slug":"uncaught-exceptions-in-a-conversation","depth":3,"children":[]}]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Search function logs","path":"/api/v1/traces/logs/search","method":"post","request":{"security":[],"parameters":{"query":{},"header":{"X-API-KEY":{"schema":[{"type":"string","description":"Account API key with read access to conversations.","required":true}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"project_id":[{"type":"string","description":"Restrict to one agent. Omit to search the whole account."}],"conversation_id":[{"type":"string","description":"Matches the conversation ID or the call SID."}],"function_names":[{"type":"array","items":[{"type":"string"}],"description":"Function (tool) names, up to 20."}],"levels":[{"type":"array","items":[{"type":"string"}],"description":"`debug` , `info` , `warning` , `error` , `critical` ."}],"client_envs":[{"type":"array","items":[{"type":"string"}],"description":"Environments: `test` , `sandbox` , `pre-release` , `live` , `scenarios` . `pre-release` is the Staging environment."}],"error_types":[{"type":"array","items":[{"type":"string"}],"description":"Exception classes on failure lines, for example `KeyError` , up to 20."}],"text":[{"type":"object","properties":{},"description":"Whole-word, case-insensitive terms matched on the event label: `{ \"all\": [...], \"any\": [...], \"none\": [...] }` , up to 10 terms each. `api request` finds `API request error` ; `api req` does not."}],"trace_id":[{"type":"string","description":"Trace ID of the function-execution span."}],"span_id":[{"type":"string","description":"Span ID of the function-execution span. Returns exactly the lines that one execution wrote."}],"turn_index":[{"type":"integer","description":"0-based turn the function call belongs to. Must be an integer."}],"from":[{"type":"object","properties":{},"description":"Inclusive window start. Defaults to 24 hours before `to` . The window may span at most 30 days."}],"to":[{"type":"object","properties":{},"description":"Exclusive window end. Defaults to now. The response echoes the value used; pass it back when paging so new lines do not shift the pages."}],"order":[{"type":"string","description":"`desc` (newest first) or `asc` ."}],"limit":[{"type":"integer","description":"Lines per page, 1–100."}],"offset":[{"type":"integer","description":"Lines to skip, 0–1000."}]}}],"examples":{"example":{"value":{"project_id":"\u003cstring>","conversation_id":"\u003cstring>","function_names":["\u003cstring>"],"levels":["\u003cstring>"],"client_envs":["\u003cstring>"],"error_types":["\u003cstring>"],"text":{},"trace_id":"\u003cstring>","span_id":"\u003cstring>","turn_index":123,"from":{},"to":{},"order":"\u003cstring>","limit":123,"offset":123}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"logs":[{"type":"array","items":[{"type":"object","properties":{"timestamp":[{"type":"object","properties":{}}],"level":[{"type":"string"}],"project_id":[{"type":"string"}],"client_env":[{"type":"string"}],"function_name":[{"type":"string"}],"conversation_id":[{"type":"string"}],"call_sid":[{"type":"string"}],"event":[{"type":"string","description":"The event label the function logged, for example `API request error` ."}],"error_type":[{"type":"string","description":"Exception class on a failure line, for example `KeyError` . Empty otherwise."}],"trace_id":[{"type":"string","description":"Trace ID of the function-execution span. Empty when the line is not linked."}],"span_id":[{"type":"string","description":"Span ID of the function-execution span. Empty when the line is not linked."}],"turn_index":[{"type":"string","description":"0-based turn the call belongs to, as a string. Empty when unknown."}]}}],"description":"One entry per log line."}],"from":[{"type":"object","properties":{},"description":"Window start actually used."}],"to":[{"type":"object","properties":{},"description":"Window end actually used."}],"limit":[{"type":"integer"}],"offset":[{"type":"integer"}],"has_more":[{"type":"boolean"}]}}],"examples":{"example":{"value":{"logs":[{"timestamp":{},"level":"\u003cstring>","project_id":"\u003cstring>","client_env":"\u003cstring>","function_name":"\u003cstring>","conversation_id":"\u003cstring>","call_sid":"\u003cstring>","event":"\u003cstring>","error_type":"\u003cstring>","trace_id":"\u003cstring>","span_id":"\u003cstring>","turn_index":"\u003cstring>"}],"from":{},"to":{},"limit":123,"offset":123,"has_more":true}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"polyai","siteName":"PolyAI Platform","title":"Search function logs - PolyAI Platform","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T14:48:47.223Z","gitLastModified":"2026-11-10T14:39:37.000Z","originalFileLocation":"api-reference/traces/endpoint/search-logs.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=\"Page through the log lines your GenAI functions wrote, newest first.\">\u003cmeta data-mint-head name=\"application-name\" content=\"PolyAI Platform\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/polyai/JgpL71FS67wXTWm8/_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/polyai/JgpL71FS67wXTWm8/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/polyai/JgpL71FS67wXTWm8/_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/polyai/JgpL71FS67wXTWm8/_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/polyai/JgpL71FS67wXTWm8/_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/polyai/JgpL71FS67wXTWm8/_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/polyai/JgpL71FS67wXTWm8/_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/polyai/JgpL71FS67wXTWm8/_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/polyai/JgpL71FS67wXTWm8/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Search function logs - PolyAI Platform\">\u003cmeta data-mint-head property=\"og:description\" content=\"Page through the log lines your GenAI functions wrote, newest first.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"PolyAI Platform\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.poly.ai/api-reference/traces/endpoint/search-logs\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://polyai.mintlify.site/_mintlify/api/og/v2?division=Traces+API\u0026amp;title=Search+function+logs\u0026amp;description=Page+through+the+log+lines+your+GenAI+functions+wrote%2C+newest+first.\u0026amp;theme=f76f95fb1a1c1406194b1abe\u0026amp;signature=be175c534b2e2e51cfad00cbb9378a89bdd8dcb358865f88116ce413047d6f15\">\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=\"Search function logs - PolyAI Platform\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Page through the log lines your GenAI functions wrote, newest first.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://polyai.mintlify.site/_mintlify/api/og/v2?division=Traces+API\u0026amp;title=Search+function+logs\u0026amp;description=Page+through+the+log+lines+your+GenAI+functions+wrote%2C+newest+first.\u0026amp;theme=f76f95fb1a1c1406194b1abe\u0026amp;signature=be175c534b2e2e51cfad00cbb9378a89bdd8dcb358865f88116ce413047d6f15\">\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/polyai/JgpL71FS67wXTWm8/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"PolyAI Platform\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4a7c10\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.poly.ai/api-reference/traces/endpoint/search-logs\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/traces/endpoint/search-logs.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://poly.ai/#organization\",\"name\":\"PolyAI\",\"legalName\":\"PolyAI Limited\",\"url\":\"https://poly.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://docs.poly.ai/logo/dark.png\"},\"sameAs\":[\"https://poly.ai\",\"https://github.com/polyai\",\"https://www.linkedin.com/company/polyai/\",\"https://pypi.org/project/polyai-adk/\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.poly.ai#website\",\"name\":\"PolyAI Platform\",\"url\":\"https://docs.poly.ai\",\"publisher\":{\"@id\":\"https://poly.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.poly.ai/api-reference/traces/endpoint/search-logs#webpage\",\"url\":\"https://docs.poly.ai/api-reference/traces/endpoint/search-logs\",\"name\":\"Search function logs\",\"description\":\"Page through the log lines your GenAI functions wrote, newest first.\",\"dateModified\":\"2026-11-10T14:39:37.000Z\",\"isPartOf\":{\"@id\":\"https://docs.poly.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.poly.ai/api-reference/traces/endpoint/search-logs#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.poly.ai/api-reference/traces/endpoint/search-logs#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Runtime \u0026 data\",\"item\":\"https://docs.poly.ai/api-reference/chat/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Traces API\",\"item\":\"https://docs.poly.ai/api-reference/traces/introduction\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Search function logs\",\"item\":\"https://docs.poly.ai/api-reference/traces/endpoint/search-logs\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.poly.ai/api-reference/traces/endpoint/search-logs#apireference\",\"headline\":\"Search function logs\",\"name\":\"Search function logs\",\"description\":\"Page through the log lines your GenAI functions wrote, newest first.\",\"url\":\"https://docs.poly.ai/api-reference/traces/endpoint/search-logs\",\"mainEntityOfPage\":{\"@id\":\"https://docs.poly.ai/api-reference/traces/endpoint/search-logs#webpage\"},\"dateModified\":\"2026-11-10T14:39:37.000Z\",\"publisher\":{\"@id\":\"https://poly.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.poly.ai#website\"}}]}\u003c/script>","agentPointerHref":"/api-reference/traces/endpoint/search-logs.md","siteName":"PolyAI Platform","nav":{"global":{"anchors":[{"anchor":"Home","icon":"book-open-cover","href":"https://docs.poly.ai/home"},{"anchor":"Community","icon":"slack","href":"https://polyaijupiter-uki8686.slack.com/archives/C075ST5UK7Y"},{"anchor":"Blog","icon":"newspaper","href":"https://poly.ai/resources/?_resource_type=post"}]},"tabs":[{"tab":"Agent Studio","pages":[{"title":"Agent Studio","href":"/home"}]},{"tab":"Dialog-RSN-1","pages":[{"title":"Dialog-RSN-1","href":"/dialog-rsn-1/overview"}]},{"tab":"Academy","pages":[{"title":"Academy","href":"/learn/guides/polyacademy"}]},{"tab":"ADK","pages":[{"title":"ADK","href":"/adk"}]},{"tab":"API reference","groups":[{"group":"API reference","pages":[{"title":"API reference","sidebarTitle":"Overview","mode":"wide","href":"/api-reference/introduction"},{"title":"API quickstart","sidebarTitle":"Quickstart","href":"/api-reference/quickstart"},{"title":"Error codes","sidebarTitle":"Error codes","href":"/api-reference/error-codes"}]},{"group":"Models","pages":[{"group":"Dialog-RSN-1 API","pages":[{"title":"Dialog-RSN-1 API","sidebarTitle":"API reference","href":"/api-reference/dialog-rsn-1/reference"},{"title":"Dialog-RSN-1 limits and pricing","sidebarTitle":"Limits","href":"/api-reference/dialog-rsn-1/limits"}]}]},{"group":"Build \u0026 deploy","pages":[{"group":"Agents API","pages":[{"title":"Agents API","sidebarTitle":"Overview","href":"/api-reference/agents/introduction"},{"group":"Agents","pages":[{"title":"List agents","openapi":"GET /v1/accounts/{accountId}/agents","href":"/api-reference/agents/endpoint/agents/list-agents"},{"title":"Create agent","openapi":"POST /v1/accounts/{accountId}/agents","href":"/api-reference/agents/endpoint/agents/create-agent"},{"title":"Duplicate agent","openapi":"POST /v1/agents/{agentId}/duplicate","href":"/api-reference/agents/endpoint/agents/duplicate-agent"},{"title":"Delete agent","openapi":"DELETE /v1/agents/{agentId}","href":"/api-reference/agents/endpoint/agents/delete-agent"}]},{"group":"Branches","pages":[{"title":"List branches","openapi":"GET /v1/agents/{agentId}/branches","href":"/api-reference/agents/endpoint/branches/list-branches"},{"title":"Create branch","openapi":"POST /v1/agents/{agentId}/branches","href":"/api-reference/agents/endpoint/branches/create-branch"},{"title":"Merge branch","openapi":"POST /v1/agents/{agentId}/branches/{branchId}/merge","href":"/api-reference/agents/endpoint/branches/merge-branch"},{"title":"Delete branch","openapi":"DELETE /v1/agents/{agentId}/branches/{branchId}","href":"/api-reference/agents/endpoint/branches/delete-branch"},{"title":"Sync branch with parent","openapi":"api-reference/agents/openapi.json POST /v1/agents/{agentId}/branches/{branchId}/sync","href":"/api-reference/agents/endpoint/branches/sync-branch"},{"title":"Check branch divergence","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/divergence","href":"/api-reference/agents/endpoint/branches/check-branch-divergence"},{"title":"Get merge history for a branch","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/merge-history","href":"/api-reference/agents/endpoint/branches/get-merge-history"},{"title":"Deploy a branch","openapi":"api-reference/agents/openapi.json POST /v1/agents/{agentId}/branches/{branchId}/deploy","href":"/api-reference/agents/endpoint/branches/deploy-branch"},{"title":"Tag a branch as staging","openapi":"api-reference/agents/openapi.json PUT /v1/agents/{agentId}/branches/{branchId}/tag","href":"/api-reference/agents/endpoint/branches/tag-branch"},{"title":"Remove the tag from a branch","openapi":"api-reference/agents/openapi.json DELETE /v1/agents/{agentId}/branches/{branchId}/tag","href":"/api-reference/agents/endpoint/branches/untag-branch"},{"title":"List archived branches","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/archive","href":"/api-reference/agents/endpoint/branches/list-archived-branches"},{"title":"Restore an archived branch","openapi":"api-reference/agents/openapi.json POST /v1/agents/{agentId}/branches/{branchId}/restore","href":"/api-reference/agents/endpoint/branches/restore-branch"}]},{"group":"Agent behavior","pages":[{"title":"Get agent behavior rules","openapi":"GET /v1/agents/{agentId}/branches/{branchId}/behavior","href":"/api-reference/agents/endpoint/behavior/get-agent-behavior-rules"},{"title":"Update agent behavior rules","openapi":"PATCH /v1/agents/{agentId}/branches/{branchId}/behavior","href":"/api-reference/agents/endpoint/behavior/update-agent-behavior-rules"}]},{"group":"Knowledge base","pages":[{"title":"List knowledge base topics","openapi":"GET /v1/agents/{agentId}/branches/{branchId}/knowledge-base/topics","href":"/api-reference/agents/endpoint/knowledge-base/list-knowledge-base-topics"},{"title":"Create knowledge base topic","openapi":"POST /v1/agents/{agentId}/branches/{branchId}/knowledge-base/topics","href":"/api-reference/agents/endpoint/knowledge-base/create-knowledge-base-topic"},{"title":"Get knowledge base topic","openapi":"GET /v1/agents/{agentId}/branches/{branchId}/knowledge-base/topics/{topicId}","href":"/api-reference/agents/endpoint/knowledge-base/get-knowledge-base-topic"},{"title":"Update knowledge base topic","openapi":"PATCH /v1/agents/{agentId}/branches/{branchId}/knowledge-base/topics/{topicId}","href":"/api-reference/agents/endpoint/knowledge-base/update-knowledge-base-topic"},{"title":"Delete knowledge base topic","openapi":"DELETE /v1/agents/{agentId}/branches/{branchId}/knowledge-base/topics/{topicId}","href":"/api-reference/agents/endpoint/knowledge-base/delete-knowledge-base-topic"}]},{"group":"Builder knowledge","expanded":false,"pages":[{"title":"Search the builder knowledge base","openapi":"api-reference/agents/openapi.json GET /v1/builder-knowledge/search","href":"/api-reference/agents/endpoint/builder-knowledge/search-builder-knowledge"},{"title":"List builder knowledge categories","openapi":"api-reference/agents/openapi.json GET /v1/builder-knowledge/categories","href":"/api-reference/agents/endpoint/builder-knowledge/list-builder-knowledge-categories"},{"title":"Read a builder knowledge document","openapi":"api-reference/agents/openapi.json GET /v1/builder-knowledge/docs/{path}","href":"/api-reference/agents/endpoint/builder-knowledge/read-builder-knowledge-document"}]},{"group":"Flows and functions","pages":[{"group":"Flows","pages":[{"title":"List flows","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/flows","href":"/api-reference/agents/endpoint/flows-and-functions/list-flows"},{"title":"Create flow","openapi":"api-reference/agents/openapi.json POST /v1/agents/{agentId}/branches/{branchId}/flows","href":"/api-reference/agents/endpoint/flows-and-functions/create-flow"},{"title":"Get flow","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/flows/{flowId}","href":"/api-reference/agents/endpoint/flows-and-functions/get-flow"},{"title":"Update flow","openapi":"api-reference/agents/openapi.json PATCH /v1/agents/{agentId}/branches/{branchId}/flows/{flowId}","href":"/api-reference/agents/endpoint/flows-and-functions/update-flow"},{"title":"Delete flow","openapi":"api-reference/agents/openapi.json DELETE /v1/agents/{agentId}/branches/{branchId}/flows/{flowId}","href":"/api-reference/agents/endpoint/flows-and-functions/delete-flow"}]},{"group":"Functions","pages":[{"title":"List functions","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/functions","href":"/api-reference/agents/endpoint/flows-and-functions/list-functions"},{"title":"Create function","openapi":"api-reference/agents/openapi.json POST /v1/agents/{agentId}/branches/{branchId}/functions","href":"/api-reference/agents/endpoint/flows-and-functions/create-function"},{"title":"Get function","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/functions/{functionId}","href":"/api-reference/agents/endpoint/flows-and-functions/get-function"},{"title":"Update function","openapi":"api-reference/agents/openapi.json PATCH /v1/agents/{agentId}/branches/{branchId}/functions/{functionId}","href":"/api-reference/agents/endpoint/flows-and-functions/update-function"},{"title":"Delete function","openapi":"api-reference/agents/openapi.json DELETE /v1/agents/{agentId}/branches/{branchId}/functions/{functionId}","href":"/api-reference/agents/endpoint/flows-and-functions/delete-function"},{"title":"Duplicate function","openapi":"api-reference/agents/openapi.json POST /v1/agents/{agentId}/branches/{branchId}/functions/{functionId}/duplicate","href":"/api-reference/agents/endpoint/flows-and-functions/duplicate-function"},{"title":"Execute function","openapi":"api-reference/agents/openapi.json POST /v1/agents/{agentId}/branches/{branchId}/functions/{functionId}/execute","href":"/api-reference/agents/endpoint/flows-and-functions/execute-function"},{"title":"Get function references","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/functions/{functionId}/references","href":"/api-reference/agents/endpoint/flows-and-functions/get-function-references"},{"title":"Get function type definitions","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/functions/{functionId}/type-definitions","href":"/api-reference/agents/endpoint/flows-and-functions/get-function-type-definitions"},{"title":"Validate functions","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/functions/validate","href":"/api-reference/agents/endpoint/flows-and-functions/validate-functions"},{"title":"Get start function","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/functions/start","href":"/api-reference/agents/endpoint/flows-and-functions/get-start-function"},{"title":"Replace start function","openapi":"api-reference/agents/openapi.json PUT /v1/agents/{agentId}/branches/{branchId}/functions/start","href":"/api-reference/agents/endpoint/flows-and-functions/replace-start-function"},{"title":"Get end function","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/functions/end","href":"/api-reference/agents/endpoint/flows-and-functions/get-end-function"},{"title":"Replace end function","openapi":"api-reference/agents/openapi.json PUT /v1/agents/{agentId}/branches/{branchId}/functions/end","href":"/api-reference/agents/endpoint/flows-and-functions/replace-end-function"}]}]},{"group":"Variants","expanded":false,"pages":[{"title":"List attributes","openapi":"GET /v1/agents/{agentId}/branches/{branchId}/attributes","href":"/api-reference/agents/endpoint/variants/list-attributes"},{"title":"Create attribute","openapi":"POST /v1/agents/{agentId}/branches/{branchId}/attributes","href":"/api-reference/agents/endpoint/variants/create-attribute"},{"title":"Update attribute","openapi":"PATCH /v1/agents/{agentId}/branches/{branchId}/attributes/{attributeId}","href":"/api-reference/agents/endpoint/variants/update-attribute"},{"title":"Delete attribute","openapi":"DELETE /v1/agents/{agentId}/branches/{branchId}/attributes/{attributeId}","href":"/api-reference/agents/endpoint/variants/delete-attribute"},{"title":"List variants","openapi":"GET /v1/agents/{agentId}/branches/{branchId}/variants","href":"/api-reference/agents/endpoint/variants/list-variants"},{"title":"Create variant","openapi":"POST /v1/agents/{agentId}/branches/{branchId}/variants","href":"/api-reference/agents/endpoint/variants/create-variant"},{"title":"Update variant","openapi":"PATCH /v1/agents/{agentId}/branches/{branchId}/variants/{variantId}","href":"/api-reference/agents/endpoint/variants/update-variant"},{"title":"Delete variant","openapi":"DELETE /v1/agents/{agentId}/branches/{branchId}/variants/{variantId}","href":"/api-reference/agents/endpoint/variants/delete-variant"}]},{"group":"Deployments","pages":[{"title":"List deployments for an environment","openapi":"GET /v1/agents/{agentId}/deployments","href":"/api-reference/agents/endpoint/deployments/list-deployments-for-an-environment"},{"title":"Get active deployment per environment","openapi":"GET /v1/agents/{agentId}/deployments/active","href":"/api-reference/agents/endpoint/deployments/get-active-deployment-per-environment"},{"title":"Publish the current draft to an environment","openapi":"POST /v1/agents/{agentId}/deployments/publish","href":"/api-reference/agents/endpoint/deployments/publish-the-current-draft-to-an-environment"},{"title":"Promote a deployment to the next environment","openapi":"POST /v1/agents/{agentId}/deployments/{deploymentId}/promote","href":"/api-reference/agents/endpoint/deployments/promote-a-deployment-to-the-next-environment"},{"title":"Rollback to a previous deployment","openapi":"POST /v1/agents/{agentId}/deployments/{deploymentId}/rollback","href":"/api-reference/agents/endpoint/deployments/rollback-to-a-previous-deployment"},{"title":"Get a deployment","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/deployments/{deploymentId}","href":"/api-reference/agents/endpoint/deployments/get-a-deployment"}]},{"group":"Testing","expanded":false,"pages":[{"title":"List test cases","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/testing/test-cases","href":"/api-reference/agents/endpoint/testing/list-test-cases"},{"title":"Get test case","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/testing/test-cases/{testCaseId}","href":"/api-reference/agents/endpoint/testing/get-test-case"},{"title":"Trigger a test run","openapi":"api-reference/agents/openapi.json POST /v1/agents/{agentId}/testing/test-runs/trigger","href":"/api-reference/agents/endpoint/testing/trigger-test-run"},{"title":"List test runs for a project","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/testing/test-runs","href":"/api-reference/agents/endpoint/testing/list-test-runs"},{"title":"Get a test run by ID","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/testing/test-runs/{testRunId}","href":"/api-reference/agents/endpoint/testing/get-test-run"},{"title":"Get test execution history for a project","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/testing/test-history","href":"/api-reference/agents/endpoint/testing/get-test-history"}]},{"group":"MCP servers","expanded":false,"pages":[{"title":"List MCP servers","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/mcp-servers","href":"/api-reference/agents/endpoint/mcp-servers/list-mcp-servers"},{"title":"Add MCP server","openapi":"api-reference/agents/openapi.json POST /v1/agents/{agentId}/branches/{branchId}/mcp-servers","href":"/api-reference/agents/endpoint/mcp-servers/add-mcp-server"},{"title":"Update MCP server","openapi":"api-reference/agents/openapi.json PATCH /v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}","href":"/api-reference/agents/endpoint/mcp-servers/update-mcp-server"},{"title":"Connect MCP server","openapi":"api-reference/agents/openapi.json PATCH /v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}/connect","href":"/api-reference/agents/endpoint/mcp-servers/connect-mcp-server"},{"title":"Delete MCP server","openapi":"api-reference/agents/openapi.json DELETE /v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}","href":"/api-reference/agents/endpoint/mcp-servers/delete-mcp-server"}]},{"group":"Connectors","expanded":false,"pages":[{"title":"List all connectors for a project","openapi":"GET /v1/agents/{agentId}/telephony/connectors","href":"/api-reference/agents/endpoint/connectors/list-all-connectors-for-a-project"},{"title":"Get a connector by ID","openapi":"GET /v1/agents/{agentId}/telephony/connectors/{connectorId}","href":"/api-reference/agents/endpoint/connectors/get-a-connector-by-id"},{"title":"Update a connector","openapi":"PATCH /v1/agents/{agentId}/telephony/connectors/{connectorId}","href":"/api-reference/agents/endpoint/connectors/update-a-connector"},{"title":"Delete a connector and its phone numbers","openapi":"DELETE /v1/agents/{agentId}/telephony/connectors/{connectorId}","href":"/api-reference/agents/endpoint/connectors/delete-a-connector-and-its-phone-numbers"},{"title":"Batch get connectors by ID","openapi":"POST /v1/agents/{agentId}/telephony/connectors/batch","href":"/api-reference/agents/endpoint/connectors/batch-get-connectors-by-id"},{"title":"Batch update connectors","openapi":"PATCH /v1/agents/{agentId}/telephony/connectors/batch","href":"/api-reference/agents/endpoint/connectors/batch-update-connectors"},{"title":"Look up connector by phone number","openapi":"POST /v1/agents/{agentId}/telephony/connectors/lookup","href":"/api-reference/agents/endpoint/connectors/look-up-connector-by-phone-number"}]},{"group":"Connector tokens","expanded":false,"pages":[{"title":"List connector tokens","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/telephony/connector-tokens","href":"/api-reference/agents/endpoint/connector-tokens/list-connector-tokens"},{"title":"Get the connector token for an environment","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/telephony/connector-tokens/{clientEnv}","href":"/api-reference/agents/endpoint/connector-tokens/get-connector-token"},{"title":"Ensure a connector token exists for an environment","openapi":"api-reference/agents/openapi.json PUT /v1/agents/{agentId}/telephony/connector-tokens/{clientEnv}","href":"/api-reference/agents/endpoint/connector-tokens/ensure-connector-token"}]},{"group":"Secrets","expanded":false,"pages":[{"title":"Create a secret","openapi":"POST /v1/agents/{agentId}/secrets","href":"/api-reference/agents/endpoint/secrets/create-a-secret"},{"title":"Update a secret","openapi":"PUT /v1/agents/{agentId}/secrets/{secretName}","href":"/api-reference/agents/endpoint/secrets/update-a-secret"},{"title":"Delete a secret","openapi":"DELETE /v1/agents/{agentId}/secrets/{secretName}","href":"/api-reference/agents/endpoint/secrets/delete-a-secret"}]},{"group":"Outbound calls","expanded":false,"pages":[{"title":"Trigger an outbound call","openapi":"POST /v1/agents/{agentId}/telephony/outbound-calls","href":"/api-reference/agents/endpoint/outbound-calls/trigger-outbound-call"},{"title":"Get the status of an outbound call","openapi":"GET /v1/agents/{agentId}/telephony/outbound-calls/{callSid}/status","href":"/api-reference/agents/endpoint/outbound-calls/get-outbound-call-status"}]},{"group":"Phone numbers","expanded":false,"pages":[{"title":"List all phone numbers for a project","openapi":"GET /v1/agents/{agentId}/telephony/phone-numbers","href":"/api-reference/agents/endpoint/phone-numbers/list-all-phone-numbers-for-a-project"},{"title":"Import phone numbers into a project","openapi":"POST /v1/agents/{agentId}/telephony/phone-numbers","href":"/api-reference/agents/endpoint/phone-numbers/import-phone-numbers-into-a-project"},{"title":"Import a single phone number","openapi":"POST /v1/agents/{agentId}/telephony/phone-numbers/{phoneNumber}","href":"/api-reference/agents/endpoint/phone-numbers/import-a-single-phone-number"},{"title":"Get a specific phone number","openapi":"GET /v1/agents/{agentId}/telephony/phone-numbers/{phoneNumber}","href":"/api-reference/agents/endpoint/phone-numbers/get-a-specific-phone-number"},{"title":"Reassign a phone number to a different connector","openapi":"PATCH /v1/agents/{agentId}/telephony/phone-numbers/{phoneNumber}","href":"/api-reference/agents/endpoint/phone-numbers/reassign-a-phone-number-to-a-different-connector"},{"title":"Delete a single phone number","openapi":"DELETE /v1/agents/{agentId}/telephony/phone-numbers/{phoneNumber}","href":"/api-reference/agents/endpoint/phone-numbers/delete-a-single-phone-number"},{"title":"Delete phone numbers from a project","openapi":"DELETE /v1/agents/{agentId}/telephony/phone-numbers","href":"/api-reference/agents/endpoint/phone-numbers/delete-phone-numbers-from-a-project"},{"title":"Batch get phone numbers","openapi":"POST /v1/agents/{agentId}/telephony/phone-numbers/batch","href":"/api-reference/agents/endpoint/phone-numbers/batch-get-phone-numbers"}]},{"group":"Real-time configs","pages":[{"title":"List all config pages","openapi":"GET /v1/agents/{agentId}/real-time-configs","href":"/api-reference/agents/endpoint/real-time-configs/list-all-config-pages"},{"title":"Get a config page by environment","openapi":"GET /v1/agents/{agentId}/real-time-configs/{clientEnv}","href":"/api-reference/agents/endpoint/real-time-configs/get-a-config-page-by-environment"},{"title":"Upsert the JSON Schema for a config page","openapi":"PUT /v1/agents/{agentId}/real-time-configs/{clientEnv}/schema","href":"/api-reference/agents/endpoint/real-time-configs/upsert-the-json-schema-for-a-config-page"},{"title":"Update config variables for an environment","openapi":"PATCH /v1/agents/{agentId}/real-time-configs/{clientEnv}/variables","href":"/api-reference/agents/endpoint/real-time-configs/update-config-variables-for-an-environment"}]},{"group":"Voice Library","expanded":false,"pages":[{"title":"List voices","openapi":"GET /v1/accounts/{accountId}/voice-library","href":"/api-reference/agents/endpoint/voice-library/list-voices"},{"title":"Register a voice","openapi":"POST /v1/accounts/{accountId}/voice-library","href":"/api-reference/agents/endpoint/voice-library/register-voice"},{"title":"Get a voice","openapi":"GET /v1/accounts/{accountId}/voice-library/{voiceId}","href":"/api-reference/agents/endpoint/voice-library/get-voice"},{"title":"Update a voice","openapi":"PATCH /v1/accounts/{accountId}/voice-library/{voiceId}","href":"/api-reference/agents/endpoint/voice-library/update-voice"},{"title":"Synthesize a voice sample","openapi":"GET /v1/accounts/{accountId}/voice-library/{voiceId}/sample","href":"/api-reference/agents/endpoint/voice-library/synthesize-voice-sample"}]},{"group":"Audio cache","expanded":false,"pages":[{"title":"List cached audio entries","openapi":"GET /v1/agents/{agentId}/audio-cache","href":"/api-reference/agents/endpoint/audio-cache/list-audio-cache"},{"title":"Download cached audio file","openapi":"GET /v1/agents/{agentId}/audio-cache/{entryId}/file","href":"/api-reference/agents/endpoint/audio-cache/download-audio-file"},{"title":"Replace cached audio file","openapi":"PATCH /v1/agents/{agentId}/audio-cache/{entryId}/file","href":"/api-reference/agents/endpoint/audio-cache/replace-audio-file"},{"title":"Replace audio and voice tuning settings","openapi":"PUT /v1/agents/{agentId}/audio-cache/{entryId}/details","href":"/api-reference/agents/endpoint/audio-cache/update-audio-cache-details"},{"title":"Synthesize audio preview","openapi":"POST /v1/agents/{agentId}/audio-cache/{entryId}/synthesize","href":"/api-reference/agents/endpoint/audio-cache/synthesize-audio-preview"},{"title":"Delete a cached audio entry","openapi":"DELETE /v1/agents/{agentId}/audio-cache/{entryId}","href":"/api-reference/agents/endpoint/audio-cache/delete-audio-cache-entry"},{"title":"Bulk delete cached audio entries","openapi":"POST /v1/agents/{agentId}/audio-cache/bulk-delete","href":"/api-reference/agents/endpoint/audio-cache/bulk-delete-audio-cache"}]},{"group":"Voice configuration","expanded":false,"pages":[{"title":"Set the project's active voice","openapi":"api-reference/agents/openapi.json PUT /v1/agents/{agentId}/voice","href":"/api-reference/agents/endpoint/voices/set-project-voice"},{"title":"List deployed voice configurations","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/deployed-voices","href":"/api-reference/agents/endpoint/voices/list-deployed-voices"},{"title":"Create or update a deployed voice configuration","openapi":"api-reference/agents/openapi.json PUT /v1/agents/{agentId}/deployed-voices","href":"/api-reference/agents/endpoint/voices/upsert-deployed-voice"},{"title":"Delete a deployed voice configuration","openapi":"api-reference/agents/openapi.json DELETE /v1/agents/{agentId}/deployed-voices/{deployedVoiceId}","href":"/api-reference/agents/endpoint/voices/delete-deployed-voice"},{"title":"Get voice tuning settings","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/voices/{voiceId}/tuning-settings","href":"/api-reference/agents/endpoint/voices/get-voice-tuning-settings"},{"title":"Update voice tuning settings","openapi":"api-reference/agents/openapi.json PUT /v1/agents/{agentId}/voices/{voiceId}/tuning-settings","href":"/api-reference/agents/endpoint/voices/update-voice-tuning-settings"},{"title":"Get disclaimer voice tuning settings","openapi":"api-reference/agents/openapi.json GET /v1/agents/{agentId}/voices/{voiceId}/disclaimer/tuning-settings","href":"/api-reference/agents/endpoint/voices/get-disclaimer-tuning-settings"},{"title":"Update disclaimer voice tuning settings","openapi":"api-reference/agents/openapi.json PUT /v1/agents/{agentId}/voices/{voiceId}/disclaimer/tuning-settings","href":"/api-reference/agents/endpoint/voices/update-disclaimer-tuning-settings"},{"title":"Generate a TTS audio preview","openapi":"api-reference/agents/openapi.json POST /v1/agents/{agentId}/generate-audio","href":"/api-reference/agents/endpoint/voices/generate-audio-preview"}]}]},{"group":"Debug Chat API","pages":[{"title":"Debug Chat API","sidebarTitle":"Overview","href":"/api-reference/debug-chat/introduction"},{"title":"Create a new debug chat session","openapi":"api-reference/debug-chat/openapi.json POST /v1/agents/{agentId}/debug-chat","href":"/api-reference/debug-chat/create-debug-chat-session"},{"title":"Send a message to a debug chat session","openapi":"api-reference/debug-chat/openapi.json POST /v1/agents/{agentId}/debug-chat/{conversationId}","href":"/api-reference/debug-chat/send-debug-chat-message"}]},{"group":"SIP Trunking API","pages":[{"title":"SIP Trunking API","sidebarTitle":"Overview","href":"/api-reference/sip-trunking/introduction"},{"group":"SIP Trunks","pages":[{"title":"List SIP Trunks","openapi":"GET /v1/accounts/{account_id}/telephony/sip-trunks","href":"/api-reference/sip-trunking/endpoint/list-sip-trunks"},{"title":"Create a SIP Trunk","openapi":"POST /v1/accounts/{account_id}/telephony/sip-trunks","href":"/api-reference/sip-trunking/endpoint/create-a-sip-trunk"},{"title":"Get a SIP Trunk","openapi":"GET /v1/accounts/{account_id}/telephony/sip-trunks/{trunk_id}","href":"/api-reference/sip-trunking/endpoint/get-a-sip-trunk"},{"title":"Update a SIP Trunk","openapi":"PATCH /v1/accounts/{account_id}/telephony/sip-trunks/{trunk_id}","href":"/api-reference/sip-trunking/endpoint/update-a-sip-trunk"},{"title":"Delete a SIP Trunk","openapi":"DELETE /v1/accounts/{account_id}/telephony/sip-trunks/{trunk_id}","href":"/api-reference/sip-trunking/endpoint/delete-a-sip-trunk"}]},{"group":"Extensions","pages":[{"title":"List extensions","openapi":"GET /v1/accounts/{account_id}/telephony/sip-trunks/{trunk_id}/extensions","href":"/api-reference/sip-trunking/endpoint/list-extensions"},{"title":"Create an extension","openapi":"POST /v1/accounts/{account_id}/telephony/sip-trunks/{trunk_id}/extensions","href":"/api-reference/sip-trunking/endpoint/create-an-extension"},{"title":"Get an extension","openapi":"GET /v1/accounts/{account_id}/telephony/sip-trunks/{trunk_id}/extensions/{extension}","href":"/api-reference/sip-trunking/endpoint/get-an-extension"},{"title":"Update an extension","openapi":"PATCH /v1/accounts/{account_id}/telephony/sip-trunks/{trunk_id}/extensions/{extension}","href":"/api-reference/sip-trunking/endpoint/update-an-extension"},{"title":"Delete an extension","openapi":"DELETE /v1/accounts/{account_id}/telephony/sip-trunks/{trunk_id}/extensions/{extension}","href":"/api-reference/sip-trunking/endpoint/delete-an-extension"}]},{"group":"Outbound calls","pages":[{"title":"Place an outbound call","openapi":"POST /v1/telephony/sip-trunks/{trunkId}/outbound-call","href":"/api-reference/sip-trunking/endpoint/place-an-outbound-call"},{"title":"Get outbound call status","openapi":"GET /v1/telephony/sip-trunks/{trunkId}/outbound-call/{callSid}","href":"/api-reference/sip-trunking/endpoint/get-outbound-call-status"}]},{"title":"Connecting to PolyAI Telephony","sidebarTitle":"Connecting to Telephony","href":"/api-reference/sip-trunking/connecting"}]}]},{"group":"Runtime \u0026 data","pages":[{"group":"Chat API","pages":[{"title":"Chat API","sidebarTitle":"Overview","href":"/api-reference/chat/introduction"},{"title":"Create a chat","openapi":"POST /{version}/{account_id}/{project_id}/chat/create","href":"/api-reference/chat/endpoint/create-a-chat"},{"title":"Respond to a chat","openapi":"POST /{version}/{account_id}/{project_id}/chat/respond","href":"/api-reference/chat/endpoint/respond-to-a-chat"},{"title":"Close a chat","openapi":"PUT /{version}/{account_id}/{project_id}/chat/close","href":"/api-reference/chat/endpoint/close-a-chat"}]},{"group":"Concurrent Calls API","pages":[{"title":"Concurrent Calls API","sidebarTitle":"Overview","href":"/api-reference/concurrent-calls/introduction"},{"title":"Get max concurrent call numbers","openapi":"GET /v1/{account_id}/{project_id}/conversations/concurrency","href":"/api-reference/concurrent-calls/endpoint/get-max-concurrent"}]},{"group":"Conversations API","pages":[{"title":"Conversations API","sidebarTitle":"Overview","href":"/api-reference/conversations/introduction"},{"title":"List all conversations","openapi":"api-reference/conversations/v3/openapi.json GET /v3/{account_id}/{project_id}/conversations","href":"/api-reference/conversations/v3/endpoint/get-conversations"},{"title":"Get a conversation by ID","openapi":"GET /v1/agents/{agentId}/conversations/{conversationId}","href":"/api-reference/conversations/v3/endpoint/get-conversation-by-id"},{"title":"Get audio recording for a conversation","openapi":"GET /v1/agents/{agentId}/conversations/{conversationId}/audio","href":"/api-reference/conversations/v3/endpoint/get-conversation-audio"},{"title":"List conversations for an agent","openapi":"api-reference/conversations/v3/openapi.json GET /v1/agents/{agentId}/conversations","href":"/api-reference/conversations/v3/endpoint/list-agent-conversations"},{"title":"Add annotations to a conversation","openapi":"api-reference/conversations/v3/openapi.json POST /v1/agents/{agentId}/conversations/{conversationId}/annotation","href":"/api-reference/conversations/v3/endpoint/add-conversation-annotations"},{"title":"Upsert a note on a conversation","openapi":"api-reference/conversations/v3/openapi.json POST /v1/agents/{agentId}/conversations/{conversationId}/note","href":"/api-reference/conversations/v3/endpoint/upsert-conversation-note"}]},{"group":"DNI API","pages":[{"title":"DNI API","sidebarTitle":"Overview","href":"/api-reference/dni/introduction"},{"title":"Reserve DNI","openapi":"POST /v1/conversations/dni-reservation","href":"/api-reference/dni/endpoint/dni-reservation"}]},{"group":"External Events API","pages":[{"title":"External Events API","sidebarTitle":"Overview","href":"/api-reference/external-events/introduction"},{"title":"Post external event result","openapi":"POST /v1/external-events/webhook","href":"/api-reference/external-events/endpoint/webhook"},{"title":"Bridge ended notification","openapi":"POST /internal/v1/agentic-dial/bridge-ended","href":"/api-reference/external-events/endpoint/bridge-ended"}]},{"group":"Handoff API","pages":[{"title":"Handoff API","sidebarTitle":"Overview","href":"/api-reference/handoff/introduction"},{"title":"Get handoff state","openapi":"GET /v1/{account_id}/{project_id}/handoff_state","href":"/api-reference/handoff/endpoint/get-handoff"}]},{"group":"Messaging API","pages":[{"title":"Messaging API","sidebarTitle":"Overview","href":"/api-reference/messaging/introduction"},{"title":"Sessions and authentication","href":"/api-reference/messaging/sessions"},{"title":"WebSocket connection","href":"/api-reference/messaging/websocket"},{"title":"Event format","href":"/api-reference/messaging/events"},{"title":"Client events","href":"/api-reference/messaging/events-send"},{"title":"Server events","href":"/api-reference/messaging/events-receive"},{"title":"Streaming","href":"/api-reference/messaging/streaming"},{"title":"Handoff to live agent","href":"/api-reference/messaging/handoff"},{"title":"Session lifecycle","href":"/api-reference/messaging/lifecycle"},{"title":"Errors","href":"/api-reference/messaging/errors"},{"title":"Best practices","href":"/api-reference/messaging/best-practices"},{"title":"Enable Verified Context Injection","sidebarTitle":"Enable Verified Context Injection","href":"/api-reference/messaging/enable-verified-context-injection"}]},{"group":"SMS API","pages":[{"title":"SMS API","sidebarTitle":"SMS API","href":"/api-reference/messaging/sms-and-rcs-api/introduction"},{"title":"Send an outbound SMS/RCS","api":"POST /v1/outbound-sms","href":"/api-reference/messaging/sms-and-rcs-api/send-sms"},{"title":"RCS API","sidebarTitle":"RCS API","href":"/api-reference/messaging/sms-and-rcs-api/rcs"}]},{"group":"Traces API","pages":[{"title":"Traces API","sidebarTitle":"Overview","href":"/api-reference/traces/introduction"},{"title":"List traced conversations","api":"GET /api/v1/traces/conversations","href":"/api-reference/traces/endpoint/list-conversations"},{"title":"Get conversation spans","api":"GET /api/v1/traces/conversations/{conversation_id}","href":"/api-reference/traces/endpoint/get-conversation-trace"},{"title":"Get conversation timeline","api":"GET /api/v1/traces/conversations/{conversation_id}/timeline","href":"/api-reference/traces/endpoint/get-conversation-timeline"},{"title":"Get turn spans","api":"GET /api/v1/traces/conversations/{conversation_id}/turns/{turn_index}","href":"/api-reference/traces/endpoint/get-conversation-turn"},{"title":"Search spans","api":"POST /api/v1/traces/spans/search","href":"/api-reference/traces/endpoint/search-spans"},{"title":"Aggregate spans","api":"POST /api/v1/traces/spans/aggregate","description":"Percentiles, counts and error rates over product spans, bucketed by time and grouped by dimension.","href":"/api-reference/traces/endpoint/aggregate-spans"},{"title":"Search function logs","api":"POST /api/v1/traces/logs/search","href":"/api-reference/traces/endpoint/search-logs"},{"title":"Aggregate function logs","api":"POST /api/v1/traces/logs/aggregate","description":"Count GenAI function log lines and the conversations they belong to, bucketed by hour or day.","href":"/api-reference/traces/endpoint/aggregate-logs"}]},{"group":"WebRTC Gateway","pages":[{"title":"WebRTC Gateway API","sidebarTitle":"Overview","href":"/api-reference/webrtc-gateway/introduction"},{"title":"WebSocket signaling","href":"/api-reference/webrtc-gateway/ws/signaling"}]}]},{"group":"Monitoring","pages":[{"group":"Alerts API","pages":[{"title":"Alerts API","sidebarTitle":"Overview","href":"/api-reference/alerts/introduction"},{"group":"Alert rules","pages":[{"title":"Create an alert rule","openapi":"POST /v1/alert-rules","href":"/api-reference/alerts/endpoint/create-alert-rule"},{"title":"List alert rules","openapi":"GET /v1/alert-rules","href":"/api-reference/alerts/endpoint/list-alert-rules"},{"title":"Get an alert rule","openapi":"GET /v1/alert-rules/{rule_id}","href":"/api-reference/alerts/endpoint/get-alert-rule"},{"title":"Update an alert rule","openapi":"PATCH /v1/alert-rules/{rule_id}","href":"/api-reference/alerts/endpoint/update-alert-rule"},{"title":"Delete an alert rule","openapi":"DELETE /v1/alert-rules/{rule_id}","href":"/api-reference/alerts/endpoint/delete-alert-rule"}]},{"title":"List active alerts","openapi":"GET /v1/alerts","href":"/api-reference/alerts/endpoint/list-active-alerts"}]},{"group":"Webhooks API","pages":[{"title":"Webhooks API","sidebarTitle":"Overview","href":"/api-reference/webhooks/introduction"},{"title":"Create a webhook endpoint","openapi":"POST /v1/webhook-endpoints","href":"/api-reference/webhooks/endpoint/create-webhook-endpoint"},{"title":"List webhook endpoints","openapi":"GET /v1/webhook-endpoints","href":"/api-reference/webhooks/endpoint/list-webhook-endpoints"},{"title":"Get a webhook endpoint","openapi":"GET /v1/webhook-endpoints/{endpoint_id}","href":"/api-reference/webhooks/endpoint/get-webhook-endpoint"},{"title":"Update a webhook endpoint","openapi":"PATCH /v1/webhook-endpoints/{endpoint_id}","href":"/api-reference/webhooks/endpoint/update-webhook-endpoint"},{"title":"Delete a webhook endpoint","openapi":"DELETE /v1/webhook-endpoints/{endpoint_id}","href":"/api-reference/webhooks/endpoint/delete-webhook-endpoint"},{"title":"Rotate webhook signing secret","openapi":"POST /v1/webhook-endpoints/{endpoint_id}/rotate-secret","href":"/api-reference/webhooks/endpoint/rotate-webhook-signing-secret"}]}]},{"group":"Legacy","pages":[{"group":"Outbound Calling API (legacy)","pages":[{"title":"Outbound Calling API","sidebarTitle":"Overview","href":"/api-reference/outbound/introduction"},{"title":"Trigger an outbound call","api":"POST /v1/outbound-calling","href":"/api-reference/outbound/endpoint/trigger-call"},{"title":"Get call status","api":"GET /v1/outbound-calling/{call_sid}/status","href":"/api-reference/outbound/endpoint/get-call-status"}]},{"group":"Conversations API v1 (legacy)","pages":[{"title":"List all conversations","openapi":"GET /v1/{account_id}/{project_id}/conversations","href":"/api-reference/conversations/v1/endpoint/get-conversations"}]}]}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/overview"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/introduction"}]},{"tab":"Release notes","pages":[{"title":"Release notes","href":"/releases/overview"}]}]},"basePath":"","title":"Search function logs - PolyAI Platform","deploymentId":"dpl_2pTxFtyBudBMYZiCw1MyvoA1wxpd","buildId":"dpl_2pTxFtyBudBMYZiCw1MyvoA1wxpd","dynamics":["10e4515597","c2aa737661","b0f84f53ff","2b790eda92"],"chunks":["BannerMarkdown-zYU9kNAI.js","dist-3xM3Qrc7.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-BtG4DSkw.js","snippetPresets-C1k1xDhp.js","utils-PMJoEt4Y.js","style-to-object-BY3JEAdk.js","utils-DW3Pr7Jq.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-DIISLO2w.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BErNCZCm.js","_Uint8Array-f0PCu9f_.js","isObject-FP1Yky1u.js","Page-C8Cg25if.js","CodeSnippet-D1PtG8ed.js","DynamicMarkdown-BvJIe00T.js","SectionHeading-B0rKYV8d.js","icon-yclzBff4.js","ApiExamples-OjY-8mqu.js","usePlaygroundInputsStore-B2HS2hUb.js","shallow-DVFuuIDQ.js","isEqual-DG0UKiQC.js","CodeSnippets-Cy6FBgwN.js","getApiPlaygroundDisplay-Dkx2eNtL.js","MethodPill-DxA11cCF.js","getPastedJson-CpkIDpMk.js","DuplicateIcon-CFCQNJ-D.js","axios-CsQoIw0U.js"]}