diff --git a/src/libs/Speechify/Generated/Speechify.Models.FlowTemplate.g.cs b/src/libs/Speechify/Generated/Speechify.Models.FlowTemplate.g.cs index 3870117..9de5f31 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.FlowTemplate.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.FlowTemplate.g.cs @@ -9,7 +9,7 @@ namespace Speechify public sealed partial class FlowTemplate { /// - /// Flow template id. A raw UUID, not a prefixed external id. + /// Flow template id (prefixed external id, `tmpl_...`). /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] @@ -84,7 +84,7 @@ public sealed partial class FlowTemplate /// Initializes a new instance of the class. /// /// - /// Flow template id. A raw UUID, not a prefixed external id. + /// Flow template id (prefixed external id, `tmpl_...`). /// /// /// Stable unique key for the template. diff --git a/src/libs/Speechify/openapi.yaml b/src/libs/Speechify/openapi.yaml index f7ef523..4e6d7f2 100644 --- a/src/libs/Speechify/openapi.yaml +++ b/src/libs/Speechify/openapi.yaml @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/v1/audio/speech":{"post":{"operationId":"speech","summary":"Create Speech","description":"Synthesize speech audio from text or SSML. Returns the complete audio\nfile plus billing and speech-mark metadata in a single response. For\nlow-latency playback or long-form text, use POST /v1/audio/stream.","tags":["subpackage_tts.subpackage_tts/audio"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech audio for the requested input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSpeechResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. The response may\ninclude a `Retry-After` header.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSpeechRequest"}}}}}},"/v1/audio/stream":{"post":{"operationId":"stream","summary":"Stream Speech","description":"Synthesize speech and stream the audio back as it is generated, for\nlow-latency playback. The Accept header selects the audio container.\nFor short text where receiving the whole file at once is fine, use\nPOST /v1/audio/speech.","tags":["subpackage_tts.subpackage_tts/audio"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"schema":{"$ref":"#/components/schemas/V1AudioStreamPostParametersAccept"}}],"responses":{"200":{"description":"Chunked audio stream for the requested input.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. The response may\ninclude a `Retry-After` header.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetStreamRequest"}}}}}},"/v1/voices":{"get":{"operationId":"list","summary":"List Voices","description":"Gets the list of voices available for the user","tags":["subpackage_tts.subpackage_tts/voices"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of voices","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetVoice"}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. The response may\ninclude a `Retry-After` header.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create","summary":"Create Voice","description":"Create a personal (cloned) voice for the user","tags":["subpackage_tts.subpackage_tts/voices"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A created voice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedVoice"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request was well-formed but semantically rejected -\ntypically a referential integrity violation (e.g. flow node\nreferences an audio asset in another workspace) or a state\nmachine refusal.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. The response may\ninclude a `Retry-After` header.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the personal voice"},"locale":{"type":"string","default":"en-US","description":"Native language (locale) of the personal voice (e.g. en-US, es-ES, etc.)"},"gender":{"$ref":"#/components/schemas/V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender","description":"Gender marker for the personal voice\nmale GenderMale\nfemale GenderFemale\nnotSpecified GenderNotSpecified"},"sample":{"type":"string","format":"binary","description":"Audio sample file"},"avatar":{"type":"string","format":"binary","description":"Avatar image file"},"consent":{"type":"string","description":"A **string** representing the user consent information in JSON format\nThis should include the fullName and email of the consenting individual.\nFor example, `{\"fullName\": \"John Doe\", \"email\": \"john@example.com\"}`"}},"required":["name","gender","sample","consent"]}}}}}},"/v1/voices/{id}":{"delete":{"operationId":"delete","summary":"Delete Voice","description":"Delete a personal (cloned) voice","tags":["subpackage_tts.subpackage_tts/voices"],"parameters":[{"name":"id","in":"path","description":"The ID of the voice to delete","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Voice deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. The response may\ninclude a `Retry-After` header.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/voices/{id}/sample":{"get":{"operationId":"download-sample","summary":"Download Voice Sample","description":"Download a personal (cloned) voice sample","tags":["subpackage_tts.subpackage_tts/voices"],"parameters":[{"name":"id","in":"path","description":"The ID of the voice to download sample for","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voice sample audio file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. The response may\ninclude a `Retry-After` header.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents":{"post":{"operationId":"create","summary":"Create Agent","description":"Create a voice agent.","tags":["subpackage_agent"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentRequest"}}}}},"get":{"operationId":"list","summary":"List Agents","description":"List voice agents owned by the caller.","tags":["subpackage_agent"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of voice agents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}":{"get":{"operationId":"get","summary":"Get Agent","description":"Retrieve a voice agent by ID.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update","summary":"Update Agent","description":"Update a voice agent. Only fields present on the request body are changed.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Agent","description":"Delete a voice agent. Conversations and attached tools remain. Tests whose only agent is this one are deleted with it; tests also attached to other agents survive, minus the attachment.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Agent deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/conversations":{"post":{"operationId":"create-conversation","summary":"Create Conversation","description":"Start a new voice conversation with the agent. Returns a realtime\nvoice session + short-lived client token so the caller can\nconnect the audio pipeline directly. The agent is dispatched\nserver-side; no additional client action required.\n\nPass `dynamic_variables` to supply per-session values that override\nthe agent's stored variable defaults for this one conversation.\nKeys in the `system__` namespace are rejected at this boundary.\n","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created conversation with its realtime session token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationRequest"}}}}}},"/v1/agents/{id}/sessions":{"post":{"operationId":"create-session","summary":"Create Session","description":"Mint a realtime voice session for the given agent. Widget-friendly\ncounterpart to `createConversation` \u2014 same response shape, dual\nauthentication:\n\n* **Authenticated (Bearer)**: works for any agent the caller\n owns. Typical server-to-server flow where the embedding\n site's backend mints a token and hands it to the browser so\n the API key never reaches the client.\n* **Unauthenticated**: works only when `agent.is_public = true`\n AND the request's `Origin` header matches `agent.allowed_origins`\n (or that list is empty). When `agent.hostname_allowlist` is\n non-empty, the `Origin` hostname must additionally be a\n member of that list. Used directly by the\n `` web component.\n\nResponds with the same `CreateConversationResponse` as\n`createConversation`.\n","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The created session with its realtime token + URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest"}}}}}},"/v1/agents/voices":{"get":{"operationId":"list-agent-voices","summary":"List Agent Voices","description":"List the curated voice catalogue available for voice agents.\nMatches the `ai-api-agents` VMS scope one-for-one, so the same\nslug set is accepted by POST/PATCH /v1/agents. Personal\n(cloned) voices are NOT included \u2014 they stay on\n`GET /v1/voices`. The JSON layout intentionally mirrors the\nTTS `/v1/voices` shape so the console feeds both endpoints\ninto the same voice-picker component.\n","tags":["subpackage_agent"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The curated agent voice catalogue.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentVoice"}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/builtins":{"post":{"operationId":"create-builtin","summary":"Create Agent Builtin","description":"Create a new builtin instance on this agent. `builtin` must\nresolve to one of the names returned by\n`GET /v1/agents/tools/system-builtins`; unknown values are rejected.\n`name` is the LLM-facing identifier the model uses to call the\ntool; it must match the tool-name regex and be unique within\nthe agent's builtin set.\n","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created builtin instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBuiltin"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentBuiltinRequest"}}}}},"get":{"operationId":"list-builtins","summary":"List Agent Builtins","description":"List every builtin instance configured on this agent. Each row\nis one instance of a worker-resident capability (`end_call`,\n`play_audio`, etc.) bound to this specific agent with its own\nLLM-facing name, description, and per-call config. Same builtin\nmay appear N times on one agent \u2014 typically two `play_audio`\nrows bound to different audio assets.\n","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The agent's builtin instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentBuiltinsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/builtins/{builtinId}":{"get":{"operationId":"get-builtin","summary":"Get Agent Builtin","description":"Fetch one builtin instance by ID.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"builtinId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The builtin instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBuiltin"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update-builtin","summary":"Update Agent Builtin","description":"Update a builtin instance. All fields optional; omitting a\nfield leaves it unchanged. The underlying `builtin` (which\ncapability the instance maps to) is intentionally NOT\npatchable \u2014 change of identity would surprise the worker, so\nthe customer should delete and recreate instead.\n","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"builtinId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated builtin instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBuiltin"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentBuiltinRequest"}}}}},"delete":{"operationId":"delete-builtin","summary":"Delete Agent Builtin","description":"Delete a builtin instance from this agent. Idempotent on\nalready-deleted ids (404). Does NOT detach references from\nflow nodes that name the instance; the worker logs and skips\non missing-row at session start (fail-soft).\n","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"builtinId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Builtin instance deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/variables":{"get":{"operationId":"get-dynamic-variables","summary":"Get Dynamic Variables","description":"Retrieve the agent's customer-scope dynamic variables and the read-only\ncatalogue of reserved `system__*` keys. The system variables list is\nprovided so editor UIs can render the reference list without maintaining\na client-side copy of the catalogue.\n","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The agent's variable catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDynamicVariablesResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update-dynamic-variables","summary":"Update Dynamic Variables","description":"Replace the agent's customer-scope dynamic variable definitions.\nThe supplied list overwrites the stored list wholesale (same\nsemantics as `updateEvaluationConfig`). Pass an empty array to\nclear all variables. Up to 20 variables per agent. Keys must\nmatch `[a-zA-Z0-9_]+` and must not start with the reserved\n`system__` prefix.\n","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated variable catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDynamicVariablesResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDynamicVariablesRequest"}}}}}},"/v1/agents/{id}/evaluation-config":{"get":{"operationId":"get-evaluation-config","summary":"Get Evaluation Config","description":"Retrieve the agent's post-call evaluation criteria + data-collection config.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The evaluation config for the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationConfig"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update-evaluation-config","summary":"Update Evaluation Config","description":"Replace the agent's evaluation criteria + data-collection fields.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated evaluation config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationConfig"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEvaluationConfigRequest"}}}}}},"/v1/agents/{id}/knowledge-bases":{"get":{"operationId":"list-agent-knowledge-bases","summary":"List Agent Knowledge Bases","description":"List knowledge bases attached to an agent. Bare list \u2014 the\nattachment count is bounded by configuration, not by data\nscale, so this endpoint does not paginate.\n","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The knowledge bases attached to the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachedKnowledgeBasesResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/knowledge-bases/{kbId}":{"post":{"operationId":"attach-knowledge-base","summary":"Attach Agent Knowledge Base","description":"Attach a knowledge base to an agent. The `search_knowledge` tool\nis auto-registered on the next conversation and can only query the\nattached knowledge bases.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kbId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Knowledge base attached.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"detach-knowledge-base","summary":"Detach Agent Knowledge Base","description":"Detach a knowledge base from an agent.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kbId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Knowledge base detached.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/memories":{"get":{"operationId":"list-memories","summary":"List Agent Memories","description":"List per-caller memories extracted for an agent. Memories are\nwritten post-call by the built-in extractor when `memory_enabled`\nis true on the agent; the list is sorted newest-first.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum rows to return. Defaults to 100, capped at 200.","required":false,"schema":{"type":"integer","default":100}},{"name":"offset","in":"query","description":"Number of rows to skip. Combine with `limit` to page through older memories.","required":false,"schema":{"type":"integer","default":0}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Memories for the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMemoriesResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/memories/delete":{"post":{"operationId":"delete-memories-by-caller","summary":"Delete Memories by Caller","description":"Delete every memory ever extracted for a specific caller on\nthis agent. Privacy / GDPR surface. Returns the count of rows\nsoft-deleted; rows become permanently unreachable immediately\nand are hard-deleted by the retention job after the tenant's\nconfigured retention window.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMemoriesByCallerResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMemoriesByCallerRequest"}}}}}},"/v1/agents/{id}/tests":{"get":{"operationId":"list-tests","summary":"List Agent Tests","description":"List all tests configured for the agent. Each entry includes the\nmost recent run so the console can render pass/fail badges without\nan extra round-trip.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tests for the agent with last-run summaries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentTestsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create-test","summary":"Create Agent Test","description":"Create a new test for the agent.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created test.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTest"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentTestRequest"}}}}}},"/v1/agents/{id}/tests/runs":{"post":{"operationId":"run-all-tests","summary":"Run All Agent Tests","description":"Enqueue runs for every test on the agent concurrently. Up to 50\ntests are dispatched in one call. Each returned run starts in\n`queued` status; poll `GET /v1/agents/tests/runs/{id}` for the terminal\nresult.\n\nAn optional request body runs the whole suite against\na proposed config: a `config_override` (prompt / model / tools)\napplied to every test without editing the tests, and/or a\n`flow_version_id` to target a specific flow version instead of\nthe agent's active flow. Omit the body to run against the\nagent's live config and active flow.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Queued runs for all tests on the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAgentTestsResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAllTestsRequest"}}}}}},"/v1/agents/{id}/tools":{"get":{"operationId":"list-tools","summary":"List Agent Tools","description":"List tools currently attached to the agent. Bare list \u2014 an\nagent's tool attachment count is bounded by configuration, so\nthis endpoint does not paginate.\n","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Attached tools for the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachedToolsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/tools/{toolId}":{"post":{"operationId":"attach-tool","summary":"Attach Tool","description":"Attach an existing tool to the agent so the LLM can call it.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"toolId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Tool attached.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"detach-tool","summary":"Detach Tool","description":"Detach a tool from the agent.","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"toolId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Tool detached.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations":{"get":{"operationId":"list","summary":"List Conversations","description":"List conversations owned by the caller, ordered by most recent.\nCursor-paginated: omit `cursor` to fetch the first page; pass the\nprevious response's `next_cursor` back to fetch the next page.\nWalk pages while `has_more` is true.","tags":["subpackage_agent.subpackage_agent/conversations"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max conversations per page (default 50, max 200).","required":false,"schema":{"type":"integer"}},{"name":"agent_id","in":"query","description":"Filter to conversations for this agent.","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by conversation status.","required":false,"schema":{"$ref":"#/components/schemas/ConversationStatus"}},{"name":"transport","in":"query","description":"Filter by transport.","required":false,"schema":{"$ref":"#/components/schemas/ConversationTransport"}},{"name":"caller_identity","in":"query","description":"Filter by caller identity.","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","description":"Free-text search across conversation content.","required":false,"schema":{"type":"string"}},{"name":"started_after","in":"query","description":"Only conversations started at or after this RFC 3339 timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"started_before","in":"query","description":"Only conversations started at or before this RFC 3339 timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"duration_min_ms","in":"query","description":"Minimum conversation duration in milliseconds.","required":false,"schema":{"type":"integer"}},{"name":"duration_max_ms","in":"query","description":"Maximum conversation duration in milliseconds.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of conversations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListConversationsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations/{id}":{"get":{"operationId":"get","summary":"Get Conversation","description":"Retrieve a conversation by ID.","tags":["subpackage_agent.subpackage_agent/conversations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations/{id}/messages":{"get":{"operationId":"list-messages","summary":"List Messages","description":"Retrieve the transcript for a conversation in started_at order\n(oldest first). Cursor-paginated: omit `cursor` to fetch the\nfirst page. Default page size is 50 and max is 200. Walk pages\nwhile `has_more` is true.","tags":["subpackage_agent.subpackage_agent/conversations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max messages per page (default 50, max 200).","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The messages for the conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMessagesResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations/{id}/evaluations":{"get":{"operationId":"list-evaluations","summary":"List Evaluations","description":"Retrieve post-call evaluation results for a conversation.","tags":["subpackage_agent.subpackage_agent/conversations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The evaluations for the conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEvaluationsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations/{id}/memories":{"get":{"operationId":"list-memories","summary":"List Conversation Memories","description":"List memories extracted from a specific conversation.","tags":["subpackage_agent.subpackage_agent/conversations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Memories written during this conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMemoriesResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/knowledge-bases":{"post":{"operationId":"create","summary":"Create Knowledge Base","description":"Create a new knowledge base.","tags":["subpackage_agent.subpackage_agent/knowledgeBases"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created knowledge base.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKnowledgeBaseRequest"}}}}},"get":{"operationId":"list","summary":"List Knowledge Bases","description":"List knowledge bases owned by the caller. Cursor-paginated:\nomit `cursor` to fetch the first page. The default page size is\n50 and the max is 200; values outside that range are clamped.\nWalk pages while `has_more` is true.","tags":["subpackage_agent.subpackage_agent/knowledgeBases"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max knowledge bases per page (default 50, max 200).","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The knowledge bases for the caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListKnowledgeBasesResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/knowledge-bases/{id}":{"get":{"operationId":"get","summary":"Get Knowledge Base","description":"Retrieve a knowledge base by ID.","tags":["subpackage_agent.subpackage_agent/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested knowledge base.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update","summary":"Update Knowledge Base","description":"Update a knowledge base.","tags":["subpackage_agent.subpackage_agent/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated knowledge base.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateKnowledgeBaseRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Knowledge Base","description":"Soft-delete a knowledge base. Documents and chunks are cascaded.","tags":["subpackage_agent.subpackage_agent/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Knowledge base deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/knowledge-bases/{id}/documents":{"post":{"operationId":"upload-document","summary":"Upload Knowledge Base Document","description":"Upload a document (PDF, plain text, markdown, or HTML) to a\nknowledge base. The document is extracted, chunked, embedded, and\nindexed synchronously; expect a few seconds per MB of input.\nMaximum 10 MB per upload.","tags":["subpackage_agent.subpackage_agent/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The ingested document record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseDocument"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeded a per-endpoint size limit (e.g. KB\ndocument upload cap, batch-call CSV cap, audio-asset WAV cap).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}}},"get":{"operationId":"list-documents","summary":"List Knowledge Base Documents","description":"List documents ingested into a knowledge base. Cursor-paginated:\nomit `cursor` to fetch the first page. Default page size is 50\nand max is 200. Walk pages while `has_more` is true.","tags":["subpackage_agent.subpackage_agent/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"folder_id","in":"query","description":"Folder filter: omit for root-level documents, pass `all` for\nevery document in the KB, or a folder id to scope to that\nfolder.\n","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Substring match on filename and source_url.","required":false,"schema":{"type":"string"}},{"name":"source_kind","in":"query","description":"Comma-separated source kinds (file|url|text).","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max documents per page (default 50, max 200).","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The documents in the knowledge base.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListKnowledgeBaseDocumentsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/knowledge-bases/{id}/documents/{docId}":{"get":{"operationId":"get-document","summary":"Get Knowledge Base Document","description":"Retrieve a document by ID.","tags":["subpackage_agent.subpackage_agent/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"docId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The document record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseDocumentDetail"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete-document","summary":"Delete Knowledge Base Document","description":"Delete a document and all its chunks.","tags":["subpackage_agent.subpackage_agent/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"docId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Document deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update-document","summary":"Update Knowledge Base Document","description":"Update a document. Currently supports moving the document\nbetween folders via `folder_id`.\n","tags":["subpackage_agent.subpackage_agent/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"docId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Document updated.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"folder_id":{"type":["string","null"],"description":"Destination folder. Prefixed wire identifier\n(`kfolder_<26 char Crockford base32>`); null moves the\ndocument to the knowledge base root.\n"}}}}}}}},"/v1/agents/knowledge-bases/{id}/documents/{docId}/chunks":{"get":{"operationId":"list-chunks","summary":"List Knowledge Base Chunks","description":"List the chunks for a document. Cursor-paginated: omit `cursor`\nto fetch the first page. Default page size is 50 and max is 200.\nWalk pages while `has_more` is true.","tags":["subpackage_agent.subpackage_agent/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"docId","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max chunks per page (default 50, max 200).","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The chunks for the document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListKnowledgeBaseChunksResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/knowledge-bases/search":{"post":{"operationId":"search","summary":"Search Knowledge Bases","description":"Semantic search across a caller-owned list of knowledge bases.\nReturns ranked chunks with source filename and a cosine-similarity\nscore. Limited to 50 results per request.","tags":["subpackage_agent.subpackage_agent/knowledgeBases"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ranked search hits across the selected knowledge bases.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchKnowledgeBasesResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchKnowledgeBasesRequest"}}}}}},"/v1/agents/memories/{memoryId}":{"delete":{"operationId":"delete","summary":"Delete Memory","description":"Soft-delete one memory row.","tags":["subpackage_agent.subpackage_agent/memories"],"parameters":[{"name":"memoryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Memory deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tests":{"get":{"operationId":"list-all-tests","summary":"List Tests","description":"Workspace-wide list of tests across every agent the caller owns.\nSupports filters (agent, type, last-run status, folder), full-text\nsearch on name/description, and cursor pagination. Each row carries\nits newest run and attached agent IDs so the list renders without\nN+1 round-trips. Walk pages while `has_more` is true.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"agent_id","in":"query","description":"Comma-separated agent IDs to filter on.","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","description":"Comma-separated test types (reply|tool|simulation).","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Comma-separated last-run statuses.","required":false,"schema":{"type":"string"}},{"name":"folder_id","in":"query","description":"Folder ID to filter on, or \"root\" for unfiled tests.","required":false,"schema":{"type":"string"}},{"name":"updated_after","in":"query","description":"Only return tests updated after this RFC3339 timestamp.","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Substring match on name or description.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max tests per page (default 50, max 200).","required":false,"schema":{"type":"integer"}},{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTestsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tests/stats":{"get":{"operationId":"get-test-stats","summary":"Get Test Stats","description":"Aggregate pass-rate metrics over the last N days. Returns dense\ndaily buckets (one entry per day, zero-filled) plus totals and a\nper-type breakdown. Powers the header chart on the global tests\npage. Default window is 30 days, max 90.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"window_days","in":"query","description":"Trailing window in days (default 30, max 90).","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stats payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestStats"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tests/{id}":{"get":{"operationId":"get-test","summary":"Get Agent Test","description":"Retrieve a test by ID.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested test.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTest"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update-test","summary":"Update Agent Test","description":"Update a test. Only fields present on the request body are changed.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated test.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTest"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentTestRequest"}}}}},"delete":{"operationId":"delete-test","summary":"Delete Agent Test","description":"Delete a test and all its run history.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Test deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tests/{id}/attachments":{"get":{"operationId":"list-test-attachments","summary":"List Test Attachments","description":"List every agent a test is attached to.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Attachment list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentTestAttachmentsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tests/{id}/attachments/{agentId}":{"post":{"operationId":"attach-test","summary":"Attach Test","description":"Attach a test to an additional agent. After this call, the test\nwill also run as part of that agent's regression suite (and\nagainst its prompt + tool config when invoked with\n`agent_id = {agentId}`). Idempotent.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"agentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Attached.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"detach-test","summary":"Detach Test","description":"Detach a test from an agent. The owner agent (the agent the test\nwas authored against) cannot be detached; delete the test\ninstead.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"agentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Detached.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tests/folders":{"get":{"operationId":"list-test-folders","summary":"List Test Folders","description":"List every test folder the caller owns. Flat list; build the tree client-side.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Folder list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentTestFoldersResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create-test-folder","summary":"Create Test Folder","description":"Create a test folder. Max depth is 3.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Created folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTestFolder"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentTestFolderRequest"}}}}}},"/v1/agents/tests/folders/{id}":{"patch":{"operationId":"update-test-folder","summary":"Update Test Folder","description":"Rename or reparent a test folder. Cycles are rejected.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTestFolder"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentTestFolderRequest"}}}}},"delete":{"operationId":"delete-test-folder","summary":"Delete Test Folder","description":"Soft-delete a folder. Child tests drop back to root.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tests/{id}/runs":{"post":{"operationId":"run-test","summary":"Run Agent Test","description":"Enqueue a single run of the test. The returned run starts in\n`queued` status. Poll `GET /v1/agents/tests/runs/{id}` until the status\nreaches a terminal state (`passed`, `failed`, or `error`).","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"The queued run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTestRun"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Run the test against this agent instead of the test's default agent."}}}}}}},"get":{"operationId":"list-test-runs","summary":"List Agent Test Runs","description":"List one page of run history for a test, newest first.\nPaginate by passing `cursor` from the previous response.\n","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque cursor from a prior response's `next_cursor`.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page size. Defaults to 50; capped at 200.","required":false,"schema":{"type":"integer","default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Run history for the test.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentTestRunsResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tests/runs/{id}":{"get":{"operationId":"get-test-run","summary":"Get Agent Test Run","description":"Retrieve a single test run by ID. Poll this endpoint until\n`status` reaches a terminal state (`passed`, `failed`, or `error`).\nThe `result` field is populated on terminal states.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The test run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTestRun"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tests/runs/batch":{"post":{"operationId":"run-tests-batch","summary":"Run Tests (Batch)","description":"Queue runs for every (test, agent) pair in the body. Entries\nwithout an `agent_id` fan out to every agent the test is\nattached to. Total expanded runs are capped at 100 per call.\nEach entry in the response is a queued run; poll\n`GET /v1/agents/tests/runs/{id}` for each.","tags":["subpackage_agent.subpackage_agent/tests"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Runs queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunBatchResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunBatchRequest"}}}}}},"/v1/agents/tools":{"post":{"operationId":"create","summary":"Create Tool","description":"Create a tool. For webhook tools, the response includes the HMAC\n`webhook_secret` exactly once \u2014 store it immediately; subsequent\nreads return a masked placeholder.\n","tags":["subpackage_agent.subpackage_agent/tools"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateToolRequest"}}}}},"get":{"operationId":"list","summary":"List Tools","description":"List tools in the caller's workspace, most recently updated\nfirst. Cursor-paginated: omit `cursor` to fetch the first page.\nDefault page size is 50 and max is 200. Walk pages while\n`has_more` is true.","tags":["subpackage_agent.subpackage_agent/tools"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max tools per page (default 50, max 200).","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListToolsResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tools/{id}":{"get":{"operationId":"get","summary":"Get Tool","description":"Retrieve a tool by ID. Webhook secrets are always masked here.","tags":["subpackage_agent.subpackage_agent/tools"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update","summary":"Update Tool","description":"Update a tool. Tool kind is immutable \u2014 create a new tool to change it.","tags":["subpackage_agent.subpackage_agent/tools"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateToolRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Tool","description":"Delete a tool. Agents that had it attached get a soft-detach.","tags":["subpackage_agent.subpackage_agent/tools"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Tool deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tools/system-builtins":{"get":{"operationId":"list-system-builtins","summary":"List System Builtins","description":"Read-only catalogue of every system builtin the worker knows\nabout. The console fetches this at runtime rather than\nmaintaining a parallel client-side list; the server\nis the single source of truth for the label and description\ncopy a customer sees in the builtin-instance picker.\n","tags":["subpackage_agent.subpackage_agent/tools"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The catalogue of registered system builtins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSystemBuiltinsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/batch-calls":{"post":{"operationId":"create","summary":"Create Batch Call","description":"Dial a list of phone numbers through one of your voice agents in a\nsingle request. Each recipient can receive personalised dynamic\nvariables that your agent prompt references via `{{key}}` placeholders.\nBatches can run immediately or be scheduled up to 30 days in advance.\n\nAccepts `application/json` or `multipart/form-data` (with a CSV file).\nMax 1000 recipients per batch.\n","tags":["subpackage_agent.subpackage_agent/batchCalls"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Batch accepted for processing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBatchCallResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBatchCallRequest"}}}}},"get":{"operationId":"list","summary":"List Batch Calls","description":"Returns one page of batch calls for the workspace, newest first.\nPaginate by passing `cursor` from the previous response.\n","tags":["subpackage_agent.subpackage_agent/batchCalls"],"parameters":[{"name":"cursor","in":"query","description":"Opaque cursor from a prior response's `next_cursor`.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page size. Defaults to 50; capped at 200.","required":false,"schema":{"type":"integer","default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBatchCallsResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/batch-calls/{id}":{"get":{"operationId":"get","summary":"Get Batch Call","description":"Returns the batch row plus all recipients so the detail view renders\nwithout a second round-trip.\n","tags":["subpackage_agent.subpackage_agent/batchCalls"],"parameters":[{"name":"id","in":"path","description":"Batch call ID.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBatchCallResponse"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/batch-calls/{id}/cancel":{"post":{"operationId":"cancel","summary":"Cancel Batch Call","description":"Cancels a scheduled or pending batch before it starts dialing.\nReturns 409 if the batch is already running or completed.\n","tags":["subpackage_agent.subpackage_agent/batchCalls"],"parameters":[{"name":"id","in":"path","description":"Batch call ID.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Batch cancelled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBatchCallResponse"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/outbound-calls":{"post":{"operationId":"create","summary":"Create Outbound Call","description":"Place an outbound call from an agent to a phone number. LiveKit\noriginates the SIP INVITE through the outbound trunk bound to the\nagent's workspace; the agent worker is dispatched into the room\nautomatically.\n\nThe response is returned as soon as LiveKit accepts the INVITE.\nPoll `GET /v1/agents/conversations/{conversation_id}` for status\ntransitions: `pending` \u2192 `active` (answered) \u2192 `completed`.\n\nRequires a Twilio or BYOC trunk. LiveKit-native numbers are\ninbound-only.\n","tags":["subpackage_agent.subpackage_agent/outboundCalls"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The outbound call was accepted by LiveKit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOutboundCallResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOutboundCallRequest"}}}}}},"/v1/agents/phone-numbers":{"post":{"operationId":"import","summary":"Import Phone Number","description":"Import a phone number into the workspace. The `source` field\ndetermines the provisioning path:\n\n- `livekit` - LiveKit purchases the number on your behalf. US\n inbound only. Quickest path for local testing.\n- `twilio` - Provide your Twilio Account SID, Auth Token, and\n the E.164 number you already own. We provision an Elastic SIP\n Trunk on your Twilio account automatically.\n- `byoc` - Provide an existing SIP trunk ID. The number is\n registered against that trunk.\n\nReturns 402 when the workspace has reached the 100-number cap.\n","tags":["subpackage_agent.subpackage_agent/phoneNumbers"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The imported phone number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportPhoneNumberRequest"}}}}},"get":{"operationId":"list","summary":"List Phone Numbers","description":"List all phone numbers in the caller's workspace.","tags":["subpackage_agent.subpackage_agent/phoneNumbers"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The phone numbers for the workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPhoneNumbersResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/phone-numbers/{id}":{"get":{"operationId":"get","summary":"Get Phone Number","description":"Retrieve a phone number by ID.","tags":["subpackage_agent.subpackage_agent/phoneNumbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested phone number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update","summary":"Update Phone Number","description":"Update a phone number. Only `label` and `agent_id` are mutable;\n`source` and `e164` are immutable after import. Pass `null` for\n`agent_id` to unbind the number from its current agent.\n","tags":["subpackage_agent.subpackage_agent/phoneNumbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated phone number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePhoneNumberRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Phone Number","description":"Delete a phone number from the workspace. For Twilio and LiveKit\nnumbers this also deprovisions the backing SIP trunk and dispatch\nrule on LiveKit Cloud.\n","tags":["subpackage_agent.subpackage_agent/phoneNumbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Phone number deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/sip-trunks":{"post":{"operationId":"create","summary":"Create SIP Trunk","description":"Create a SIP trunk. For `kind=byoc` supply `sip_address` plus\noptional digest credentials and IP allowlist. For `kind=twilio`\nuse `ImportPhoneNumber` with a `twilio` spec instead - trunk\ncreation is handled automatically. Returns 402 when the workspace\nhas reached the 20-trunk cap.\n","tags":["subpackage_agent.subpackage_agent/sipTrunks"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created SIP trunk.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SIPTrunk"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSIPTrunkRequest"}}}}},"get":{"operationId":"list","summary":"List SIP Trunks","description":"List all SIP trunks in the caller's workspace.","tags":["subpackage_agent.subpackage_agent/sipTrunks"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The SIP trunks for the workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSIPTrunksResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/sip-trunks/{id}":{"get":{"operationId":"get","summary":"Get SIP Trunk","description":"Retrieve a SIP trunk by ID.","tags":["subpackage_agent.subpackage_agent/sipTrunks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested SIP trunk.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SIPTrunk"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete","summary":"Delete SIP Trunk","description":"Delete a SIP trunk. This also removes the backing LiveKit inbound\ntrunk, outbound trunk, and dispatch rule if they were provisioned\nby us. Phone numbers attached to this trunk are left in place but\nbecome non-functional until rebound to a new trunk.\n","tags":["subpackage_agent.subpackage_agent/sipTrunks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"SIP trunk deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/widget-config":{"get":{"operationId":"get-widget-config","summary":"Get Agent Widget Config","description":"Return the embed-widget appearance config for an agent. Works\nunauthenticated for public agents; the body is cosmetic only.\n","tags":["subpackage_agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The agent's widget configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetConfig"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tools/{id}/attached-agents":{"get":{"operationId":"list-attached-agents","summary":"List Tool Attached Agents","description":"List the agents in the caller's workspace that currently have\nthis tool attached. Useful before deleting a tool, to surface\nwhich agents will lose access. Soft-deleted agents are filtered\nout. Bounded by the number of agents per workspace (tens), so\nthe response is not paginated.\n","tags":["subpackage_agent.subpackage_agent/tools"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Agents in the caller's workspace attached to the tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListToolAttachedAgentsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tools/{id}/rotate-secret":{"post":{"operationId":"rotate-secret","summary":"Rotate Tool Webhook Secret","description":"Rotate the HMAC signing secret on a webhook tool. The tool id\nis preserved so attached agents keep working; only the secret\nrolls. The new plaintext is returned on `webhook_secret`\nexactly once \u2014 store it immediately, subsequent reads always\nreturn the masked placeholder. The previous secret is\ninvalidated immediately on success.\n","tags":["subpackage_agent.subpackage_agent/tools"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The tool with its newly-rotated webhook_secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tools/test-mcp-connection":{"post":{"operationId":"test-mcp-connection","summary":"Test MCP Connection","description":"Probe a customer-supplied MCP server config without persisting\nanything. The server opens the configured transport, runs the\n`initialize` + `list_tools` handshake, and returns either the\ndiscovered tool catalogue or a structured error string. Pass\n`tool_id` from the edit-form flow when the auth payload carries\n`_set` markers but no plaintext, so the server can hydrate the\nstored secret from the encrypted column before probing.\n","tags":["subpackage_agent.subpackage_agent/tools"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Probe result. The 200 envelope is used for both success and\nstructured failure \u2014 inspect `error` to disambiguate. Network\nand validation failures never bubble up as non-2xx so the\nconsole can render them inline next to the form.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPProbeResult"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestMCPConnectionRequest"}}}}}},"/v1/agents/tools/test-webhook-connection":{"post":{"operationId":"test-webhook-connection","summary":"Test Webhook Connection","description":"Probe a customer-supplied webhook tool config without persisting\nanything. The server fires the exact request shape the worker\nsends on a real invocation \u2014 same JSON body, same HMAC-SHA256\nsignature \u2014 with an empty argument set, and reports the\nendpoint's status code, latency, and a truncated response body,\nor a transport-level failure reason. The probe carries an\n`X-Speechify-Webhook-Test: true` header so a careful endpoint\ncan recognise the test and skip its real side effect. Pass\n`tool_id` from the edit-form flow so the server signs the probe\nwith the tool's stored HMAC secret.\n","tags":["subpackage_agent.subpackage_agent/tools"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Probe result. The 200 envelope is used for both success and\nstructured failure \u2014 inspect `error` to disambiguate. A\nnon-2xx response from the endpoint is NOT an `error`: it\npopulates `status_code` / `response_body` with `ok=false`.\nTransport and validation failures never bubble up as non-2xx\nso the console can render them inline next to the form.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookProbeResult"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestWebhookConnectionRequest"}}}}}},"/v1/agents/audio-assets":{"get":{"operationId":"list","summary":"List Audio Assets","description":"List every non-deleted audio asset in the caller's workspace.\nAudio assets are pre-recorded WAV clips (intro jingles, legal\ndisclaimers, hold cues) referenced from `play_audio` flow nodes\nand the corresponding system builtin.\n","tags":["subpackage_agent.subpackage_agent/audioAssets"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of audio assets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAudioAssetsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"upload","summary":"Upload Audio Asset","description":"Upload a new audio asset. The body is a multipart/form-data\nrequest with a single `file` field carrying the WAV bytes.\n\nThe WAV is validated server-side against a strict format\ncontract \u2014 PCM 16-bit signed, mono, 48000 Hz, \u226430s, \u22644 MiB \u2014\nbefore any bytes hit storage. The strict shape matches the\nLiveKit room sample rate so the worker reads bytes straight\ninto `rtc.AudioFrame` with no decode dependency on either side;\nconvert MP3 sources with `ffmpeg -i in.mp3 -ar 48000 -ac 1\n-sample_fmt s16 out.wav`.\n","tags":["subpackage_agent.subpackage_agent/audioAssets"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The uploaded asset's metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAudioAssetResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The WAV file bytes. Must be PCM 16-bit signed, mono,\n48000 Hz, \u226430s duration, \u22644 MiB total.\n"}},"required":["file"]}}}}}},"/v1/agents/audio-assets/{id}":{"get":{"operationId":"get","summary":"Get Audio Asset","description":"Fetch one audio asset's metadata. Returns 404 for missing,\nsoft-deleted, or foreign-tenant assets \u2014 existence information\nis never leaked across tenants.\n","tags":["subpackage_agent.subpackage_agent/audioAssets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The audio asset's metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioAsset"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete","summary":"Delete Audio Asset","description":"Soft-delete an audio asset. The underlying GCS object is\nretained so any flow node or tool still referencing the asset\nkeeps working until the config is updated; the worker logs\nand skips on missing-row at session start (fail-soft).\n","tags":["subpackage_agent.subpackage_agent/audioAssets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Audio asset soft-deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/audio-assets/{id}/bytes":{"get":{"operationId":"get-bytes","summary":"Get Audio Asset Bytes","description":"Stream the raw WAV bytes for an audio asset. Byte-stream\nsibling of the metadata endpoint at /v1/agents/audio-assets/{id}.\nThe LiveKit worker fetches through here for the play_audio\nbuiltin; SDK consumers can also download originals. Returns 404\nfor missing / soft-deleted / foreign-tenant assets.\n","tags":["subpackage_agent.subpackage_agent/audioAssets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The raw audio bytes (PCM 16-bit signed, mono, 48 kHz, WAV-wrapped).","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}}},"/v1/agents/ivr-menus":{"get":{"operationId":"list","summary":"List IVR Menus","description":"List the active IVR menus the caller's workspace has learned.\nOne row per (fingerprint, tenant).\nInvalidated rows and the cross-tenant shared slot are excluded.\nSorted by `last_observed_at` DESC so the freshest IVRs land at\nthe top. Capped at 200 rows.\n","tags":["subpackage_agent.subpackage_agent/ivrMemory"],"parameters":[{"name":"fingerprint","in":"query","description":"Optional SHA-256 fingerprint hash to narrow the list to one menu.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of cached IVR menus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListIVRMenusResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/ivr-menus/{id}":{"get":{"operationId":"get","summary":"Get IVR Menu","description":"Fetch one menu's full shape. Returns 404 for missing,\nsoft-deleted, or foreign-tenant menus \u2014 existence information\nis never leaked across tenants.\n","tags":["subpackage_agent.subpackage_agent/ivrMemory"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The IVR menu detail.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IVRMenu"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update-label","summary":"Update IVR Menu Option Label","description":"Re-label one option in the stored menu_tree, matched on the\nsupplied DTMF value. The label is what the console displays in\nthe detail panel and what the worker reads back at navigate\ntime to surface the option semantically. Unknown DTMF values\nare a no-op (the response echoes the unchanged menu).\n","tags":["subpackage_agent.subpackage_agent/ivrMemory"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The refreshed menu shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IVRMenu"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIVRMenuLabelRequest"}}}}}},"/v1/agents/ivr-menus/{id}/invalidate":{"post":{"operationId":"invalidate","summary":"Invalidate IVR Menu","description":"Soft-invalidate the named menu. Future lookups skip it; the\nnext discovery for the same fingerprint replaces it (clearing\nthe invalidation). Idempotent: re-invalidating\nan already-invalidated row returns 404.\n\nReason is optional and is captured in structured logs for\noperator triage. A future audit table may persist it.\n","tags":["subpackage_agent.subpackage_agent/ivrMemory"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Menu invalidated.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidateIVRMenuRequest"}}}}}},"/v1/agents/callers":{"get":{"operationId":"list","summary":"List Callers","description":"List the workspace's callers, ordered by most-recently-seen first.\nA caller is the per-(tenant, agent, identity) entity that owns\nlong-term memories and conversation history.\n","tags":["subpackage_agent.subpackage_agent/callers"],"parameters":[{"name":"agent_id","in":"query","description":"Narrow the list to callers attached to one agent.","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Identity-prefix search. Filters to rows where `identity LIKE q + '%'`\n(`%`/`_` characters in the input are escaped as literals).\n","required":false,"schema":{"type":"string"}},{"name":"last_seen_after","in":"query","description":"RFC 3339 timestamp. Narrows to callers active strictly AFTER the\nsupplied moment. Useful for \"active this week / month\" filters.\n","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"cursor","in":"query","description":"Opaque cursor from a prior response's `next_cursor`.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page size. Defaults to 50; capped at 200.","required":false,"schema":{"type":"integer","default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCallersResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/callers/{id}":{"get":{"operationId":"get","summary":"Get Caller","description":"Fetch a single caller by id. Returns 404 for soft-deleted or\nforeign-tenant rows \u2014 GDPR-purged callers appear as \"not found\"\nto the API.\n","tags":["subpackage_agent.subpackage_agent/callers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCallerResponse"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete","summary":"Delete Caller (GDPR purge)","description":"Soft-delete the caller AND cascade soft-delete every memory row\npointing at it. Conversations survive (forensic / billing records)\nbut their caller pointer surfaces as \"deleted\" through the API.\n\nIdempotent \u2014 re-deleting an already-purged caller returns\n`{caller_purged: 0, memories_purged: 0}`. Audit row counts\naccompany every response so a privacy operator has direct\nevidence of the purge without re-querying.\n","tags":["subpackage_agent.subpackage_agent/callers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Soft-delete completed; row counts in the body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCallerResponse"}}}}}},"patch":{"operationId":"update","summary":"Update Caller","description":"Update the customer-editable fields on a caller. PATCH semantics:\nomitted fields are unchanged, present fields overwrite. To clear\na nullable field (`display_name`, `external_ref`) pass an empty\nstring. `metadata` REPLACES the existing JSONB blob when supplied.\n","tags":["subpackage_agent.subpackage_agent/callers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The refreshed caller row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCallerResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallerRequest"}}}}}},"/v1/agents/callers/{id}/memories":{"get":{"operationId":"list-memories","summary":"List Memories For Caller","description":"List one page of memories belonging to the caller, newest first.\nSoft-deleted memories AND memories whose parent caller is\nsoft-deleted are hidden \u2014 the GDPR purge semantics require the\nAPI to behave as if those rows do not exist.\n","tags":["subpackage_agent.subpackage_agent/callers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque cursor from a prior response's `next_cursor`.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page size. Defaults to 50; capped at 200.","required":false,"schema":{"type":"integer","default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCallerMemoriesResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/callers/{id}/conversations":{"get":{"operationId":"list-conversations","summary":"List Conversations For Caller","description":"List one page of conversations belonging to the caller, newest\nstarted first. Same wire envelope as the workspace-wide\n`GET /v1/agents/conversations`, narrowed to one caller.\n","tags":["subpackage_agent.subpackage_agent/callers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque cursor from a prior response's `next_cursor`.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page size. Defaults to 50; capped at 200.","required":false,"schema":{"type":"integer","default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCallerConversationsResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations/stats":{"get":{"operationId":"stats","summary":"Conversation stats","description":"Aggregated counts and averages over the caller's conversations, scoped by the same filters as the list endpoint.","tags":["subpackage_agent.subpackage_agent/conversations"],"parameters":[{"name":"agent_id","in":"query","description":"Filter to conversations for this agent.","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by conversation status.","required":false,"schema":{"$ref":"#/components/schemas/ConversationStatus"}},{"name":"transport","in":"query","description":"Filter by transport.","required":false,"schema":{"$ref":"#/components/schemas/ConversationTransport"}},{"name":"caller_identity","in":"query","description":"Filter by caller identity.","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","description":"Free-text search across conversation content.","required":false,"schema":{"type":"string"}},{"name":"started_after","in":"query","description":"Only conversations started at or after this RFC 3339 timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"started_before","in":"query","description":"Only conversations started at or before this RFC 3339 timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"duration_min_ms","in":"query","description":"Minimum conversation duration in milliseconds.","required":false,"schema":{"type":"integer"}},{"name":"duration_max_ms","in":"query","description":"Maximum conversation duration in milliseconds.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stats for the matched conversations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationStats"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations/recent-callees":{"get":{"operationId":"recent-callees","summary":"List recent callees","description":"Distinct phone numbers the caller's workspace has dialled on\noutbound calls, ordered by most recent. Feeds the batch-calls\ncomposer's \"Suggested from history\" surface. Cursor-paginated:\nomit `cursor` to fetch the first page. Default page size is 50\nand max is 200. Walk pages while `has_more` is true.\n","tags":["subpackage_agent.subpackage_agent/conversations"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max number of distinct phone numbers per page. Defaults to 50; clamped to 200.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Recent callees for the caller's workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRecentCalleesResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations/{id}/recording":{"get":{"operationId":"stream-recording","summary":"Stream Recording","description":"Proxy the GCS-stored audio recording for a conversation through\nthe Cloud Run service identity. Returns OGG/Opus bytes (LiveKit\nroom-composite egress default). The response is streamed so a\nlong recording does not buffer in memory; `