{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/agents":{"get":{"operationId":"agents_list","summary":"List","description":"Returns all agents in a project.","tags":["agents"],"parameters":[{"name":"project","in":"query","description":"The name of the project to list agents for.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_list_Response_200"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"agents_create","summary":"Create","description":"Creates a new agent in a project.","tags":["agents"],"parameters":[{"name":"project","in":"query","description":"The name of the project to create the agent in.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"201":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_create_Response_201"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentRequest"}}}},"security":[{"bearerAuth":[]}]}},"/agents/upsert":{"put":{"operationId":"agents_upsert","summary":"Upsert","description":"Upserts an agent by name. If an agent with the same name already exists, it will be updated. Otherwise, it will be created.","tags":["agents"],"parameters":[{"name":"project","in":"query","description":"The name of the project containing the agent.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_upsert_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"Agent is disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAgentRequest"}}}},"security":[{"bearerAuth":[]}]}},"/agents/{nameOrId}":{"get":{"operationId":"agents_get","summary":"Get","description":"Returns an agent by name or ID.","tags":["agents"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the agent to get.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the agent. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_get_Response_200"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"agents_delete","summary":"Delete","description":"Deletes an agent by name or ID.","tags":["agents"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the agent to delete.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the agent. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_delete_Response_200"}}}},"403":{"description":"Forbidden (resource belongs to a different organization)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"operationId":"agents_update","summary":"Update","description":"Updates an agent by name or ID.","tags":["agents"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the agent to update.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the agent. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_update_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"Agent is disabled. A disabled agent can only be updated to release its phone numbers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentRequest"}}}},"security":[{"bearerAuth":[]}]}},"/agents/{nameOrId}/custom-phone-numbers":{"post":{"operationId":"agents_add_custom_phone_number","summary":"Add Custom Phone Number","description":"Adds a custom phone number to an agent. The user must configure their SIP trunk to point to Phonic's SIP server.","tags":["agents"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the agent.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the agent. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}},{"name":"X-Sip-Address","in":"header","description":"SIP address of the user's SIP trunk. Required. All three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. They are used for outbound calls and call transfers from the agent.","required":true,"schema":{"type":"string"}},{"name":"X-Sip-Auth-Username","in":"header","description":"SIP auth username. Required. All three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. They are used for outbound calls and call transfers from the agent.","required":true,"schema":{"type":"string"}},{"name":"X-Sip-Auth-Password","in":"header","description":"SIP auth password. Required. All three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. They are used for outbound calls and call transfers from the agent.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_add_custom_phone_number_Response_200"}}}},"400":{"description":"Invalid parameters or phone number already assigned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"401":{"description":"Unsupported authentication method","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"The agent is currently being updated (please try again), or the agent is disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"phone_number":{"type":"string","description":"The E.164 formatted phone number to add (e.g., \"+15551234567\")."},"configuration_endpoint":{"oneOf":[{"$ref":"#/components/schemas/AgentsNameOrIdCustomPhoneNumbersPostRequestBodyContentApplicationJsonSchemaConfigurationEndpoint"},{"type":"null"}],"description":"When not `null`, the agent will call this endpoint to get configuration options for calls on this phone number."},"sip":{"$ref":"#/components/schemas/AgentsNameOrIdCustomPhoneNumbersPostRequestBodyContentApplicationJsonSchemaSip","description":"SIP trunk settings for this phone number, applied to both its inbound trunk and the trunk created for each outbound call. Set at creation; remove and re-add the number to change them."}},"required":["phone_number"]}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"agents_delete_custom_phone_number","summary":"Delete Custom Phone Number","description":"Deletes a custom phone number from an agent.","tags":["agents"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the agent.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the agent. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_delete_custom_phone_number_Response_200"}}}},"400":{"description":"Invalid parameters, phone number not assigned to agent, or not a custom phone number","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"401":{"description":"Unsupported authentication method","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Agent or phone number not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"The agent is currently being updated (please try again), or the agent is disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"phone_number":{"type":"string","description":"The E.164 formatted phone number to remove (e.g., \"+15551234567\")."}},"required":["phone_number"]}}}},"security":[{"bearerAuth":[]}]}},"/agents/{nameOrId}/phone-numbers":{"patch":{"operationId":"agents_update_phone_number","summary":"Update Phone Number","description":"Updates a phone number on an agent.","tags":["agents"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the agent.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the agent. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_update_phone_number_Response_200"}}}},"400":{"description":"Invalid parameters or phone number already assigned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"401":{"description":"Unsupported authentication method","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"The agent is currently being updated (please try again), or the agent is disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"phone_number":{"type":"string","description":"The E.164 formatted phone number to add (e.g., \"+15551234567\")."},"configuration_endpoint":{"oneOf":[{"$ref":"#/components/schemas/AgentsNameOrIdPhoneNumbersPatchRequestBodyContentApplicationJsonSchemaConfigurationEndpoint"},{"type":"null"}],"description":"When not `null`, the agent will call this endpoint to get configuration options for calls on this phone number."}},"required":["phone_number"]}}}},"security":[{"bearerAuth":[]}]}},"/agents/{nameOrId}/disable":{"post":{"operationId":"agents_disable","summary":"Disable","description":"Disables an agent by name or ID. A disabled agent cannot start conversations or be updated, except to release its phone numbers.","tags":["agents"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the agent.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the agent. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_disable_Response_200"}}}},"403":{"description":"Forbidden (resource belongs to a different organization)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]}},"/agents/{nameOrId}/enable":{"post":{"operationId":"agents_enable","summary":"Enable","description":"Enables a previously disabled agent by name or ID.","tags":["agents"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the agent.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the agent. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_enable_Response_200"}}}},"403":{"description":"Forbidden (resource belongs to a different organization, or the organization has reached its maximum number of enabled agents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]}},"/tools":{"get":{"operationId":"tools_list","summary":"List","description":"Returns all custom tools for the organization.","tags":["tools"],"parameters":[{"name":"project","in":"query","description":"The name of the project to list tools for.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tools_list_Response_200"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"tools_create","summary":"Create","description":"Creates a new tool in a project.","tags":["tools"],"parameters":[{"name":"project","in":"query","description":"The name of the project to create the tool in.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"201":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tools_create_Response_201"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Agent authentication cannot create tools","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Tool name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateToolRequest"}}}},"security":[{"bearerAuth":[]}]}},"/tools/{nameOrId}":{"get":{"operationId":"tools_get","summary":"Get","description":"Returns a tool by name or ID.","tags":["tools"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the tool to get.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the tool. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tools_get_Response_200"}}}},"403":{"description":"Forbidden (resource belongs to a different organization)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Tool not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"tools_delete","summary":"Delete","description":"Deletes a tool by name or ID.","tags":["tools"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the tool to delete.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the tool. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tools_delete_Response_200"}}}},"404":{"description":"Tool not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"operationId":"tools_update","summary":"Update","description":"Updates a tool by name or ID.","tags":["tools"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the tool to update.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the tool. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tools_update_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Tool not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"Tool name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateToolRequest"}}}},"security":[{"bearerAuth":[]}]}},"/external_storage_policies":{"get":{"operationId":"externalStoragePolicies_list","summary":"List","description":"Returns all external storage policies in a project.","tags":["externalStoragePolicies"],"parameters":[{"name":"project","in":"query","description":"The name of the project to list external storage policies for.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external_storage_policies_list_Response_200"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"externalStoragePolicies_create","summary":"Create","description":"Creates a new external storage policy in a project. Agents referencing the policy deliver their conversation artifacts to the configured S3-compatible bucket.","tags":["externalStoragePolicies"],"parameters":[{"name":"project","in":"query","description":"The name of the project to create the external storage policy in.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"201":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external_storage_policies_create_Response_201"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"External storage policy name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExternalStoragePolicyRequest"}}}},"security":[{"bearerAuth":[]}]}},"/external_storage_policies/{nameOrId}":{"get":{"operationId":"externalStoragePolicies_get","summary":"Get","description":"Returns an external storage policy by name or ID.","tags":["externalStoragePolicies"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the external storage policy to get.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the external storage policy. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external_storage_policies_get_Response_200"}}}},"403":{"description":"Forbidden (resource belongs to a different organization)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"External storage policy not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"externalStoragePolicies_delete","summary":"Delete","description":"Deletes an external storage policy by name or ID. The policy must not be referenced by any agent.","tags":["externalStoragePolicies"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the external storage policy to delete.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the external storage policy. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external_storage_policies_delete_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden (resource belongs to a different organization)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"External storage policy not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"External storage policy is still attached to one or more agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"operationId":"externalStoragePolicies_update","summary":"Update","description":"Updates an external storage policy by name or ID. Credentials can only be rotated by providing both `access_key_id` and `secret_access_key`.","tags":["externalStoragePolicies"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the external storage policy to update.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the external storage policy. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external_storage_policies_update_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden (resource belongs to a different organization)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"External storage policy not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"External storage policy name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExternalStoragePolicyRequest"}}}},"security":[{"bearerAuth":[]}]}},"/extraction_schemas":{"get":{"operationId":"extractionSchemas_list","summary":"List","description":"Returns all extraction schemas in a project.","tags":["extractionSchemas"],"parameters":[{"name":"project","in":"query","description":"The name of the project to list extraction schemas for.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/extraction_schemas_list_Response_200"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"extractionSchemas_create","summary":"Create","description":"Creates a new extraction schema in a project.","tags":["extractionSchemas"],"parameters":[{"name":"project","in":"query","description":"The name of the project to create the extraction schema in.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"201":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/extraction_schemas_create_Response_201"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Extraction schema name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExtractionSchemaRequest"}}}},"security":[{"bearerAuth":[]}]}},"/extraction_schemas/{nameOrId}":{"get":{"operationId":"extractionSchemas_get","summary":"Get","description":"Returns an extraction schema by name or ID.","tags":["extractionSchemas"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the extraction schema to get.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the extraction schema. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/extraction_schemas_get_Response_200"}}}},"404":{"description":"Extraction schema not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"extractionSchemas_delete","summary":"Delete","description":"Deletes an extraction schema by name or ID.","tags":["extractionSchemas"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the extraction schema to delete.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the extraction schema. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/extraction_schemas_delete_Response_200"}}}},"404":{"description":"Extraction schema not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"operationId":"extractionSchemas_update","summary":"Update","description":"Updates an extraction schema by name or ID.","tags":["extractionSchemas"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the extraction schema to update.","required":true,"schema":{"type":"string"}},{"name":"project","in":"query","description":"The name of the project containing the extraction schema. Only used when `nameOrId` is a name.","required":false,"schema":{"type":"string","default":"main"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/extraction_schemas_update_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Extraction schema not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Extraction schema name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExtractionSchemaRequest"}}}},"security":[{"bearerAuth":[]}]}},"/voices":{"get":{"operationId":"voices_list","summary":"List","description":"Returns all available voices.","tags":["voices"],"parameters":[{"name":"model","in":"query","description":"Ignored. This parameter is deprecated and can be omitted.","required":false,"schema":{"$ref":"#/components/schemas/VoicesGetParametersModel"},"deprecated":true}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/voices_list_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]}},"/voices/{id}":{"get":{"operationId":"voices_get","summary":"Get","description":"Returns a voice by ID.","tags":["voices"],"parameters":[{"name":"id","in":"path","description":"The ID of the voice to get.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/voices_get_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Voice not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/tts":{"post":{"operationId":"voices_preview","summary":"Preview","description":"Generates speech audio for the provided text and returns it as a single base64-encoded string.","tags":["voices"],"responses":{"200":{"description":"The generated audio.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsResponse"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamTtsRequest"}}}},"security":[{"bearerAuth":[]}]}},"/workspace":{"get":{"operationId":"workspace_get","summary":"Get","description":"Returns information about the workspace.","tags":["workspace"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workspace_get_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"operationId":"workspace_update","summary":"Update","description":"Updates the workspace.","tags":["workspace"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workspace_update_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspaceRequest"}}}},"security":[{"bearerAuth":[]}]}},"/api_keys":{"post":{"operationId":"apiKeys_create","summary":"Create","description":"Creates a new API key in the workspace.","tags":["apiKeys"],"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyWithSecret"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"security":[{"bearerAuth":[]}]}},"/api_keys/{id}":{"delete":{"operationId":"apiKeys_delete","summary":"Delete","description":"Deletes an API key.","tags":["apiKeys"],"parameters":[{"name":"id","in":"path","description":"The ID of the API key to delete.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api_keys_delete_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"operationId":"apiKeys_update","summary":"Update","description":"Updates an API key.","tags":["apiKeys"],"parameters":[{"name":"id","in":"path","description":"The ID of the API key to update.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api_keys_update_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiKeyRequest"}}}},"security":[{"bearerAuth":[]}]}},"/api_keys/{id}/rotate":{"post":{"operationId":"apiKeys_rotate","summary":"Rotate","description":"Rotates an API key, generating a new secret and invalidating the old one.","tags":["apiKeys"],"parameters":[{"name":"id","in":"path","description":"The ID of the API key to rotate.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key rotated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyWithSecret"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]}},"/conversation_items/{id}/replay":{"post":{"operationId":"conversationItems_replay","summary":"Replay","description":"Returns the alternative response(s) the assistant would have\nproduced for this conversation turn given changes to the agent system prompt.\n\nOnly assistant items from ended conversations can be replayed. Omit the\nrequest body (or omit `system_prompt`) to replay the turn exactly as it\noriginally ran.\n","tags":["conversationItems"],"parameters":[{"name":"id","in":"path","description":"The ID of the conversation item to replay.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayConversationItemResponse"}}}},"400":{"description":"Malformed JSON or invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Conversation item not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"Conversation is still live, or the agent is disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"422":{"description":"Conversation item cannot be replayed (not an assistant item, or the conversation's transcripts were deleted)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayConversationItemRequest"}}}},"security":[{"bearerAuth":[]}]}},"/conversations":{"get":{"operationId":"conversations_list","summary":"List","description":"Returns conversations with optional filtering.","tags":["conversations"],"parameters":[{"name":"project","in":"query","description":"The name of the project to list conversations for.","required":false,"schema":{"type":"string","default":"main"}},{"name":"external_id","in":"query","description":"Filter by external ID to get a specific conversation.","required":false,"schema":{"type":"string"}},{"name":"duration_min","in":"query","description":"Minimum duration in seconds.","required":false,"schema":{"type":"integer","minimum":0}},{"name":"duration_max","in":"query","description":"Maximum duration in seconds.","required":false,"schema":{"type":"integer","minimum":0}},{"name":"started_at_min","in":"query","description":"Minimum start date/time. Valid examples: `2025-04-17`, `2025-04-17T02:48:52.708Z`","required":false,"schema":{"type":"string"}},{"name":"started_at_max","in":"query","description":"Maximum start date/time. Valid examples: `2025-04-17`, `2025-04-17T02:48:52.708Z`","required":false,"schema":{"type":"string"}},{"name":"before","in":"query","description":"Cursor for backward pagination. Use a conversation ID from `pagination.prev_cursor` to fetch the previous page of conversations. Cannot be used with `after`.","required":false,"schema":{"type":"string"}},{"name":"after","in":"query","description":"Cursor for forward pagination. Use a conversation ID from `pagination.next_cursor` to fetch the next page of conversations. Cannot be used with `before`.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of conversations to return per page.","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"audio_container","in":"query","description":"Format of the presigned `audio_url` in each conversation in the response.","required":false,"schema":{"$ref":"#/components/schemas/ConversationsGetParametersAudioContainer","default":"wav.gz"}}],"responses":{"200":{"description":"Paginated list (`conversations`, `pagination`) when listing, or a single `conversation` when the `external_id` query parameter matches exactly one conversation.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_list_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Project or conversation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]}},"/conversations/{id}":{"get":{"operationId":"conversations_get","summary":"Get","description":"Returns a conversation by ID.","tags":["conversations"],"parameters":[{"name":"id","in":"path","description":"The ID of the conversation to get.","required":true,"schema":{"type":"string"}},{"name":"audio_container","in":"query","description":"Format of the presigned `audio_url` in the response.","required":false,"schema":{"$ref":"#/components/schemas/ConversationsIdGetParametersAudioContainer","default":"wav.gz"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_get_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"conversations_delete","summary":"Delete","description":"Deletes a conversation, scheduling its transcripts and audio recordings for deletion. The conversation must have ended.","tags":["conversations"],"parameters":[{"name":"id","in":"path","description":"The ID of the conversation to delete.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_delete_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"Cannot delete an active conversation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]}},"/conversations/{id}/cancel":{"post":{"operationId":"conversations_cancel","summary":"Cancel","description":"Cancels an active conversation.","tags":["conversations"],"parameters":[{"name":"id","in":"path","description":"The ID of the conversation to cancel.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_cancel_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"Conversation already ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"504":{"description":"Cancellation timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/conversations/{id}/analysis":{"get":{"operationId":"conversations_get_analysis","summary":"Get Analysis","description":"Returns an analysis of the specified conversation.","tags":["conversations"],"parameters":[{"name":"id","in":"path","description":"The ID of the conversation to analyze.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_get_analysis_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]}},"/conversations/{id}/extractions":{"get":{"operationId":"conversations_list_extractions","summary":"List Extractions","description":"Returns all extractions for a conversation.","tags":["conversations"],"parameters":[{"name":"id","in":"path","description":"The ID of the conversation to get extractions for.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_list_extractions_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"conversations_extract_data","summary":"Extract Data","description":"Extracts data from a conversation using a schema.","tags":["conversations"],"parameters":[{"name":"id","in":"path","description":"The ID of the conversation to extract data from.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_extract_data_Response_201"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Conversation or schema not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractDataRequest"}}}},"security":[{"bearerAuth":[]}]}},"/conversations/{id}/evals":{"get":{"operationId":"conversations_list_evaluations","summary":"List Evaluations","description":"Returns all evaluations for a conversation.","tags":["conversations"],"parameters":[{"name":"id","in":"path","description":"The ID of the conversation to get evaluations for.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_list_evaluations_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"conversations_evaluate","summary":"Evaluate","description":"Evaluates a conversation using an evaluation prompt.","tags":["conversations"],"parameters":[{"name":"id","in":"path","description":"The ID of the conversation to evaluate.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_evaluate_Response_201"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Conversation or evaluation prompt not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateConversationRequest"}}}},"security":[{"bearerAuth":[]}]}},"/conversations/outbound_call":{"post":{"operationId":"conversations_outbound_call","summary":"Outbound Call","description":"Initiates a call to a given phone number using Phonic's Twilio account.","tags":["conversations"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_outbound_call_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"The call could not be completed. `error.code` says why - for example `no_answer` when the dialed number never picked up, `call_ended` when the call ended before it connected, or `sip_call_failed` when the carrier rejected it. Also returned when the agent is disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"429":{"description":"Concurrency limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundCallRequest"}}}},"security":[{"bearerAuth":[]}]}},"/conversations/sip/outbound_call":{"post":{"operationId":"conversations_sip_outbound_call","summary":"Sip Outbound Call","description":"Initiates a SIP outbound call using user-supplied SIP credentials in headers.","tags":["conversations"],"parameters":[{"name":"X-Sip-Address","in":"header","description":"SIP address of the user's SIP trunk. Required.","required":true,"schema":{"type":"string"}},{"name":"X-Sip-Auth-Username","in":"header","description":"SIP auth username, if your provider requires it.","required":false,"schema":{"type":"string"}},{"name":"X-Sip-Auth-Password","in":"header","description":"SIP auth password, if your provider requires it.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_sip_outbound_call_Response_200"}}}},"400":{"description":"Invalid query parameters or body, or missing required headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostConversationsSipOutboundCallRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"The call could not be completed. When the carrier rejected it, the `sip_status_code` and `sip_status` fields contain the carrier's SIP response details; calls that failed before reaching the carrier - `no_answer`, `call_ended` - carry only `message` and `code`. Also returned when the agent is disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostConversationsSipOutboundCallRequestConflictError"}}}},"429":{"description":"Concurrency limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from_phone_number":{"type":"string","description":"Caller ID phone number in E.164 format."},"to_phone_number":{"type":"string","description":"Destination phone number in E.164 format."},"from_display_name":{"type":"string","maxLength":256,"description":"Display name for the caller ID (the SIP `From` header) on this call. Sent only when non-empty. Whether it reaches the callee depends on your SIP carrier - carriers that forward the `From` display name (e.g. Telnyx) present it, while others (e.g. Twilio) drop it or override it with a CNAM lookup."},"config":{"$ref":"#/components/schemas/OutboundCallConfig"},"dry_run":{"type":"boolean","default":false,"description":"If true, validates the outbound call setup without placing a call. Returns HTTP 200 with `conversation_id` and `twilio_call_sid` set to null."},"sip":{"$ref":"#/components/schemas/ConversationsSipOutboundCallPostRequestBodyContentApplicationJsonSchemaSip","description":"SIP trunk settings for the outbound trunk created for this call."}},"required":["from_phone_number","to_phone_number"]}}}},"security":[{"bearerAuth":[]}]}},"/conversations/{id}/replay":{"post":{"operationId":"conversations_replay","summary":"Replay","description":"Replays an ended conversation by re-running its recorded audio through an\nagent. Requires API key or access token authentication. The conversation must\nhave audio recordings available and an associated agent (or one specified in\nthe request body).\n","tags":["conversations"],"parameters":[{"name":"id","in":"path","description":"The ID of the conversation to replay.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Replay started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_replay_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Conversation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"Cannot replay an active conversation, or the agent is disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"422":{"description":"Conversation cannot be replayed (no audio, deleted recordings, or no agent)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"429":{"description":"Concurrency limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"503":{"description":"Insufficient capacity available to start the replay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayConversationRequest"}}}},"security":[{"bearerAuth":[]}]}},"/auth/session_token":{"post":{"operationId":"auth_create_session_token","summary":"Create Session Token","description":"Creates a short-lived session token that can be used to authenticate WebSocket connections. Session tokens are useful for client-side applications where you don't want to expose your API key.","tags":["auth"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_create_session_token_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden (only API keys can create session tokens)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionTokenRequest"}}}},"security":[{"bearerAuth":[]}]}},"/auth/conversation_token":{"post":{"operationId":"auth_create_conversation_token","summary":"Create Conversation Token","description":"Creates a short-lived conversation token scoped to a specific agent. Conversation tokens are useful for client-side applications that start a conversation with a single agent without exposing your API key.","tags":["auth"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_create_conversation_token_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden (only API keys can create conversation tokens)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"Agent is disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationTokenRequest"}}}},"security":[{"bearerAuth":[]}]}},"/projects":{"get":{"operationId":"projects_list","summary":"List","description":"Returns all projects in a workspace.","tags":["projects"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/projects_list_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"projects_create","summary":"Create","description":"Creates a new project in a workspace.","tags":["projects"],"responses":{"201":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/projects_create_Response_201"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}}},"security":[{"bearerAuth":[]}]}},"/projects/{nameOrId}":{"get":{"operationId":"projects_get","summary":"Get","description":"Returns a project by name or ID.","tags":["projects"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the project to get.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/projects_get_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"projects_delete","summary":"Delete","description":"Deletes a project by name or ID.","tags":["projects"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the project to delete.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/projects_delete_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"409":{"description":"Cannot delete the last project in a workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"operationId":"projects_update","summary":"Update","description":"Updates a project by name or ID.","tags":["projects"],"parameters":[{"name":"nameOrId","in":"path","description":"The name or the ID of the project to update.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/projects_update_Response_200"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequest"}}}},"security":[{"bearerAuth":[]}]}},"/projects/{id}/conversation_eval_prompts":{"get":{"operationId":"projects_list_eval_prompts","summary":"List Eval Prompts","description":"Returns all conversation evaluation prompts for a project.","tags":["projects"],"parameters":[{"name":"id","in":"path","description":"The ID of the project.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/projects_list_eval_prompts_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"projects_create_eval_prompt","summary":"Create Eval Prompt","description":"Creates a new conversation evaluation prompt for a project.","tags":["projects"],"parameters":[{"name":"id","in":"path","description":"The ID of the project.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/projects_create_eval_prompt_Response_201"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationEvalPromptRequest"}}}},"security":[{"bearerAuth":[]}]}},"/projects/{id}/conversation_evals":{"get":{"operationId":"projects_list_evals","summary":"List Evals","description":"Returns all conversation evaluation results for a project.","tags":["projects"],"parameters":[{"name":"id","in":"path","description":"The ID of the project.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/projects_list_evals_Response_200"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"security":[{"bearerAuth":[]}]}},"/responses":{"post":{"operationId":"responses_create","summary":"Create","description":"Generates one or more alternative assistant responses for a conversation\nyou supply inline to simulate Phonic agent behavior.\n\nThis endpoint is stateless, so it does not create a new conversation or\nstore anything. The request carries the system prompt, a conversation so\nfar as `input`, and the tools the assistant may call.\n\nThere are two different types of tool configurations:\n\n- `tool_definitions`: defined inline. Typically if you use LiveKit, this\n  is where you can pass in your tool definitions.\n- `tools`: predefined tools configured in Phonic, referenced by name, in\n  the same shape as the STS WebSocket `config` message. Today this covers\n  built-in tools such as `choose_not_to_respond` and transfer tools stored\n  in `project`. Your context, webhook, MCP and WebSocket tools cannot be\n  referenced here yet; define those inline as `tool_definitions`.\n\nEach item in `input` is a user message, an assistant message (with\noptional `tool_calls` or an `action`), or a `tool_call_output`. Every\nassistant tool call must be followed immediately by the\n`tool_call_output` item that carries its result.\n\nA tool referenced in `tools` resolves to an `action` on the generated\nresponse rather than a tool call - the event a live conversation would\nhave emitted, without the effect actually being carried out.\n\nThis is an experimental feature and must be enabled for your workspace;\notherwise, it returns `404`. Please contact our team if you would like\naccess.\n","tags":["responses"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponsesResponse"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized (authentication missing or invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"404":{"description":"The responses API is not enabled for this workspace, or `project` was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"502":{"description":"The responses service returned an invalid response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}},"503":{"description":"The responses service is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponsesRequest"}}}},"security":[{"bearerAuth":[]}]}}},"tags":[{"name":"agents"},{"name":"tools"},{"name":"externalStoragePolicies"},{"name":"extractionSchemas"},{"name":"voices"},{"name":"workspace"},{"name":"apiKeys"},{"name":"conversationItems"},{"name":"conversations"},{"name":"auth"},{"name":"projects"},{"name":"responses"}],"servers":[{"url":"https://api.phonic.ai/v1","description":"https://api.phonic.ai/v1"}],"components":{"schemas":{"AgentProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"The project the agent belongs to.","title":"AgentProject"},"AgentAudioFormat":{"type":"string","enum":["pcm_44100","pcm_24000","pcm_16000","pcm_8000","mulaw_8000"],"description":"The audio format of the agent. If the agent has a phone number, the audio format will be `mulaw_8000`.","title":"AgentAudioFormat"},"AgentBackgroundNoise":{"type":"string","enum":["office","call-center","coffee-shop"],"description":"The background noise type. Can be \"office\", \"call-center\", \"coffee-shop\", or null.","title":"AgentBackgroundNoise"},"AgentTemplateVariables":{"type":"object","properties":{"default_value":{"type":["string","null"]}},"required":["default_value"],"title":"AgentTemplateVariables"},"AgentToolsItems0":{"type":"string","enum":["keypad_input","natural_conversation_ending","choose_not_to_respond","web_search"],"description":"Built-in tool","title":"AgentToolsItems0"},"AgentToolsItems":{"oneOf":[{"$ref":"#/components/schemas/AgentToolsItems0"},{"type":"string"}],"title":"AgentToolsItems"},"BuiltInToolConfigSpeechBeforeToolCall":{"type":"string","enum":["required","optional","suppressed"],"description":"Controls whether the assistant speaks before the tool is called. `required`: the assistant must speak first. `optional`: the model decides. `suppressed`: the assistant is strongly instructed to stay silent before the call (best effort).","title":"BuiltInToolConfigSpeechBeforeToolCall"},"BuiltInToolConfig":{"type":"object","properties":{"speech_before_tool_call":{"$ref":"#/components/schemas/BuiltInToolConfigSpeechBeforeToolCall","description":"Controls whether the assistant speaks before the tool is called. `required`: the assistant must speak first. `optional`: the model decides. `suppressed`: the assistant is strongly instructed to stay silent before the call (best effort)."}},"required":["speech_before_tool_call"],"description":"Configuration for a simple built-in tool (`keypad_input`, `natural_conversation_ending`, or `web_search`).","title":"BuiltInToolConfig"},"WebSearchToolConfigSpeechBeforeToolCall":{"type":"string","enum":["required","optional","suppressed"],"description":"Controls whether the agent speaks before the tool is called. `required`: the agent must speak first. `optional`: the model decides. `suppressed`: the agent is strongly instructed to stay silent before the call (best effort).","title":"WebSearchToolConfigSpeechBeforeToolCall"},"WebSearchToolConfig":{"type":"object","properties":{"speech_before_tool_call":{"$ref":"#/components/schemas/WebSearchToolConfigSpeechBeforeToolCall","description":"Controls whether the agent speaks before the tool is called. `required`: the agent must speak first. `optional`: the model decides. `suppressed`: the agent is strongly instructed to stay silent before the call (best effort)."},"can_run_during_user_speech":{"type":"boolean","default":false,"description":"When true, the agent can call web search while the user is still speaking. Setting it to true requires the feature to be enabled for your organization; contact Phonic to get access."}},"required":["speech_before_tool_call"],"description":"Configuration for the `web_search` built-in tool in an agent's `built_in_tool_configs`.","title":"WebSearchToolConfig"},"ChooseNotToRespondToolConfig":{"type":"object","properties":{"respond_after_sec":{"type":["number","null"],"format":"double","minimum":1,"maximum":30,"description":"Number of seconds to wait after the tool fires before the assistant speaks a follow-up if the user stays silent. When null, the assistant stays silent (default)."}},"description":"Configuration for the `choose_not_to_respond` built-in tool.","title":"ChooseNotToRespondToolConfig"},"BuiltInToolConfigs":{"oneOf":[{"$ref":"#/components/schemas/BuiltInToolConfig"},{"$ref":"#/components/schemas/WebSearchToolConfig"},{"$ref":"#/components/schemas/ChooseNotToRespondToolConfig"}],"title":"BuiltInToolConfigs"},"Task":{"type":"object","properties":{"name":{"type":"string","description":"The name of the task."},"description":{"type":"string","description":"The description of the task."}},"required":["name","description"],"title":"Task"},"LanguageCode":{"type":"string","enum":["ar","az","bg","bn","cs","da","de","el","en","es","fa","fi","fil","fr","gu","he","hi","hu","id","it","ja","ka","km","kn","ko","lt","lv","ml","mr","ms","ne","nl","no","pa","pl","pt","ro","ru","si","sk","sq","sv","sw","ta","te","th","tr","uk","ur","vi","yue","zh"],"description":"ISO 639-1 language codes supported by the agent","title":"LanguageCode"},"AgentMultilingualMode":{"type":"string","enum":["auto","request","initial"],"default":"request","description":"If `\"auto\"`, each user audio is automatically identified for the language to respond in. If `\"request\"`, user must request to change language (recommended). If `\"initial\"` the first turn user audio determines the language for the rest of the conversation.","title":"AgentMultilingualMode"},"AgentIntelligenceLevel":{"type":"string","enum":["standard","high"],"default":"standard","description":"The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency.","title":"AgentIntelligenceLevel"},"AgentModel0":{"type":"string","enum":["phonic-0.5","phonic-1"],"title":"AgentModel0"},"AgentModel":{"oneOf":[{"$ref":"#/components/schemas/AgentModel0"},{"type":"string"}],"description":"The Phonic speech-to-speech model to generate with. Omit it to use the current default model.","title":"AgentModel"},"AgentPhonicModel0":{"type":"string","enum":["phonic-0.5","phonic-1"],"title":"AgentPhonicModel0"},"AgentPhonicModel":{"oneOf":[{"$ref":"#/components/schemas/AgentPhonicModel0"},{"type":"string"}],"description":"The Phonic speech-to-speech model to generate with. This field is deprecated. Use `model` instead.","title":"AgentPhonicModel","deprecated":true},"AgentObservabilityIntegrationsItems":{"type":"string","enum":["braintrust"],"title":"AgentObservabilityIntegrationsItems"},"AgentPronunciationDictionaryItems":{"type":"object","properties":{"word":{"type":"string","maxLength":30},"pronunciation":{"type":"string","maxLength":50}},"required":["word","pronunciation"],"title":"AgentPronunciationDictionaryItems"},"AgentConfigurationEndpoint":{"type":"object","properties":{"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"timeout_ms":{"type":"integer","description":"The timeout for the configuration endpoint in milliseconds."}},"required":["url","headers","timeout_ms"],"description":"When not `null`, the agent will call this endpoint to get configuration options.","title":"AgentConfigurationEndpoint"},"AgentIntegration":{"type":"object","properties":{"account_id":{"type":"string","description":"The connected account ID."},"account_name":{"type":["string","null"],"description":"The connected account name."},"action_names":{"type":"array","items":{"type":"string"},"description":"The integration actions available to the agent."},"app_slug":{"type":"string","description":"The slug identifying the integration app."}},"required":["account_id","account_name","action_names","app_slug"],"description":"A third-party integration enabled for an agent.","title":"AgentIntegration"},"DataRetentionPolicy0":{"type":"object","properties":{"zero_data_retention":{"type":"boolean","description":"When `true`, no transcripts or audio recordings are retained."}},"required":["zero_data_retention"],"description":"Zero data retention mode. No transcripts or audio recordings are retained.","title":"DataRetentionPolicy0"},"DataRetentionPolicyOneOf1Transcripts":{"type":"object","properties":{"delete_after_hours":{"type":["integer","null"],"description":"Number of hours after which transcripts are deleted. Null means transcripts are retained indefinitely."}},"required":["delete_after_hours"],"title":"DataRetentionPolicyOneOf1Transcripts"},"DataRetentionPolicyOneOf1AudioRecordings":{"type":"object","properties":{"delete_after_hours":{"type":["integer","null"],"description":"Number of hours after which audio recordings are deleted. Null means audio recordings are retained indefinitely."}},"required":["delete_after_hours"],"title":"DataRetentionPolicyOneOf1AudioRecordings"},"DataRetentionPolicy1":{"type":"object","properties":{"zero_data_retention":{"type":"boolean","description":"Must be `false` for standard data retention."},"transcripts":{"$ref":"#/components/schemas/DataRetentionPolicyOneOf1Transcripts"},"audio_recordings":{"$ref":"#/components/schemas/DataRetentionPolicyOneOf1AudioRecordings"}},"required":["zero_data_retention","transcripts","audio_recordings"],"description":"Standard data retention with configurable deletion windows.","title":"DataRetentionPolicy1"},"DataRetentionPolicy":{"oneOf":[{"$ref":"#/components/schemas/DataRetentionPolicy0"},{"$ref":"#/components/schemas/DataRetentionPolicy1"}],"description":"Controls how long transcripts and audio recordings are retained before deletion.\nWhen `zero_data_retention` is `true`, nothing is retained and `transcripts`/`audio_recordings` are omitted.\n","title":"DataRetentionPolicy"},"Agent":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the agent."},"name":{"type":"string","description":"The name of the agent."},"phone_number":{"type":["string","null"],"description":"The phone number that the agent uses to accept calls. `null` if the agent is not associated with a phone number, in which can the agent can be used via WebSockets. This field is deprecated. Use `phone_numbers` instead.","deprecated":true},"phone_numbers":{"type":"array","items":{"type":"string"},"description":"Array of phone numbers that the agent uses to accept phone calls."},"project":{"$ref":"#/components/schemas/AgentProject","description":"The project the agent belongs to."},"timezone":{"type":"string","description":"The timezone of the agent. Used to format system variables like `{{system_time}}`."},"voice_id":{"type":"string","description":"The voice ID of the agent."},"additional_voice_ids":{"type":"array","items":{"type":"string"},"description":"Additional voice IDs that, together with `voice_id`, form the agent's voice set. Each conversation is assigned one voice from the set, chosen at random with equal probability."},"audio_format":{"$ref":"#/components/schemas/AgentAudioFormat","description":"The audio format of the agent. If the agent has a phone number, the audio format will be `mulaw_8000`."},"audio_speed":{"type":"number","format":"double","minimum":0.5,"maximum":1.5,"multipleOf":0.1,"description":"The audio speed of the agent. Must be a multiple of 0.1."},"background_noise_level":{"type":"number","format":"double","minimum":0,"maximum":0.25,"multipleOf":0.01,"description":"The background noise level of the agent. Must be between 0 and 1."},"background_noise":{"$ref":"#/components/schemas/AgentBackgroundNoise","description":"The background noise type. Can be \"office\", \"call-center\", \"coffee-shop\", or null."},"generate_welcome_message":{"type":"boolean","description":"When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored."},"is_welcome_message_interruptible":{"type":"boolean","description":"When `false`, the welcome message will not be interruptible by the user."},"websocket_timeout_sec":{"type":"integer","minimum":1,"maximum":300,"default":60,"description":"Number of seconds of inactivity before the conversation WebSocket is closed."},"listen_only_inbound_enabled":{"type":"boolean","description":"Play an uninterruptible welcome message on incoming calls, then transcribe the caller without responding. Silence timeout and call duration limits still apply."},"listen_only_inbound_message":{"type":["string","null"],"maxLength":1000,"description":"Welcome message for listen-only incoming calls. Can contain template variables like `{{customer_name}}`. Must be nonempty when `listen_only_inbound_enabled` is `true`. Replaces `welcome_message` for these calls, regardless of `generate_welcome_message`."},"welcome_message":{"type":["string","null"],"description":"Message to play when the conversation starts. Ignored when `generate_welcome_message` is `true`."},"system_prompt":{"type":"string","description":"Instructions for the conversation."},"template_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AgentTemplateVariables"},"description":"Template variables that the agent can use in the welcome message and the system prompt."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/AgentToolsItems"},"description":"List of tools available to the agent."},"built_in_tool_configs":{"$ref":"#/components/schemas/BuiltInToolConfigs","description":"Configuration overrides for built-in tools, keyed by built-in tool ID."},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"},"description":"Tasks for the agent to complete during the conversation."},"generate_no_input_poke_text":{"type":"boolean","default":false,"description":"Whether to have the no-input poke text be generated by AI."},"no_input_poke_sec":{"type":["integer","null"],"minimum":1,"maximum":120,"description":"Number of seconds of silence before sending a poke message. `null` disables the poke message."},"no_input_poke_text":{"type":"string","description":"The message to send after the specified silence. Ignored when generate_no_input_poke_text is true."},"no_input_end_conversation_sec":{"type":"integer","minimum":30,"maximum":600,"description":"Seconds of silence before ending the conversation."},"default_language":{"$ref":"#/components/schemas/LanguageCode","description":"ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language."},"additional_languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageCode"},"description":"Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `\"auto\"`, a maximum of 2 additional languages is allowed."},"languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageCode"},"default":["en"],"description":"Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead.","deprecated":true},"multilingual_mode":{"$ref":"#/components/schemas/AgentMultilingualMode","description":"If `\"auto\"`, each user audio is automatically identified for the language to respond in. If `\"request\"`, user must request to change language (recommended). If `\"initial\"` the first turn user audio determines the language for the rest of the conversation."},"push_to_talk":{"type":"boolean","default":false,"description":"Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false."},"intelligence_level":{"$ref":"#/components/schemas/AgentIntelligenceLevel","description":"The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency."},"model":{"$ref":"#/components/schemas/AgentModel","description":"The Phonic speech-to-speech model to generate with. Omit it to use the current default model."},"phonic_model":{"$ref":"#/components/schemas/AgentPhonicModel","description":"The Phonic speech-to-speech model to generate with. This field is deprecated. Use `model` instead.","deprecated":true},"boosted_keywords":{"type":"array","items":{"type":"string"},"description":"These words, or short phrases, will be more accurately recognized by the agent."},"observability_integrations":{"type":"array","items":{"$ref":"#/components/schemas/AgentObservabilityIntegrationsItems"},"description":"Names of observability integrations enabled for the agent. Each must be one of the supported providers."},"external_storage_policy":{"type":["string","null"],"description":"Name of the external storage policy that conversation artifacts are delivered to. `null` when the agent doesn't deliver artifacts to external storage."},"pronunciation_dictionary":{"type":"array","items":{"$ref":"#/components/schemas/AgentPronunciationDictionaryItems"},"description":"Array of `{ word, pronunciation }` entries. Words must be unique."},"min_words_to_interrupt":{"type":"integer","minimum":1,"maximum":10,"default":1,"description":"Minimum number of words required to interrupt the assistant."},"configuration_endpoint":{"oneOf":[{"$ref":"#/components/schemas/AgentConfigurationEndpoint"},{"type":"null"}],"description":"When not `null`, the agent will call this endpoint to get configuration options."},"inbound_rollout":{"type":"number","format":"double","minimum":0,"maximum":1,"description":"Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Requires `phone_number` to be set when less than 1.0."},"inbound_rollout_forward_phone_number":{"type":["string","null"],"description":"E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`."},"vad_prebuffer_duration_ms":{"type":"integer","minimum":0,"maximum":2000,"default":500,"description":"Voice activity detection prebuffer duration in milliseconds."},"vad_min_speech_duration_ms":{"type":"integer","minimum":0,"maximum":1500,"default":50,"description":"Minimum speech duration for voice activity detection in milliseconds."},"vad_min_silence_duration_ms":{"type":"integer","minimum":0,"maximum":1500,"default":800,"description":"Minimum silence duration for voice activity detection in milliseconds."},"vad_threshold":{"type":"number","format":"double","minimum":0.2,"maximum":0.8,"default":0.38,"description":"Voice activity detection threshold."},"enable_redaction":{"type":"boolean","default":false,"description":"When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends."},"enable_watermarking":{"type":"boolean","default":false,"description":"When `true`, an inaudible watermark is embedded in the audio the agent generates."},"slug":{"type":"string","description":"The URL-friendly slug of the agent."},"enable_assistant_backchannel":{"type":"boolean","default":false,"description":"When `true`, the assistant emits backchannel cues (e.g. \"mm-hmm\") while the user is speaking."},"assistant_backchannel_aggressiveness":{"type":"number","format":"double","minimum":0,"maximum":1,"multipleOf":0.01,"default":0.1,"description":"How aggressively the assistant backchannels, from 0 to 1."},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/AgentIntegration"},"description":"Third-party integrations enabled for the agent."},"data_retention_policy":{"$ref":"#/components/schemas/DataRetentionPolicy"},"is_disabled":{"type":"boolean","description":"When `true`, the agent is disabled. A disabled agent cannot start conversations or be updated, except to release its phone numbers."}},"required":["id","name","phone_number","phone_numbers","project","timezone","voice_id","additional_voice_ids","audio_format","audio_speed","background_noise_level","background_noise","generate_welcome_message","is_welcome_message_interruptible","listen_only_inbound_enabled","listen_only_inbound_message","welcome_message","system_prompt","template_variables","tools","built_in_tool_configs","tasks","generate_no_input_poke_text","no_input_poke_sec","no_input_poke_text","no_input_end_conversation_sec","default_language","additional_languages","multilingual_mode","push_to_talk","intelligence_level","model","boosted_keywords","pronunciation_dictionary","min_words_to_interrupt","configuration_endpoint","is_disabled"],"title":"Agent"},"agents_list_Response_200":{"type":"object","properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/Agent"}}},"required":["agents"],"title":"agents_list_Response_200"},"BasicErrorError":{"type":"object","properties":{"message":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}},"required":["message"],"title":"BasicErrorError"},"BasicError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/BasicErrorError"}},"title":"BasicError"},"CreateAgentRequestPhoneNumber":{"type":"string","enum":["assign-automatically","custom"],"description":"When set to `null`, the agent will not be associated with a phone number. When set to `\"assign-automatically\"`, the agent will be assigned a random phone number. When set to `\"custom\"`, you must provide `custom_phone_numbers`.","title":"CreateAgentRequestPhoneNumber"},"CreateAgentRequestAudioFormat":{"type":"string","enum":["pcm_44100","pcm_24000","pcm_16000","pcm_8000","mulaw_8000"],"default":"pcm_44100","description":"The audio format of the agent.","title":"CreateAgentRequestAudioFormat"},"CreateAgentRequestBackgroundNoise":{"type":"string","enum":["office","call-center","coffee-shop"],"description":"The background noise type. Can be \"office\", \"call-center\", \"coffee-shop\", or null.","title":"CreateAgentRequestBackgroundNoise"},"CreateAgentRequestTemplateVariables":{"type":"object","properties":{"default_value":{"type":"string"},"is_boosted_keyword":{"type":"boolean"}},"required":["default_value"],"title":"CreateAgentRequestTemplateVariables"},"CreateAgentRequestToolsItems0":{"type":"string","enum":["keypad_input","natural_conversation_ending","choose_not_to_respond","web_search"],"description":"Built-in tool","title":"CreateAgentRequestToolsItems0"},"CreateAgentRequestToolsItems":{"oneOf":[{"$ref":"#/components/schemas/CreateAgentRequestToolsItems0"},{"type":"string"}],"title":"CreateAgentRequestToolsItems"},"CreateAgentRequestMultilingualMode":{"type":"string","enum":["auto","request","initial"],"default":"request","description":"If `\"auto\"`, each user audio is automatically identified for the language to respond in. If `\"request\"`, user must request to change language (recommended). If `\"initial\"` the first turn user audio determines the language for the rest of the conversation.","title":"CreateAgentRequestMultilingualMode"},"CreateAgentRequestIntelligenceLevel":{"type":"string","enum":["standard","high"],"default":"standard","description":"The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency.","title":"CreateAgentRequestIntelligenceLevel"},"CreateAgentRequestModel0":{"type":"string","enum":["phonic-0.5","phonic-1"],"title":"CreateAgentRequestModel0"},"CreateAgentRequestModel":{"oneOf":[{"$ref":"#/components/schemas/CreateAgentRequestModel0"},{"type":"string"}],"description":"The Phonic speech-to-speech model to generate with. Omit it to use the current default model.","title":"CreateAgentRequestModel"},"CreateAgentRequestPhonicModel0":{"type":"string","enum":["phonic-0.5","phonic-1"],"title":"CreateAgentRequestPhonicModel0"},"CreateAgentRequestPhonicModel":{"oneOf":[{"$ref":"#/components/schemas/CreateAgentRequestPhonicModel0"},{"type":"string"}],"description":"The Phonic speech-to-speech model to generate with. This field is deprecated. Use `model` instead.","title":"CreateAgentRequestPhonicModel","deprecated":true},"CreateAgentRequestPronunciationDictionaryItems":{"type":"object","properties":{"word":{"type":"string","maxLength":30},"pronunciation":{"type":"string","maxLength":50}},"required":["word","pronunciation"],"title":"CreateAgentRequestPronunciationDictionaryItems"},"CreateAgentRequestConfigurationEndpoint":{"type":"object","properties":{"url":{"type":"string","description":"URL to call. Must be a publicly routable HTTPS URL without embedded credentials."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Object of key-value pairs."},"timeout_ms":{"type":"integer","default":3000,"description":"Timeout in milliseconds for the endpoint call."}},"required":["url"],"description":"When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options.","title":"CreateAgentRequestConfigurationEndpoint"},"CreateAgentRequestObservabilityIntegrationsItems":{"type":"string","enum":["braintrust"],"title":"CreateAgentRequestObservabilityIntegrationsItems"},"CreateAgentRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the agent. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project."},"slug":{"type":"string","description":"URL-friendly agent slug. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project."},"phone_number":{"oneOf":[{"$ref":"#/components/schemas/CreateAgentRequestPhoneNumber"},{"type":"null"}],"description":"When set to `null`, the agent will not be associated with a phone number. When set to `\"assign-automatically\"`, the agent will be assigned a random phone number. When set to `\"custom\"`, you must provide `custom_phone_numbers`."},"custom_phone_number":{"type":["string","null"],"description":"The custom phone number to use for the agent in E.164 format (e.g., +1234567890). This field is deprecated. Use `custom_phone_numbers` instead.","deprecated":true},"custom_phone_numbers":{"type":"array","items":{"type":"string"},"default":[],"description":"Array of custom phone numbers in E.164 format (e.g., [\"+1234567890\", \"+0987654321\"]). The agent will be able to receive phone calls on any of these numbers. Required when `phone_number` is set to `\"custom\"`. All phone numbers must be unique."},"timezone":{"type":"string","description":"The timezone of the agent. Used to format system variables like `{{system_time}}`."},"voice_id":{"type":"string","default":"grant","description":"The voice ID to use."},"additional_voice_ids":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Additional voice IDs that, together with `voice_id`, form the agent's voice set. Each conversation is assigned one voice from the set, chosen at random with equal probability. Must not include `voice_id` and must not contain duplicates."},"audio_format":{"$ref":"#/components/schemas/CreateAgentRequestAudioFormat","default":"pcm_44100","description":"The audio format of the agent."},"audio_speed":{"type":"number","format":"double","minimum":0.5,"maximum":1.5,"multipleOf":0.1,"default":1.2,"description":"The audio speed of the agent."},"background_noise_level":{"type":"number","format":"double","minimum":0,"maximum":0.25,"default":0,"description":"The background noise level of the agent."},"background_noise":{"$ref":"#/components/schemas/CreateAgentRequestBackgroundNoise","description":"The background noise type. Can be \"office\", \"call-center\", \"coffee-shop\", or null."},"generate_welcome_message":{"type":"boolean","default":false,"description":"When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored."},"is_welcome_message_interruptible":{"type":"boolean","default":true,"description":"When `false`, the welcome message will not be interruptible by the user."},"websocket_timeout_sec":{"type":"integer","minimum":1,"maximum":300,"default":60,"description":"Number of seconds of inactivity before the conversation WebSocket is closed."},"listen_only_inbound_enabled":{"type":"boolean","default":false,"description":"Play an uninterruptible welcome message on incoming calls, then transcribe the caller without responding. Silence timeout and call duration limits still apply."},"listen_only_inbound_message":{"type":["string","null"],"maxLength":1000,"description":"Welcome message for listen-only incoming calls. Can contain template variables like `{{customer_name}}`. Must be nonempty when `listen_only_inbound_enabled` is `true`. Replaces `welcome_message` for these calls, regardless of `generate_welcome_message`."},"welcome_message":{"type":["string","null"],"description":"Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`."},"system_prompt":{"type":"string","default":"Today's date is {{system_date}} {{system_year}}. The day of week is {{system_weekday}}. The current time is {{system_time}}. The timezone for the current conversation is {{system_conversation_timezone}}. Use it only for date/time calculations. Do not infer location from it.","description":"Instructions for the conversation. Can contain template variables like `{{subject}}`."},"template_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CreateAgentRequestTemplateVariables"},"description":"Variables that can be used in the welcome message and the system prompt."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/CreateAgentRequestToolsItems"},"description":"Array of built-in or custom tool names to use."},"built_in_tool_configs":{"$ref":"#/components/schemas/BuiltInToolConfigs","description":"Configuration overrides for built-in tools, keyed by built-in tool ID. Built-in tools not listed here use their default configuration."},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"},"description":"Array of task objects with `name` and `description` fields."},"generate_no_input_poke_text":{"type":"boolean","default":false,"description":"Whether to have the no-input poke text be generated by AI."},"no_input_poke_sec":{"type":["integer","null"],"minimum":1,"maximum":120,"description":"Number of seconds of silence before sending a poke message. `null` disables the poke message."},"no_input_poke_text":{"type":"string","default":"Are you still there?","description":"The message to send after the specified silence. Ignored when generate_no_input_poke_text is true."},"no_input_end_conversation_sec":{"type":"integer","minimum":30,"maximum":600,"default":180,"description":"Seconds of silence before ending the conversation."},"enable_assistant_backchannel":{"type":"boolean","default":false,"description":"When `true`, the assistant will produce backchannel responses (e.g. \"mm-hmm\") while the user is speaking."},"assistant_backchannel_aggressiveness":{"type":"number","format":"double","minimum":0,"maximum":1,"multipleOf":0.01,"default":0.1,"description":"How aggressively the assistant produces backchannel responses. Only relevant when `enable_assistant_backchannel` is `true`."},"data_retention_policy":{"$ref":"#/components/schemas/DataRetentionPolicy","description":"Controls how long transcripts and audio recordings are retained before deletion."},"default_language":{"$ref":"#/components/schemas/LanguageCode","description":"ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language."},"additional_languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageCode"},"default":[],"description":"Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `\"auto\"`, a maximum of 2 additional languages is allowed."},"languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageCode"},"default":["en"],"description":"Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead.","deprecated":true},"multilingual_mode":{"$ref":"#/components/schemas/CreateAgentRequestMultilingualMode","default":"request","description":"If `\"auto\"`, each user audio is automatically identified for the language to respond in. If `\"request\"`, user must request to change language (recommended). If `\"initial\"` the first turn user audio determines the language for the rest of the conversation."},"push_to_talk":{"type":"boolean","default":false,"description":"Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false."},"intelligence_level":{"$ref":"#/components/schemas/CreateAgentRequestIntelligenceLevel","default":"standard","description":"The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency."},"model":{"$ref":"#/components/schemas/CreateAgentRequestModel","description":"The Phonic speech-to-speech model to generate with. Omit it to use the current default model."},"phonic_model":{"$ref":"#/components/schemas/CreateAgentRequestPhonicModel","description":"The Phonic speech-to-speech model to generate with. This field is deprecated. Use `model` instead.","deprecated":true},"boosted_keywords":{"type":"array","items":{"type":"string"},"description":"These words, or short phrases, will be more accurately recognized by the agent."},"pronunciation_dictionary":{"type":"array","items":{"$ref":"#/components/schemas/CreateAgentRequestPronunciationDictionaryItems"},"description":"Array of `{ word, pronunciation }` entries. Words must be unique."},"min_words_to_interrupt":{"type":"integer","minimum":1,"maximum":10,"default":1,"description":"Minimum number of words required to interrupt the assistant."},"configuration_endpoint":{"oneOf":[{"$ref":"#/components/schemas/CreateAgentRequestConfigurationEndpoint"},{"type":"null"}],"description":"When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options."},"inbound_rollout":{"type":"number","format":"double","minimum":0,"maximum":1,"default":1,"description":"Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Defaults to `1.0`. Requires `phone_number` to be set when less than 1.0."},"inbound_rollout_forward_phone_number":{"type":["string","null"],"description":"E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. Defaults to `null`."},"vad_prebuffer_duration_ms":{"type":"integer","minimum":0,"maximum":2000,"default":500,"description":"Voice activity detection prebuffer duration in milliseconds."},"vad_min_speech_duration_ms":{"type":"integer","minimum":0,"maximum":1500,"default":50,"description":"Minimum speech duration for voice activity detection in milliseconds."},"vad_min_silence_duration_ms":{"type":"integer","minimum":0,"maximum":1500,"default":800,"description":"Minimum silence duration for voice activity detection in milliseconds."},"vad_threshold":{"type":"number","format":"double","minimum":0.2,"maximum":0.8,"default":0.38,"description":"Voice activity detection threshold."},"enable_redaction":{"type":"boolean","default":false,"description":"When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends."},"enable_watermarking":{"type":"boolean","default":false,"description":"When `true`, an inaudible watermark is embedded in the audio the agent generates."},"mcp_server_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"Array of MCP server IDs to make available to the agent."},"observability_integrations":{"type":"array","items":{"$ref":"#/components/schemas/CreateAgentRequestObservabilityIntegrationsItems"},"default":[],"description":"Names of observability integrations to enable for the agent. Each must be one of the supported providers."},"external_storage_policy":{"type":["string","null"],"description":"Name of an external storage policy in the same project that conversation artifacts are delivered to. Requires zero data retention and cannot be combined with `enable_redaction`."}},"required":["name"],"title":"CreateAgentRequest"},"agents_create_Response_201":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the created agent."},"name":{"type":"string","description":"The name of the created agent."}},"required":["id","name"],"title":"agents_create_Response_201"},"ValidationErrorError":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}},"required":["message"],"title":"ValidationErrorError"},"ValidationError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ValidationErrorError"},"param_errors":{"type":"object","additionalProperties":{"type":"string"},"description":"Parameter-specific validation errors"}},"required":["error","param_errors"],"title":"ValidationError"},"OutboundNumberPool":{"type":"object","properties":{"active":{"type":"array","items":{"type":"string"},"description":"E.164 formatted phone numbers available for outbound calls."},"blocked":{"type":"array","items":{"type":"string"},"description":"E.164 formatted phone numbers that are blocked from being used."}},"required":["active","blocked"],"description":"Pool of phone numbers used for outbound calls.","title":"OutboundNumberPool"},"UpsertAgentRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the agent. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project."},"slug":{"type":"string","description":"URL-friendly agent slug. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project."},"phone_number":{"oneOf":[{"$ref":"#/components/schemas/CreateAgentRequestPhoneNumber"},{"type":"null"}],"description":"When set to `null`, the agent will not be associated with a phone number. When set to `\"assign-automatically\"`, the agent will be assigned a random phone number. When set to `\"custom\"`, you must provide `custom_phone_numbers`."},"custom_phone_number":{"type":["string","null"],"description":"The custom phone number to use for the agent in E.164 format (e.g., +1234567890). This field is deprecated. Use `custom_phone_numbers` instead.","deprecated":true},"custom_phone_numbers":{"type":"array","items":{"type":"string"},"default":[],"description":"Array of custom phone numbers in E.164 format (e.g., [\"+1234567890\", \"+0987654321\"]). The agent will be able to receive phone calls on any of these numbers. Required when `phone_number` is set to `\"custom\"`. All phone numbers must be unique."},"timezone":{"type":"string","description":"The timezone of the agent. Used to format system variables like `{{system_time}}`."},"voice_id":{"type":"string","default":"grant","description":"The voice ID to use."},"additional_voice_ids":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Additional voice IDs that, together with `voice_id`, form the agent's voice set. Each conversation is assigned one voice from the set, chosen at random with equal probability. Must not include `voice_id` and must not contain duplicates."},"audio_format":{"$ref":"#/components/schemas/CreateAgentRequestAudioFormat","default":"pcm_44100","description":"The audio format of the agent."},"audio_speed":{"type":"number","format":"double","minimum":0.5,"maximum":1.5,"multipleOf":0.1,"default":1.2,"description":"The audio speed of the agent."},"background_noise_level":{"type":"number","format":"double","minimum":0,"maximum":0.25,"default":0,"description":"The background noise level of the agent."},"background_noise":{"$ref":"#/components/schemas/CreateAgentRequestBackgroundNoise","description":"The background noise type. Can be \"office\", \"call-center\", \"coffee-shop\", or null."},"generate_welcome_message":{"type":"boolean","default":false,"description":"When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored."},"is_welcome_message_interruptible":{"type":"boolean","default":true,"description":"When `false`, the welcome message will not be interruptible by the user."},"websocket_timeout_sec":{"type":"integer","minimum":1,"maximum":300,"default":60,"description":"Number of seconds of inactivity before the conversation WebSocket is closed."},"listen_only_inbound_enabled":{"type":"boolean","default":false,"description":"Play an uninterruptible welcome message on incoming calls, then transcribe the caller without responding. Silence timeout and call duration limits still apply."},"listen_only_inbound_message":{"type":["string","null"],"maxLength":1000,"description":"Welcome message for listen-only incoming calls. Can contain template variables like `{{customer_name}}`. Must be nonempty when `listen_only_inbound_enabled` is `true`. Replaces `welcome_message` for these calls, regardless of `generate_welcome_message`."},"welcome_message":{"type":["string","null"],"description":"Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`."},"system_prompt":{"type":"string","default":"Today's date is {{system_date}} {{system_year}}. The day of week is {{system_weekday}}. The current time is {{system_time}}. The timezone for the current conversation is {{system_conversation_timezone}}. Use it only for date/time calculations. Do not infer location from it.","description":"Instructions for the conversation. Can contain template variables like `{{subject}}`."},"template_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CreateAgentRequestTemplateVariables"},"description":"Variables that can be used in the welcome message and the system prompt."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/CreateAgentRequestToolsItems"},"description":"Array of built-in or custom tool names to use."},"built_in_tool_configs":{"$ref":"#/components/schemas/BuiltInToolConfigs","description":"Configuration overrides for built-in tools, keyed by built-in tool ID. Built-in tools not listed here use their default configuration."},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"},"description":"Array of task objects with `name` and `description` fields."},"generate_no_input_poke_text":{"type":"boolean","default":false,"description":"Whether to have the no-input poke text be generated by AI."},"no_input_poke_sec":{"type":["integer","null"],"minimum":1,"maximum":120,"description":"Number of seconds of silence before sending a poke message. `null` disables the poke message."},"no_input_poke_text":{"type":"string","default":"Are you still there?","description":"The message to send after the specified silence. Ignored when generate_no_input_poke_text is true."},"no_input_end_conversation_sec":{"type":"integer","minimum":30,"maximum":600,"default":180,"description":"Seconds of silence before ending the conversation."},"enable_assistant_backchannel":{"type":"boolean","default":false,"description":"When `true`, the assistant will produce backchannel responses (e.g. \"mm-hmm\") while the user is speaking."},"assistant_backchannel_aggressiveness":{"type":"number","format":"double","minimum":0,"maximum":1,"multipleOf":0.01,"default":0.1,"description":"How aggressively the assistant produces backchannel responses. Only relevant when `enable_assistant_backchannel` is `true`."},"data_retention_policy":{"$ref":"#/components/schemas/DataRetentionPolicy","description":"Controls how long transcripts and audio recordings are retained before deletion."},"default_language":{"$ref":"#/components/schemas/LanguageCode","description":"ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language."},"additional_languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageCode"},"default":[],"description":"Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `\"auto\"`, a maximum of 2 additional languages is allowed."},"languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageCode"},"default":["en"],"description":"Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead.","deprecated":true},"multilingual_mode":{"$ref":"#/components/schemas/CreateAgentRequestMultilingualMode","default":"request","description":"If `\"auto\"`, each user audio is automatically identified for the language to respond in. If `\"request\"`, user must request to change language (recommended). If `\"initial\"` the first turn user audio determines the language for the rest of the conversation."},"push_to_talk":{"type":"boolean","default":false,"description":"Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false."},"intelligence_level":{"$ref":"#/components/schemas/CreateAgentRequestIntelligenceLevel","default":"standard","description":"The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency."},"model":{"$ref":"#/components/schemas/CreateAgentRequestModel","description":"The Phonic speech-to-speech model to generate with. Omit it to use the current default model."},"phonic_model":{"$ref":"#/components/schemas/CreateAgentRequestPhonicModel","description":"The Phonic speech-to-speech model to generate with. This field is deprecated. Use `model` instead.","deprecated":true},"boosted_keywords":{"type":"array","items":{"type":"string"},"description":"These words, or short phrases, will be more accurately recognized by the agent."},"pronunciation_dictionary":{"type":"array","items":{"$ref":"#/components/schemas/CreateAgentRequestPronunciationDictionaryItems"},"description":"Array of `{ word, pronunciation }` entries. Words must be unique."},"min_words_to_interrupt":{"type":"integer","minimum":1,"maximum":10,"default":1,"description":"Minimum number of words required to interrupt the assistant."},"configuration_endpoint":{"oneOf":[{"$ref":"#/components/schemas/CreateAgentRequestConfigurationEndpoint"},{"type":"null"}],"description":"When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options."},"inbound_rollout":{"type":"number","format":"double","minimum":0,"maximum":1,"default":1,"description":"Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Defaults to `1.0`. Requires `phone_number` to be set when less than 1.0."},"inbound_rollout_forward_phone_number":{"type":["string","null"],"description":"E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. Defaults to `null`."},"vad_prebuffer_duration_ms":{"type":"integer","minimum":0,"maximum":2000,"default":500,"description":"Voice activity detection prebuffer duration in milliseconds."},"vad_min_speech_duration_ms":{"type":"integer","minimum":0,"maximum":1500,"default":50,"description":"Minimum speech duration for voice activity detection in milliseconds."},"vad_min_silence_duration_ms":{"type":"integer","minimum":0,"maximum":1500,"default":800,"description":"Minimum silence duration for voice activity detection in milliseconds."},"vad_threshold":{"type":"number","format":"double","minimum":0.2,"maximum":0.8,"default":0.38,"description":"Voice activity detection threshold."},"enable_redaction":{"type":"boolean","default":false,"description":"When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends."},"enable_watermarking":{"type":"boolean","default":false,"description":"When `true`, an inaudible watermark is embedded in the audio the agent generates."},"mcp_server_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"Array of MCP server IDs to make available to the agent."},"observability_integrations":{"type":"array","items":{"$ref":"#/components/schemas/CreateAgentRequestObservabilityIntegrationsItems"},"default":[],"description":"Names of observability integrations to enable for the agent. Each must be one of the supported providers."},"external_storage_policy":{"type":["string","null"],"description":"Name of an external storage policy in the same project that conversation artifacts are delivered to. Requires zero data retention and cannot be combined with `enable_redaction`."},"outbound_number_pool":{"oneOf":[{"$ref":"#/components/schemas/OutboundNumberPool"},{"type":"null"}],"description":"Pool of phone numbers used for outbound calls. Set to `null` to remove the pool."},"procedure_ids":{"type":"array","items":{"type":"string"},"description":"Array of procedure IDs associated with the agent."}},"required":["name"],"title":"UpsertAgentRequest"},"agents_upsert_Response_200":{"type":"object","properties":{"agent":{"$ref":"#/components/schemas/Agent"},"inserted":{"type":"boolean","description":"Whether the agent was inserted."},"updated":{"type":"boolean","description":"Whether the agent was updated."}},"required":["agent","inserted","updated"],"title":"agents_upsert_Response_200"},"Error":{"oneOf":[{"$ref":"#/components/schemas/BasicError"},{"$ref":"#/components/schemas/ValidationError"}],"title":"Error"},"agents_get_Response_200":{"type":"object","properties":{"agent":{"$ref":"#/components/schemas/Agent"}},"required":["agent"],"title":"agents_get_Response_200"},"agents_delete_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the agent was deleted successfully."}},"required":["success"],"title":"agents_delete_Response_200"},"UpdateAgentRequestPhoneNumber":{"type":"string","enum":["assign-automatically","custom"],"description":"When set to `null`, the agent will not be associated with a phone number anymore. When set to `\"assign-automatically\"`, the agent will be assigned a random phone number if it doesn't have one yet. If the agent already has a phone number, `\"assign-automatically\"` has no effect. When set to `\"custom\"`, you must provide `custom_phone_numbers`.","title":"UpdateAgentRequestPhoneNumber"},"UpdateAgentRequestAudioFormat":{"type":"string","enum":["pcm_44100","pcm_24000","pcm_16000","pcm_8000","mulaw_8000"],"description":"The audio format of the agent.","title":"UpdateAgentRequestAudioFormat"},"UpdateAgentRequestBackgroundNoise":{"type":"string","enum":["office","call-center","coffee-shop"],"description":"The background noise type. Can be \"office\", \"call-center\", \"coffee-shop\", or null.","title":"UpdateAgentRequestBackgroundNoise"},"UpdateAgentRequestTemplateVariables":{"type":"object","properties":{"default_value":{"type":"string"},"is_boosted_keyword":{"type":"boolean"}},"required":["default_value"],"title":"UpdateAgentRequestTemplateVariables"},"UpdateAgentRequestToolsItems0":{"type":"string","enum":["keypad_input","natural_conversation_ending","choose_not_to_respond","web_search"],"description":"Built-in tool","title":"UpdateAgentRequestToolsItems0"},"UpdateAgentRequestToolsItems":{"oneOf":[{"$ref":"#/components/schemas/UpdateAgentRequestToolsItems0"},{"type":"string"}],"title":"UpdateAgentRequestToolsItems"},"UpdateAgentRequestMultilingualMode":{"type":"string","enum":["auto","request","initial"],"default":"request","description":"If `\"auto\"`, each user audio is automatically identified for the language to respond in. If `\"request\"`, user must request to change language (recommended). If `\"initial\"` the first turn user audio determines the language for the rest of the conversation.","title":"UpdateAgentRequestMultilingualMode"},"UpdateAgentRequestIntelligenceLevel":{"type":"string","enum":["standard","high"],"default":"standard","description":"The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency.","title":"UpdateAgentRequestIntelligenceLevel"},"UpdateAgentRequestModel0":{"type":"string","enum":["phonic-0.5","phonic-1"],"title":"UpdateAgentRequestModel0"},"UpdateAgentRequestModel":{"oneOf":[{"$ref":"#/components/schemas/UpdateAgentRequestModel0"},{"type":"string"}],"description":"The Phonic speech-to-speech model to generate with. Omit it to use the current default model.","title":"UpdateAgentRequestModel"},"UpdateAgentRequestPhonicModel0":{"type":"string","enum":["phonic-0.5","phonic-1"],"title":"UpdateAgentRequestPhonicModel0"},"UpdateAgentRequestPhonicModel":{"oneOf":[{"$ref":"#/components/schemas/UpdateAgentRequestPhonicModel0"},{"type":"string"}],"description":"The Phonic speech-to-speech model to generate with. This field is deprecated. Use `model` instead.","title":"UpdateAgentRequestPhonicModel","deprecated":true},"UpdateAgentRequestPronunciationDictionaryItems":{"type":"object","properties":{"word":{"type":"string","maxLength":30},"pronunciation":{"type":"string","maxLength":50}},"required":["word","pronunciation"],"title":"UpdateAgentRequestPronunciationDictionaryItems"},"UpdateAgentRequestConfigurationEndpoint":{"type":"object","properties":{"url":{"type":"string","description":"URL to call. Must be a publicly routable HTTPS URL without embedded credentials."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Object of key-value pairs."},"timeout_ms":{"type":"integer","default":3000,"description":"Timeout in milliseconds for the endpoint call."}},"required":["url"],"description":"When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options.","title":"UpdateAgentRequestConfigurationEndpoint"},"UpdateAgentRequestObservabilityIntegrationsItems":{"type":"string","enum":["braintrust"],"title":"UpdateAgentRequestObservabilityIntegrationsItems"},"UpdateAgentRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the agent. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project."},"slug":{"type":"string","description":"URL-friendly agent slug. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project."},"phone_number":{"oneOf":[{"$ref":"#/components/schemas/UpdateAgentRequestPhoneNumber"},{"type":"null"}],"description":"When set to `null`, the agent will not be associated with a phone number anymore. When set to `\"assign-automatically\"`, the agent will be assigned a random phone number if it doesn't have one yet. If the agent already has a phone number, `\"assign-automatically\"` has no effect. When set to `\"custom\"`, you must provide `custom_phone_numbers`."},"custom_phone_number":{"type":["string","null"],"description":"The custom phone number to use for the agent in E.164 format (e.g., +1234567890). This field is deprecated. Use `custom_phone_numbers` instead.","deprecated":true},"custom_phone_numbers":{"type":"array","items":{"type":"string"},"description":"Array of custom phone numbers in E.164 format (e.g., [\"+1234567890\", \"+0987654321\"]). The agent will be able to receive phone calls on any of these numbers. Required when `phone_number` is set to `\"custom\"`. All phone numbers must be unique."},"timezone":{"type":"string","description":"The timezone of the agent. Used to format system variables like `{{system_time}}`."},"voice_id":{"type":"string","description":"The voice ID to use."},"additional_voice_ids":{"type":"array","items":{"type":"string","minLength":1},"description":"Additional voice IDs that, together with `voice_id`, form the agent's voice set. Each conversation is assigned one voice from the set, chosen at random with equal probability. Must not include `voice_id` and must not contain duplicates."},"audio_format":{"$ref":"#/components/schemas/UpdateAgentRequestAudioFormat","description":"The audio format of the agent."},"audio_speed":{"type":"number","format":"double","minimum":0.5,"maximum":1.5,"multipleOf":0.1,"description":"The audio speed of the agent."},"background_noise_level":{"type":"number","format":"double","minimum":0,"maximum":0.25,"description":"The background noise level of the agent."},"background_noise":{"$ref":"#/components/schemas/UpdateAgentRequestBackgroundNoise","description":"The background noise type. Can be \"office\", \"call-center\", \"coffee-shop\", or null."},"generate_welcome_message":{"type":"boolean","description":"When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored."},"is_welcome_message_interruptible":{"type":"boolean","description":"When `false`, the welcome message will not be interruptible by the user."},"websocket_timeout_sec":{"type":"integer","minimum":1,"maximum":300,"description":"Number of seconds of inactivity before the conversation WebSocket is closed."},"listen_only_inbound_enabled":{"type":"boolean","description":"Play an uninterruptible welcome message on incoming calls, then transcribe the caller without responding. Silence timeout and call duration limits still apply."},"listen_only_inbound_message":{"type":["string","null"],"maxLength":1000,"description":"Welcome message for listen-only incoming calls. Can contain template variables like `{{customer_name}}`. Must be nonempty when `listen_only_inbound_enabled` is `true`. Replaces `welcome_message` for these calls, regardless of `generate_welcome_message`."},"welcome_message":{"type":"string","description":"Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`."},"system_prompt":{"type":"string","description":"Instructions for the conversation. Can contain template variables like `{{subject}}`."},"template_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/UpdateAgentRequestTemplateVariables"},"description":"Variables that can be used in the welcome message and the system prompt."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/UpdateAgentRequestToolsItems"},"description":"Array of built-in or custom tool names to use."},"built_in_tool_configs":{"$ref":"#/components/schemas/BuiltInToolConfigs","description":"Configuration overrides for built-in tools, keyed by built-in tool ID. Built-in tools not listed here use their default configuration."},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"},"description":"Array of task objects with `name` and `description` fields."},"generate_no_input_poke_text":{"type":"boolean","default":false,"description":"Whether to have the no-input poke text be generated by AI."},"no_input_poke_sec":{"type":["integer","null"],"minimum":1,"maximum":120,"description":"Number of seconds of silence before sending a poke message. `null` disables the poke message."},"no_input_poke_text":{"type":"string","description":"The message to send after the specified silence. Ignored when generate_no_input_poke_text is true."},"no_input_end_conversation_sec":{"type":"integer","minimum":30,"maximum":600,"default":180,"description":"Seconds of silence before ending the conversation."},"enable_assistant_backchannel":{"type":"boolean","default":false,"description":"When `true`, the assistant will produce backchannel responses (e.g. \"mm-hmm\") while the user is speaking."},"assistant_backchannel_aggressiveness":{"type":"number","format":"double","minimum":0,"maximum":1,"multipleOf":0.01,"default":0.1,"description":"How aggressively the assistant produces backchannel responses. Only relevant when `enable_assistant_backchannel` is `true`."},"data_retention_policy":{"$ref":"#/components/schemas/DataRetentionPolicy","description":"Controls how long transcripts and audio recordings are retained before deletion."},"outbound_number_pool":{"oneOf":[{"$ref":"#/components/schemas/OutboundNumberPool"},{"type":"null"}],"description":"Pool of phone numbers used for outbound calls. Set to `null` to remove the pool."},"procedure_ids":{"type":"array","items":{"type":"string"},"description":"Array of procedure IDs associated with the agent."},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/AgentIntegration"},"description":"Array of third-party integrations enabled for the agent."},"default_language":{"$ref":"#/components/schemas/LanguageCode","description":"ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language."},"additional_languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageCode"},"default":[],"description":"Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `\"auto\"`, a maximum of 2 additional languages is allowed."},"languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageCode"},"default":["en"],"description":"Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead.","deprecated":true},"multilingual_mode":{"$ref":"#/components/schemas/UpdateAgentRequestMultilingualMode","default":"request","description":"If `\"auto\"`, each user audio is automatically identified for the language to respond in. If `\"request\"`, user must request to change language (recommended). If `\"initial\"` the first turn user audio determines the language for the rest of the conversation."},"push_to_talk":{"type":"boolean","default":false,"description":"Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false."},"intelligence_level":{"$ref":"#/components/schemas/UpdateAgentRequestIntelligenceLevel","default":"standard","description":"The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency."},"model":{"$ref":"#/components/schemas/UpdateAgentRequestModel","description":"The Phonic speech-to-speech model to generate with. Omit it to use the current default model."},"phonic_model":{"$ref":"#/components/schemas/UpdateAgentRequestPhonicModel","description":"The Phonic speech-to-speech model to generate with. This field is deprecated. Use `model` instead.","deprecated":true},"boosted_keywords":{"type":"array","items":{"type":"string"},"description":"These words, or short phrases, will be more accurately recognized by the agent."},"pronunciation_dictionary":{"type":"array","items":{"$ref":"#/components/schemas/UpdateAgentRequestPronunciationDictionaryItems"},"description":"Array of `{ word, pronunciation }` entries. Words must be unique."},"min_words_to_interrupt":{"type":"integer","minimum":1,"maximum":10,"default":1,"description":"Minimum number of words required to interrupt the assistant."},"configuration_endpoint":{"oneOf":[{"$ref":"#/components/schemas/UpdateAgentRequestConfigurationEndpoint"},{"type":"null"}],"description":"When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options."},"inbound_rollout":{"type":"number","format":"double","minimum":0,"maximum":1,"description":"Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Requires `phone_number` to be set when less than 1.0."},"inbound_rollout_forward_phone_number":{"type":["string","null"],"description":"E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`."},"vad_prebuffer_duration_ms":{"type":"integer","minimum":0,"maximum":2000,"description":"Voice activity detection prebuffer duration in milliseconds."},"vad_min_speech_duration_ms":{"type":"integer","minimum":0,"maximum":1500,"description":"Minimum speech duration for voice activity detection in milliseconds."},"vad_min_silence_duration_ms":{"type":"integer","minimum":0,"maximum":1500,"description":"Minimum silence duration for voice activity detection in milliseconds."},"vad_threshold":{"type":"number","format":"double","minimum":0.2,"maximum":0.8,"description":"Voice activity detection threshold."},"enable_redaction":{"type":"boolean","description":"When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends."},"enable_watermarking":{"type":"boolean","description":"When `true`, an inaudible watermark is embedded in the audio the agent generates."},"mcp_server_ids":{"type":"array","items":{"type":"string"},"description":"Array of MCP server IDs to make available to the agent."},"observability_integrations":{"type":"array","items":{"$ref":"#/components/schemas/UpdateAgentRequestObservabilityIntegrationsItems"},"description":"Names of observability integrations to enable for the agent. Each must be one of the supported providers."},"external_storage_policy":{"type":["string","null"],"description":"Name of an external storage policy in the same project that conversation artifacts are delivered to. Set to `null` to stop delivering artifacts. Requires zero data retention and cannot be combined with `enable_redaction`."}},"title":"UpdateAgentRequest"},"agents_update_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the agent was updated successfully."},"version_number":{"type":"integer","description":"The version number of the agent after the update."},"agent":{"$ref":"#/components/schemas/Agent","description":"The updated agent."}},"required":["success","version_number","agent"],"title":"agents_update_Response_200"},"AgentsNameOrIdCustomPhoneNumbersPostRequestBodyContentApplicationJsonSchemaConfigurationEndpoint":{"type":"object","properties":{"url":{"type":"string","description":"URL to call. Must be a publicly routable HTTPS URL without embedded credentials."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Object of key-value pairs."},"timeout_ms":{"type":"integer","default":3000,"description":"Timeout in milliseconds for the endpoint call."}},"required":["url"],"description":"When not `null`, the agent will call this endpoint to get configuration options for calls on this phone number.","title":"AgentsNameOrIdCustomPhoneNumbersPostRequestBodyContentApplicationJsonSchemaConfigurationEndpoint"},"AgentsNameOrIdCustomPhoneNumbersPostRequestBodyContentApplicationJsonSchemaSipTransport":{"type":"string","enum":["auto","udp","tcp","tls"],"default":"auto","description":"SIP signaling transport used for calls on this phone number. The SIP address must not carry a `;transport=` parameter; set it here instead.","title":"AgentsNameOrIdCustomPhoneNumbersPostRequestBodyContentApplicationJsonSchemaSipTransport"},"AgentsNameOrIdCustomPhoneNumbersPostRequestBodyContentApplicationJsonSchemaSipMediaEncryption":{"type":"string","enum":["disabled","allowed","required"],"default":"disabled","description":"Whether media (SRTP) encryption is used on calls on this phone number.","title":"AgentsNameOrIdCustomPhoneNumbersPostRequestBodyContentApplicationJsonSchemaSipMediaEncryption"},"AgentsNameOrIdCustomPhoneNumbersPostRequestBodyContentApplicationJsonSchemaSip":{"type":"object","properties":{"transport":{"$ref":"#/components/schemas/AgentsNameOrIdCustomPhoneNumbersPostRequestBodyContentApplicationJsonSchemaSipTransport","default":"auto","description":"SIP signaling transport used for calls on this phone number. The SIP address must not carry a `;transport=` parameter; set it here instead."},"media_encryption":{"$ref":"#/components/schemas/AgentsNameOrIdCustomPhoneNumbersPostRequestBodyContentApplicationJsonSchemaSipMediaEncryption","default":"disabled","description":"Whether media (SRTP) encryption is used on calls on this phone number."}},"description":"SIP trunk settings for this phone number, applied to both its inbound trunk and the trunk created for each outbound call. Set at creation; remove and re-add the number to change them.","title":"AgentsNameOrIdCustomPhoneNumbersPostRequestBodyContentApplicationJsonSchemaSip"},"agents_add_custom_phone_number_Response_200":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"title":"agents_add_custom_phone_number_Response_200"},"agents_delete_custom_phone_number_Response_200":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"title":"agents_delete_custom_phone_number_Response_200"},"AgentsNameOrIdPhoneNumbersPatchRequestBodyContentApplicationJsonSchemaConfigurationEndpoint":{"type":"object","properties":{"url":{"type":"string","description":"URL to call. Must be a publicly routable HTTPS URL without embedded credentials."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Object of key-value pairs."},"timeout_ms":{"type":"integer","default":3000,"description":"Timeout in milliseconds for the endpoint call."}},"required":["url"],"description":"When not `null`, the agent will call this endpoint to get configuration options for calls on this phone number.","title":"AgentsNameOrIdPhoneNumbersPatchRequestBodyContentApplicationJsonSchemaConfigurationEndpoint"},"agents_update_phone_number_Response_200":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"title":"agents_update_phone_number_Response_200"},"agents_disable_Response_200":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"title":"agents_disable_Response_200"},"agents_enable_Response_200":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"title":"agents_enable_Response_200"},"ToolProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"title":"ToolProject"},"ToolType":{"type":"string","enum":["custom_context","custom_webhook","custom_websocket","built_in_transfer_to_phone_number","built_in_transfer_to_agent","built_in_natural_conversation_ending","built_in_keypad_input","built_in_choose_not_to_respond"],"description":"The type of tool.","title":"ToolType"},"ToolExecutionMode":{"type":"string","enum":["sync","async"],"description":"Mode of operation - sync waits for response, async continues without waiting.","title":"ToolExecutionMode"},"ToolParameterType":{"type":"string","enum":["string","integer","number","boolean","array","enum"],"description":"The parameter type.","title":"ToolParameterType"},"ToolParameterItemType":{"type":"string","enum":["string","integer","number","boolean"],"description":"Required only when type is \"array\". The type of items in the array.","title":"ToolParameterItemType"},"ToolParameterLocation":{"type":"string","enum":["request_body","query_string","url_path"],"description":"Only applicable for `custom_webhook` tools. Specifies where the parameter should be sent in the webhook request.\n- For GET webhooks: defaults to `\"query_string\"` and `\"request_body\"` is not allowed.\n- For POST webhooks: required, can be `\"request_body\"`, `\"query_string\"`, or `\"url_path\"`.\n- `\"url_path\"` fills a matching `{name}` placeholder in the endpoint URL's path or query (GET and POST). The parameter must be required, and every placeholder in `endpoint_url` must have a matching `url_path` parameter.\n- Not allowed for `custom_websocket`, `built_in_transfer_to_phone_number`, or `built_in_transfer_to_agent` tools.\nWhen switching a webhook tool's `endpoint_method` from POST to GET, its request body parameters must be re-sent with `\"query_string\"` locations.\n","title":"ToolParameterLocation"},"ToolParameter":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ToolParameterType","description":"The parameter type."},"item_type":{"$ref":"#/components/schemas/ToolParameterItemType","description":"Required only when type is \"array\". The type of items in the array."},"enum_values":{"type":"array","items":{"type":"string"},"description":"Required only when type is \"enum\". The fixed set of allowed string values for the parameter. Values must be unique and non-empty."},"name":{"type":"string","description":"The parameter name."},"description":{"type":"string","description":"Description of the parameter."},"is_required":{"type":"boolean","description":"Whether the parameter is required."},"location":{"$ref":"#/components/schemas/ToolParameterLocation","description":"Only applicable for `custom_webhook` tools. Specifies where the parameter should be sent in the webhook request.\n- For GET webhooks: defaults to `\"query_string\"` and `\"request_body\"` is not allowed.\n- For POST webhooks: required, can be `\"request_body\"`, `\"query_string\"`, or `\"url_path\"`.\n- `\"url_path\"` fills a matching `{name}` placeholder in the endpoint URL's path or query (GET and POST). The parameter must be required, and every placeholder in `endpoint_url` must have a matching `url_path` parameter.\n- Not allowed for `custom_websocket`, `built_in_transfer_to_phone_number`, or `built_in_transfer_to_agent` tools.\nWhen switching a webhook tool's `endpoint_method` from POST to GET, its request body parameters must be re-sent with `\"query_string\"` locations.\n"}},"required":["type","name","description","is_required"],"title":"ToolParameter"},"ToolParameters0":{"type":"array","items":{"$ref":"#/components/schemas/ToolParameter"},"title":"ToolParameters0"},"ToolParametersJsonSchema":{"type":"object","properties":{"type":{"type":"string","enum":["object"]},"properties":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The tool's top-level parameters, as a map from parameter name to its JSON Schema."},"required":{"type":"array","items":{"type":"string"},"default":[],"description":"The names of the required top-level parameters. Every name must be defined in `properties`."},"additionalProperties":{"type":"boolean","enum":[false],"default":false,"description":"Must be `false`. Tool parameter schemas do not allow properties beyond the ones declared."}},"required":["type","properties"],"description":"A tool's parameters expressed as a raw JSON Schema object, for parameters that the flat `ToolParameter` list cannot express: nested objects, arrays of objects, `anyOf` variants, `null`, and non-string enums.\nEach entry in `properties` is a JSON Schema value supporting `type` (`\"string\"`, `\"integer\"`, `\"number\"`, `\"boolean\"`, `\"null\"`, `\"array\"`, `\"object\"`), `description`, `enum` (string parameters only), `items` (for arrays), `properties`/`required`/`additionalProperties` (for objects) and `anyOf`. Values may be nested up to 5 levels deep.\nParameter names cannot be any of the reserved names that Phonic injects into every tool call: `call_info`, `conversation_id`, `from_phone_number`, `pre_tool_text`, `to_phone_number`, `twilio_call_sid`.\nFor `custom_webhook` tools, parameter placement is supplied separately in `parameter_locations` rather than inline on the schema.\n","title":"ToolParametersJsonSchema"},"ToolParameters":{"oneOf":[{"$ref":"#/components/schemas/ToolParameters0"},{"$ref":"#/components/schemas/ToolParametersJsonSchema"}],"description":"The tool's parameters, returned in the same form they were defined in.\nTools defined with a flat list of parameters return an array of parameter definitions (with `location` included inline for `custom_webhook` tools).\nTools defined with a raw JSON Schema object return that object; for `custom_webhook` tools the parameter placement is then returned separately in `parameter_locations`.\n","title":"ToolParameters"},"ToolParameterLocations":{"type":"string","enum":["request_body","query_string","url_path"],"title":"ToolParameterLocations"},"ToolEndpointMethod":{"type":"string","enum":["GET","POST"],"description":"HTTP method for webhook tools.","title":"ToolEndpointMethod"},"TransferSip":{"type":"object","properties":{"uri":{"type":"string","description":"The SIP URI to transfer calls to, in the form `sip:user@host[:port][;transport=udp|tcp|tls]` or `sips:user@host[:port]`. `transport` is the only URI parameter allowed."},"headers":{"type":"object","additionalProperties":{"type":"string"},"default":{},"description":"Custom SIP headers to send with the transfer. Header names must start with `X-`, and values cannot contain line breaks. Headers require a bridged transfer (keep_listening true, or DTMF set), since a SIP REFER transfer can't carry them."}},"required":["uri"],"description":"A SIP destination to transfer calls to, used instead of a phone number.","title":"TransferSip"},"ToolOnTransferNoAnswer":{"type":"string","enum":["return_to_assistant","keep_retrying"],"default":"return_to_assistant","description":"What happens when the transfer target does not answer before the ring timeout. `return_to_assistant` hands control back to the agent. `keep_retrying` keeps the caller on the line and re-dials the target until it answers, the caller hangs up, or a retry cap is reached, then returns to the assistant. `keep_retrying` only applies to bridged transfers (keep_listening true). Only returned for built_in_transfer_to_phone_number tools.","title":"ToolOnTransferNoAnswer"},"ToolSpeechBeforeToolCall":{"type":"string","enum":["required","optional","suppressed"],"description":"For built_in_natural_conversation_ending and built_in_keypad_input tools. Whether the agent must speak before calling the tool (\"required\"), the model decides (\"optional\"), or the agent must stay silent (\"suppressed\"). Not used by other tool types.","title":"ToolSpeechBeforeToolCall"},"Tool":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool."},"name":{"type":"string","description":"The name of the tool."},"description":{"type":"string","description":"Description of what the tool does."},"project":{"$ref":"#/components/schemas/ToolProject"},"type":{"$ref":"#/components/schemas/ToolType","description":"The type of tool."},"execution_mode":{"$ref":"#/components/schemas/ToolExecutionMode","description":"Mode of operation - sync waits for response, async continues without waiting."},"parameters":{"$ref":"#/components/schemas/ToolParameters","description":"The tool's parameters, returned in the same form they were defined in.\nTools defined with a flat list of parameters return an array of parameter definitions (with `location` included inline for `custom_webhook` tools).\nTools defined with a raw JSON Schema object return that object; for `custom_webhook` tools the parameter placement is then returned separately in `parameter_locations`.\n"},"parameter_locations":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ToolParameterLocations"},"description":"Where each top-level parameter is sent in the webhook request, as a map from parameter name to location.\nOnly returned for `custom_webhook` tools whose `parameters` are a raw JSON Schema object. Tools defined with a flat list of parameters carry `location` inline on each parameter instead.\n"},"endpoint_method":{"$ref":"#/components/schemas/ToolEndpointMethod","description":"HTTP method for webhook tools."},"endpoint_url":{"type":"string","format":"uri","description":"URL for webhook tools."},"endpoint_headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Headers for webhook tools."},"endpoint_timeout_ms":{"type":"integer","description":"Timeout in milliseconds for webhook tools."},"tool_call_output_timeout_ms":{"type":"integer","description":"Timeout in milliseconds for WebSocket tool responses."},"phone_number":{"type":["string","null"],"description":"The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number."},"sip":{"oneOf":[{"$ref":"#/components/schemas/TransferSip"},{"type":"null"}],"description":"The SIP destination to transfer calls to. Mutually exclusive with phone_number; null when transferring to a phone number. Only returned for built_in_transfer_to_phone_number tools."},"dtmf":{"type":["string","null"],"description":"DTMF digits to send after the transfer connects (e.g., \"1234\"). Defaults to null. Ignored when dynamic_dtmf is true."},"post_transfer_message":{"type":["string","null"],"description":"Fixed line the agent speaks into the bridged call once the transfer connects. Defaults to null, meaning no announcement. Always null when keep_listening is false. Only returned for built_in_transfer_to_phone_number tools."},"dynamic_dtmf":{"type":"boolean","default":false,"description":"When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored."},"use_agent_phone_number":{"type":"boolean","default":true,"description":"When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools."},"detect_voicemail":{"type":"boolean","default":false,"description":"When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools when use_agent_phone_number is true."},"keep_listening":{"type":"boolean","default":true,"description":"When true, Phonic bridges the transfer and stays on the call. When false, Phonic drops out once the transfer connects, so use_agent_phone_number and detect_voicemail are false and post_transfer_message is null. Without DTMF the call is handed off with a SIP REFER; with DTMF (static or dynamic) Phonic bridges the call to send the digits and then detaches, leaving the two parties connected. Only returned for built_in_transfer_to_phone_number tools."},"on_transfer_no_answer":{"$ref":"#/components/schemas/ToolOnTransferNoAnswer","default":"return_to_assistant","description":"What happens when the transfer target does not answer before the ring timeout. `return_to_assistant` hands control back to the agent. `keep_retrying` keeps the caller on the line and re-dials the target until it answers, the caller hangs up, or a retry cap is reached, then returns to the assistant. `keep_retrying` only applies to bridged transfers (keep_listening true). Only returned for built_in_transfer_to_phone_number tools."},"agents_to_transfer_to":{"type":"array","items":{"type":"string"},"description":"Array of agent names that the LLM can choose from when transferring. Required for built_in_transfer_to_agent tools."},"require_speech_before_tool_call":{"type":"boolean","default":false,"description":"When true, forces the agent to speak before executing the tool."},"speech_before_tool_call":{"$ref":"#/components/schemas/ToolSpeechBeforeToolCall","description":"For built_in_natural_conversation_ending and built_in_keypad_input tools. Whether the agent must speak before calling the tool (\"required\"), the model decides (\"optional\"), or the agent must stay silent (\"suppressed\"). Not used by other tool types."},"respond_after_sec":{"type":["number","null"],"format":"double","minimum":1,"maximum":30,"description":"For built_in_choose_not_to_respond tools. Number of seconds to wait after the tool fires before the agent speaks a follow-up if the user stays silent. When null, the agent stays silent (default). Not used by other tool types."},"wait_for_speech_before_tool_call":{"type":"boolean","default":false,"description":"If true, the agent will wait to finish speaking before executing the tool. This is only available for custom_webhook and custom_websocket tools."},"forbid_speech_after_tool_call":{"type":"boolean","default":false,"description":"When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools."},"forbid_tool_call_after_speech":{"type":"boolean","default":false,"description":"When true, forbids the agent from calling the tool right after it has spoken. Available for custom_webhook and custom_websocket tools."},"allow_tool_chaining":{"type":"boolean","default":true,"description":"When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools."},"wait_for_response":{"type":"boolean","default":false,"description":"The agent doesn't typically wait for the response of async tools. When true, makes the agent wait for a response, not call other tools and inform the user of the result. Only returned for custom_webhook and custom_websocket tools."},"uninterruptible":{"type":"boolean","description":"Whether caller speech is prevented from interrupting the assistant while the tool call is running. Returned for custom_webhook, custom_websocket, and built_in_transfer_to_phone_number tools. Phone transfers without a stored setting default to true."},"can_run_during_user_speech":{"type":"boolean","default":false,"description":"When true, the agent can call the tool while the user is still speaking. Only returned for custom_webhook, custom_websocket, and custom_context tools."},"context":{"type":"string","description":"The static context returned to the agent. Only present for custom_context tools."}},"required":["id","name","description","project","type","parameters"],"title":"Tool"},"tools_list_Response_200":{"type":"object","properties":{"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"}}},"required":["tools"],"title":"tools_list_Response_200"},"CreateToolRequestType":{"type":"string","enum":["custom_context","custom_webhook","custom_websocket","built_in_transfer_to_phone_number","built_in_transfer_to_agent","built_in_natural_conversation_ending","built_in_keypad_input","built_in_choose_not_to_respond"],"description":"The type of tool.","title":"CreateToolRequestType"},"CreateToolRequestExecutionMode":{"type":"string","enum":["sync","async"],"description":"Mode of operation.","title":"CreateToolRequestExecutionMode"},"CreateToolRequestParameters0":{"type":"array","items":{"$ref":"#/components/schemas/ToolParameter"},"title":"CreateToolRequestParameters0"},"CreateToolRequestParameters":{"oneOf":[{"$ref":"#/components/schemas/CreateToolRequestParameters0"},{"$ref":"#/components/schemas/ToolParametersJsonSchema"}],"description":"The tool's parameters, either as a flat array of parameter definitions or as a raw JSON Schema object (use the object form for nested parameters).\nWhen sending an array:\n- For `custom_webhook` tools with POST method, each parameter must include a `location` field.\n- For `custom_webhook` tools with GET method, `location` defaults to `\"query_string\"` if not specified.\n- For `custom_websocket`, `built_in_transfer_to_phone_number`, and `built_in_transfer_to_agent` tools, `location` must not be specified.\n- `parameter_locations` must not be sent, since placement is carried inline on each parameter.\nWhen sending a JSON Schema object, `custom_webhook` tools supply parameter placement in `parameter_locations` instead.\nTools that cannot have parameters (`custom_context` and the `built_in_*` types) must send an empty array or omit the field.\n","title":"CreateToolRequestParameters"},"CreateToolRequestParameterLocations":{"type":"string","enum":["request_body","query_string","url_path"],"title":"CreateToolRequestParameterLocations"},"CreateToolRequestEndpointMethod":{"type":"string","enum":["GET","POST"],"description":"Required for webhook tools. HTTP method for the webhook endpoint.","title":"CreateToolRequestEndpointMethod"},"CreateToolRequestOnTransferNoAnswer":{"type":"string","enum":["return_to_assistant","keep_retrying"],"default":"return_to_assistant","description":"What happens when the transfer target does not answer before the ring timeout. `return_to_assistant` hands control back to the agent. `keep_retrying` keeps the caller on the line and re-dials the target until it answers, the caller hangs up, or a retry cap is reached, then returns to the assistant. `keep_retrying` only applies to bridged transfers, so it cannot be used when keep_listening is false. Only available for built_in_transfer_to_phone_number tools.","title":"CreateToolRequestOnTransferNoAnswer"},"CreateToolRequestSpeechBeforeToolCall":{"type":"string","enum":["required","optional","suppressed"],"description":"For built_in_natural_conversation_ending and built_in_keypad_input tools. Whether the agent must speak before calling the tool (\"required\"), the model decides (\"optional\"), or the agent must stay silent (\"suppressed\"). Not used by other tool types.","title":"CreateToolRequestSpeechBeforeToolCall"},"CreateToolRequest":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9_]+$","description":"The name of the tool. Must be snake_case and unique within the organization."},"description":{"type":"string","description":"A description of what the tool does."},"type":{"$ref":"#/components/schemas/CreateToolRequestType","description":"The type of tool."},"execution_mode":{"$ref":"#/components/schemas/CreateToolRequestExecutionMode","description":"Mode of operation."},"parameters":{"$ref":"#/components/schemas/CreateToolRequestParameters","default":[],"description":"The tool's parameters, either as a flat array of parameter definitions or as a raw JSON Schema object (use the object form for nested parameters).\nWhen sending an array:\n- For `custom_webhook` tools with POST method, each parameter must include a `location` field.\n- For `custom_webhook` tools with GET method, `location` defaults to `\"query_string\"` if not specified.\n- For `custom_websocket`, `built_in_transfer_to_phone_number`, and `built_in_transfer_to_agent` tools, `location` must not be specified.\n- `parameter_locations` must not be sent, since placement is carried inline on each parameter.\nWhen sending a JSON Schema object, `custom_webhook` tools supply parameter placement in `parameter_locations` instead.\nTools that cannot have parameters (`custom_context` and the `built_in_*` types) must send an empty array or omit the field.\n"},"parameter_locations":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CreateToolRequestParameterLocations"},"description":"Where each top-level parameter is sent in the webhook request, as a map from parameter name to location. Only for `custom_webhook` tools whose `parameters` are a raw JSON Schema object.\nEvery key must name a top-level parameter. For POST webhooks, every parameter needs an entry. For GET webhooks, entries default to `\"query_string\"` and `\"request_body\"` is not allowed.\n"},"endpoint_method":{"$ref":"#/components/schemas/CreateToolRequestEndpointMethod","description":"Required for webhook tools. HTTP method for the webhook endpoint."},"endpoint_url":{"type":"string","format":"uri","description":"Required for webhook tools. Must be a publicly routable HTTPS URL without embedded credentials. May contain `{name}` placeholders in the path or query (not the scheme, host, port, or credentials), each filled by a required parameter with location `\"url_path\"`."},"endpoint_headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional headers for webhook tools."},"endpoint_timeout_ms":{"type":"integer","minimum":1000,"maximum":180000,"default":5000,"description":"Timeout for webhook tools."},"tool_call_output_timeout_ms":{"type":"integer","minimum":1000,"maximum":180000,"default":5000,"description":"Timeout for WebSocket tool responses."},"phone_number":{"type":["string","null"],"description":"The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number."},"sip":{"oneOf":[{"$ref":"#/components/schemas/TransferSip"},{"type":"null"}],"description":"A SIP destination to transfer calls to instead of a phone number. Cannot be set together with phone_number, so phone_number must be null when sip is set. Only available for built_in_transfer_to_phone_number tools."},"dtmf":{"type":["string","null"],"description":"DTMF digits to send after the transfer connects (e.g., \"1234\"). Defaults to null. Ignored when dynamic_dtmf is true."},"post_transfer_message":{"type":["string","null"],"description":"Fixed line the agent speaks into the bridged call once the transfer connects. Defaults to null, meaning no announcement. Must be null when keep_listening is false, since Phonic drops out of the call and has no line to speak it on. Only available for built_in_transfer_to_phone_number tools."},"dynamic_dtmf":{"type":"boolean","default":false,"description":"When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored."},"use_agent_phone_number":{"type":"boolean","default":true,"description":"When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools."},"detect_voicemail":{"type":"boolean","default":false,"description":"When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools when use_agent_phone_number is true."},"keep_listening":{"type":"boolean","description":"When true, Phonic bridges the transfer and stays on the call. When false, Phonic drops out once the transfer connects, which requires use_agent_phone_number and detect_voicemail to be false and post_transfer_message to be null. Without DTMF the call is handed off with a SIP REFER; with DTMF (static or dynamic) Phonic bridges the call to send the digits and then detaches, leaving the two parties connected. Only available for built_in_transfer_to_phone_number tools. Defaults to the value of use_agent_phone_number."},"on_transfer_no_answer":{"$ref":"#/components/schemas/CreateToolRequestOnTransferNoAnswer","default":"return_to_assistant","description":"What happens when the transfer target does not answer before the ring timeout. `return_to_assistant` hands control back to the agent. `keep_retrying` keeps the caller on the line and re-dials the target until it answers, the caller hangs up, or a retry cap is reached, then returns to the assistant. `keep_retrying` only applies to bridged transfers, so it cannot be used when keep_listening is false. Only available for built_in_transfer_to_phone_number tools."},"agents_to_transfer_to":{"type":"array","items":{"type":"string"},"description":"Array of agent names that the LLM can choose from when transferring. Required for built_in_transfer_to_agent tools. All agents must exist in the same project as the tool."},"require_speech_before_tool_call":{"type":"boolean","default":false,"description":"When true, forces the agent to speak before executing the tool."},"speech_before_tool_call":{"$ref":"#/components/schemas/CreateToolRequestSpeechBeforeToolCall","description":"For built_in_natural_conversation_ending and built_in_keypad_input tools. Whether the agent must speak before calling the tool (\"required\"), the model decides (\"optional\"), or the agent must stay silent (\"suppressed\"). Not used by other tool types."},"respond_after_sec":{"type":["number","null"],"format":"double","minimum":1,"maximum":30,"description":"For built_in_choose_not_to_respond tools. Number of seconds to wait after the tool fires before the agent speaks a follow-up if the user stays silent. When null, the agent stays silent (default). Not used by other tool types."},"wait_for_speech_before_tool_call":{"type":"boolean","default":false,"description":"If true, the agent will wait to finish speaking before executing the tool. This is only available for custom_webhook and custom_websocket tools."},"forbid_speech_after_tool_call":{"type":"boolean","default":false,"description":"When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools."},"forbid_tool_call_after_speech":{"type":"boolean","default":false,"description":"When true, forbids the agent from calling the tool right after it has spoken. Available for custom_webhook and custom_websocket tools."},"allow_tool_chaining":{"type":"boolean","default":true,"description":"When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools."},"wait_for_response":{"type":"boolean","default":false,"description":"The agent doesn't typically wait for the response of async tools. When true, makes the agent wait for a response, not call other tools and inform the user of the result. Only available for async custom_webhook and custom_websocket tools, and cannot be combined with allow_tool_chaining set to true."},"uninterruptible":{"type":"boolean","description":"When true, caller speech cannot interrupt the assistant while the tool call is running. Available for sync custom_webhook, sync custom_websocket, and built_in_transfer_to_phone_number tools. Defaults to true for phone transfers and false for custom tools. Prevents caller interruptions during the transfer, including the preceding announcement once protection is active."},"can_run_during_user_speech":{"type":"boolean","default":false,"description":"When true, the agent can call the tool while the user is still speaking. Only available for custom_webhook, custom_websocket, and custom_context tools. Setting it to true requires the feature to be enabled for your organization; contact Phonic to get access."},"context":{"type":"string","description":"The static context returned to the agent. Required for custom_context tools."}},"required":["name","description","type","execution_mode"],"title":"CreateToolRequest"},"tools_create_Response_201":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the created tool."},"name":{"type":"string","description":"The name of the created tool."}},"required":["id","name"],"title":"tools_create_Response_201"},"tools_get_Response_200":{"type":"object","properties":{"tool":{"$ref":"#/components/schemas/Tool"}},"required":["tool"],"title":"tools_get_Response_200"},"tools_delete_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the tool was deleted successfully."}},"required":["success"],"title":"tools_delete_Response_200"},"UpdateToolRequestExecutionMode":{"type":"string","enum":["sync","async"],"description":"Mode of operation.","title":"UpdateToolRequestExecutionMode"},"UpdateToolRequestParameters0":{"type":"array","items":{"$ref":"#/components/schemas/ToolParameter"},"title":"UpdateToolRequestParameters0"},"UpdateToolRequestParameters":{"oneOf":[{"$ref":"#/components/schemas/UpdateToolRequestParameters0"},{"$ref":"#/components/schemas/ToolParametersJsonSchema"}],"description":"The tool's parameters, either as a flat array of parameter definitions or as a raw JSON Schema object (use the object form for nested parameters). Replaces the tool's existing parameters, including the form they are stored in.\nFor `custom_webhook` tools: when sending an array, `location` is required for POST and defaults to `\"query_string\"` for GET, and `parameter_locations` must not be sent; when sending a JSON Schema object, placement is supplied in `parameter_locations`.\nFor `custom_websocket`, `built_in_transfer_to_phone_number`, and `built_in_transfer_to_agent` tools: `location` must not be specified.\n","title":"UpdateToolRequestParameters"},"UpdateToolRequestParameterLocations":{"type":"string","enum":["request_body","query_string","url_path"],"title":"UpdateToolRequestParameterLocations"},"UpdateToolRequestEndpointMethod":{"type":"string","enum":["GET","POST"],"description":"HTTP method for webhook tools. When switching from POST to GET, a tool with request body parameters must also send new `parameters` (or `parameter_locations`) placing them in the query string.","title":"UpdateToolRequestEndpointMethod"},"UpdateToolRequestOnTransferNoAnswer":{"type":"string","enum":["return_to_assistant","keep_retrying"],"description":"What happens when the transfer target does not answer before the ring timeout. `return_to_assistant` hands control back to the agent. `keep_retrying` keeps the caller on the line and re-dials the target until it answers, the caller hangs up, or a retry cap is reached, then returns to the assistant. `keep_retrying` only applies to bridged transfers, so it cannot be used when the resulting keep_listening is false. Only applicable to built_in_transfer_to_phone_number tools.","title":"UpdateToolRequestOnTransferNoAnswer"},"UpdateToolRequestSpeechBeforeToolCall":{"type":"string","enum":["required","optional","suppressed"],"description":"For built_in_natural_conversation_ending and built_in_keypad_input tools. Whether the agent must speak before calling the tool (\"required\"), the model decides (\"optional\"), or the agent must stay silent (\"suppressed\"). Not used by other tool types.","title":"UpdateToolRequestSpeechBeforeToolCall"},"UpdateToolRequest":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9_]+$","description":"The name of the tool. Must be snake_case and unique within the organization."},"description":{"type":"string","description":"A description of what the tool does."},"execution_mode":{"$ref":"#/components/schemas/UpdateToolRequestExecutionMode","description":"Mode of operation."},"context":{"type":"string","description":"The static context returned to the agent. Only applicable to custom_context tools."},"parameters":{"$ref":"#/components/schemas/UpdateToolRequestParameters","description":"The tool's parameters, either as a flat array of parameter definitions or as a raw JSON Schema object (use the object form for nested parameters). Replaces the tool's existing parameters, including the form they are stored in.\nFor `custom_webhook` tools: when sending an array, `location` is required for POST and defaults to `\"query_string\"` for GET, and `parameter_locations` must not be sent; when sending a JSON Schema object, placement is supplied in `parameter_locations`.\nFor `custom_websocket`, `built_in_transfer_to_phone_number`, and `built_in_transfer_to_agent` tools: `location` must not be specified.\n"},"parameter_locations":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/UpdateToolRequestParameterLocations"},"description":"Where each top-level parameter is sent in the webhook request, as a map from parameter name to location. Only for `custom_webhook` tools whose `parameters` are a raw JSON Schema object.\nCan be sent on its own to move existing parameters without resending `parameters`; entries are merged over the tool's current placement, so parameters left out keep where they were.\nEvery key must name a top-level parameter. For POST webhooks, every parameter needs a placement. For GET webhooks, unplaced parameters default to `\"query_string\"` and `\"request_body\"` is not allowed.\n"},"endpoint_method":{"$ref":"#/components/schemas/UpdateToolRequestEndpointMethod","description":"HTTP method for webhook tools. When switching from POST to GET, a tool with request body parameters must also send new `parameters` (or `parameter_locations`) placing them in the query string."},"endpoint_url":{"type":"string","format":"uri","description":"URL for webhook tools. Must be a publicly routable HTTPS URL without embedded credentials. May contain `{name}` placeholders in the path or query (not the scheme, host, port, or credentials), each filled by a required parameter with location `\"url_path\"`."},"endpoint_headers":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Headers for webhook tools. Set to null to clear existing headers."},"endpoint_timeout_ms":{"type":"integer","minimum":1000,"maximum":180000},"tool_call_output_timeout_ms":{"type":"integer","minimum":1000,"maximum":180000},"phone_number":{"type":["string","null"],"description":"The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number."},"sip":{"oneOf":[{"$ref":"#/components/schemas/TransferSip"},{"type":"null"}],"description":"A SIP destination to transfer calls to instead of a phone number. Setting sip clears phone_number, and setting phone_number clears sip; they cannot both be set in one update. Can be set to null to remove the SIP destination. Only applicable to built_in_transfer_to_phone_number tools."},"dtmf":{"type":["string","null"],"description":"DTMF digits to send after the transfer connects (e.g., \"1234\"). Can be set to null to remove DTMF. Ignored when dynamic_dtmf is true."},"post_transfer_message":{"type":["string","null"],"description":"Fixed line the agent speaks into the bridged call once the transfer connects. Can be set to null to remove the announcement. Must be null when the resulting keep_listening is false. Only applicable to built_in_transfer_to_phone_number tools."},"dynamic_dtmf":{"type":"boolean","description":"When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored."},"use_agent_phone_number":{"type":"boolean","description":"When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools."},"detect_voicemail":{"type":"boolean","description":"When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools when use_agent_phone_number is true."},"keep_listening":{"type":"boolean","description":"When true, Phonic bridges the transfer and stays on the call. When false, Phonic drops out once the transfer connects, which requires the resulting use_agent_phone_number and detect_voicemail to be false and post_transfer_message to be null. Without DTMF the call is handed off with a SIP REFER; with DTMF (static or dynamic) Phonic bridges the call to send the digits and then detaches, leaving the two parties connected. Only applicable to built_in_transfer_to_phone_number tools."},"on_transfer_no_answer":{"$ref":"#/components/schemas/UpdateToolRequestOnTransferNoAnswer","description":"What happens when the transfer target does not answer before the ring timeout. `return_to_assistant` hands control back to the agent. `keep_retrying` keeps the caller on the line and re-dials the target until it answers, the caller hangs up, or a retry cap is reached, then returns to the assistant. `keep_retrying` only applies to bridged transfers, so it cannot be used when the resulting keep_listening is false. Only applicable to built_in_transfer_to_phone_number tools."},"agents_to_transfer_to":{"type":"array","items":{"type":"string"},"description":"Array of agent names that the LLM can choose from when transferring. All agents must exist in the same project as the tool."},"require_speech_before_tool_call":{"type":"boolean","description":"When true, forces the agent to speak before executing the tool."},"speech_before_tool_call":{"$ref":"#/components/schemas/UpdateToolRequestSpeechBeforeToolCall","description":"For built_in_natural_conversation_ending and built_in_keypad_input tools. Whether the agent must speak before calling the tool (\"required\"), the model decides (\"optional\"), or the agent must stay silent (\"suppressed\"). Not used by other tool types."},"respond_after_sec":{"type":["number","null"],"format":"double","minimum":1,"maximum":30,"description":"For built_in_choose_not_to_respond tools. Number of seconds to wait after the tool fires before the agent speaks a follow-up if the user stays silent. When null, the agent stays silent (default). Not used by other tool types."},"wait_for_speech_before_tool_call":{"type":"boolean","description":"If true, the agent will wait to finish speaking before executing the tool. This is only available for custom_webhook and custom_websocket tools."},"forbid_speech_after_tool_call":{"type":"boolean","description":"When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools."},"forbid_tool_call_after_speech":{"type":"boolean","description":"When true, forbids the agent from calling the tool right after it has spoken. Available for custom_webhook and custom_websocket tools."},"allow_tool_chaining":{"type":"boolean","description":"When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools."},"wait_for_response":{"type":"boolean","description":"The agent doesn't typically wait for the response of async tools. When true, makes the agent wait for a response, not call other tools and inform the user of the result. Only available for async custom_webhook and custom_websocket tools, and cannot be combined with allow_tool_chaining set to true."},"uninterruptible":{"type":"boolean","description":"When true, caller speech cannot interrupt the assistant while the tool call is running. Available for sync custom_webhook, sync custom_websocket, and built_in_transfer_to_phone_number tools. Omitted updates preserve the current setting. Prevents caller interruptions during the transfer, including the preceding announcement once protection is active."},"can_run_during_user_speech":{"type":"boolean","description":"When true, the agent can call the tool while the user is still speaking. Only available for custom_webhook, custom_websocket, and custom_context tools. Setting it to true requires the feature to be enabled for your organization; contact Phonic to get access."}},"description":"Fields to update on the tool. All fields are optional; omitted fields are left unchanged.\nA tool's `type` cannot be changed after creation.\n","title":"UpdateToolRequest"},"tools_update_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the tool was updated successfully."}},"required":["success"],"title":"tools_update_Response_200"},"ExternalStoragePolicyAddressingStyle":{"type":"string","enum":["auto","virtual","path"],"default":"auto","description":"How bucket names are addressed in requests to the endpoint.","title":"ExternalStoragePolicyAddressingStyle"},"ExternalStoragePolicy":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the external storage policy."},"name":{"type":"string","description":"The name of the external storage policy. Agents reference the policy by this name."},"endpoint_url":{"type":"string","description":"The S3-compatible endpoint URL that artifacts are uploaded to."},"bucket":{"type":"string","description":"The bucket that artifacts are uploaded to."},"region":{"type":["string","null"],"description":"The region of the bucket. `null` when the endpoint doesn't require a region."},"key_prefix":{"type":["string","null"],"description":"Prefix prepended to every object key. `null` when objects are written at the bucket root."},"addressing_style":{"$ref":"#/components/schemas/ExternalStoragePolicyAddressingStyle","description":"How bucket names are addressed in requests to the endpoint."},"agent_count":{"type":"integer","description":"Number of agents currently referencing this external storage policy."}},"required":["id","name","endpoint_url","bucket","region","key_prefix","addressing_style","agent_count"],"description":"An S3-compatible destination that conversation artifacts are delivered to.","title":"ExternalStoragePolicy"},"external_storage_policies_list_Response_200":{"type":"object","properties":{"external_storage_policies":{"type":"array","items":{"$ref":"#/components/schemas/ExternalStoragePolicy"}}},"required":["external_storage_policies"],"title":"external_storage_policies_list_Response_200"},"CreateExternalStoragePolicyRequestAddressingStyle":{"type":"string","enum":["auto","virtual","path"],"default":"auto","description":"How bucket names are addressed in requests to the endpoint.","title":"CreateExternalStoragePolicyRequestAddressingStyle"},"CreateExternalStoragePolicyRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the external storage policy. Must be snake_case, start with a lowercase letter and be unique within the project."},"endpoint_url":{"type":"string","description":"The S3-compatible endpoint URL that artifacts are uploaded to. Must be a publicly routable HTTPS URL without embedded credentials."},"bucket":{"type":"string","description":"The bucket that artifacts are uploaded to."},"region":{"type":["string","null"],"description":"The region of the bucket. Set to `null` when the endpoint doesn't require a region."},"key_prefix":{"type":["string","null"],"description":"Prefix prepended to every object key."},"addressing_style":{"$ref":"#/components/schemas/CreateExternalStoragePolicyRequestAddressingStyle","default":"auto","description":"How bucket names are addressed in requests to the endpoint."},"access_key_id":{"type":"string","description":"Access key ID used to authenticate with the endpoint. Stored encrypted and never returned."},"secret_access_key":{"type":"string","description":"Secret access key used to authenticate with the endpoint. Stored encrypted and never returned."}},"required":["name","endpoint_url","bucket","access_key_id","secret_access_key"],"title":"CreateExternalStoragePolicyRequest"},"external_storage_policies_create_Response_201":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the created external storage policy."},"name":{"type":"string","description":"The name of the created external storage policy."}},"required":["id","name"],"title":"external_storage_policies_create_Response_201"},"external_storage_policies_get_Response_200":{"type":"object","properties":{"external_storage_policy":{"$ref":"#/components/schemas/ExternalStoragePolicy"}},"required":["external_storage_policy"],"title":"external_storage_policies_get_Response_200"},"external_storage_policies_delete_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the external storage policy was deleted successfully."}},"required":["success"],"title":"external_storage_policies_delete_Response_200"},"UpdateExternalStoragePolicyRequestAddressingStyle":{"type":"string","enum":["auto","virtual","path"],"description":"How bucket names are addressed in requests to the endpoint.","title":"UpdateExternalStoragePolicyRequestAddressingStyle"},"UpdateExternalStoragePolicyRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the external storage policy. Must be snake_case, start with a lowercase letter and be unique within the project."},"endpoint_url":{"type":"string","description":"The S3-compatible endpoint URL that artifacts are uploaded to. Must be a publicly routable HTTPS URL without embedded credentials."},"bucket":{"type":"string","description":"The bucket that artifacts are uploaded to."},"region":{"type":["string","null"],"description":"The region of the bucket. Set to `null` when the endpoint doesn't require a region."},"key_prefix":{"type":["string","null"],"description":"Prefix prepended to every object key."},"addressing_style":{"$ref":"#/components/schemas/UpdateExternalStoragePolicyRequestAddressingStyle","description":"How bucket names are addressed in requests to the endpoint."},"access_key_id":{"type":"string","description":"Access key ID used to authenticate with the endpoint. Must be provided together with `secret_access_key`."},"secret_access_key":{"type":"string","description":"Secret access key used to authenticate with the endpoint. Must be provided together with `access_key_id`."}},"description":"Only the provided fields are updated. `access_key_id` and `secret_access_key` must be provided together.","title":"UpdateExternalStoragePolicyRequest"},"external_storage_policies_update_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the external storage policy was updated successfully."}},"required":["success"],"title":"external_storage_policies_update_Response_200"},"ExtractionFieldType":{"type":"string","enum":["string","int","float","bool","string[]","int[]","float[]","bool[]"],"description":"The field type.","title":"ExtractionFieldType"},"ExtractionField":{"type":"object","properties":{"name":{"type":"string","description":"The field name."},"type":{"$ref":"#/components/schemas/ExtractionFieldType","description":"The field type."},"description":{"type":["string","null"],"description":"Description of the field. May be null, but the property must be present."}},"required":["name","type","description"],"title":"ExtractionField"},"ExtractionSchema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the extraction schema."},"name":{"type":"string","description":"The name of the extraction schema."},"prompt":{"type":"string","description":"Instructions for how to extract data from conversations."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionField"},"description":"Array of field definitions specifying what data to extract."}},"required":["id","name","prompt","fields"],"title":"ExtractionSchema"},"extraction_schemas_list_Response_200":{"type":"object","properties":{"extraction_schemas":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionSchema"}}},"required":["extraction_schemas"],"title":"extraction_schemas_list_Response_200"},"CreateExtractionSchemaRequest":{"type":"object","properties":{"name":{"type":"string","description":"A name for the extraction schema."},"prompt":{"type":"string","description":"Instructions for how to extract data from conversations."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionField"},"description":"Array of field definitions."}},"required":["name","prompt","fields"],"title":"CreateExtractionSchemaRequest"},"extraction_schemas_create_Response_201":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the created extraction schema."},"name":{"type":"string","description":"The name of the created extraction schema."}},"required":["id","name"],"title":"extraction_schemas_create_Response_201"},"extraction_schemas_get_Response_200":{"type":"object","properties":{"extraction_schema":{"$ref":"#/components/schemas/ExtractionSchema"}},"required":["extraction_schema"],"title":"extraction_schemas_get_Response_200"},"extraction_schemas_delete_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the extraction schema was deleted successfully."}},"required":["success"],"title":"extraction_schemas_delete_Response_200"},"UpdateExtractionSchemaRequest":{"type":"object","properties":{"name":{"type":"string","description":"A name for the extraction schema."},"prompt":{"type":"string","description":"Instructions for how to extract data from conversations."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionField"},"description":"Array of field definitions."}},"title":"UpdateExtractionSchemaRequest"},"extraction_schemas_update_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the extraction schema was updated successfully."}},"required":["success"],"title":"extraction_schemas_update_Response_200"},"VoicesGetParametersModel":{"type":"string","enum":["merritt"],"title":"VoicesGetParametersModel"},"Voice":{"type":"object","properties":{"id":{"type":"string","description":"The voice ID."},"name":{"type":"string","description":"The voice name."},"description":{"type":["string","null"],"description":"The voice description."},"audio_url":{"type":"string","format":"uri","description":"Presigned URL to the voice sample audio file. Expires in 7 days."}},"required":["id","name","description","audio_url"],"title":"Voice"},"voices_list_Response_200":{"type":"object","properties":{"voices":{"type":"array","items":{"$ref":"#/components/schemas/Voice"}}},"required":["voices"],"title":"voices_list_Response_200"},"voices_get_Response_200":{"type":"object","properties":{"voice":{"$ref":"#/components/schemas/Voice"}},"required":["voice"],"title":"voices_get_Response_200"},"StreamTtsRequestModel":{"type":"string","enum":["merritt"],"default":"merritt","description":"The TTS model to use.","title":"StreamTtsRequestModel"},"StreamTtsRequestOutputFormat":{"type":"string","enum":["pcm_44100","pcm_24000","pcm_16000","pcm_8000","mulaw_8000"],"default":"pcm_44100","description":"The audio format to stream.","title":"StreamTtsRequestOutputFormat"},"StreamTtsRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"description":"The text to convert to speech."},"model":{"$ref":"#/components/schemas/StreamTtsRequestModel","default":"merritt","description":"The TTS model to use."},"speed":{"type":"number","format":"double","minimum":0.5,"maximum":1.5,"default":1.2,"description":"The speech speed."},"voice_id":{"type":"string","default":"sabrina","description":"The voice ID to use."},"output_format":{"$ref":"#/components/schemas/StreamTtsRequestOutputFormat","default":"pcm_44100","description":"The audio format to stream."},"languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageCode"},"default":[],"description":"Candidate languages for synthesis. An empty array defaults to English, one language\nselects it directly, and multiple languages let Phonic detect among those candidates.\n"}},"required":["text"],"title":"StreamTtsRequest"},"TtsResponse":{"type":"object","properties":{"audio":{"type":"string","description":"The generated speech, base64-encoded in the requested `output_format`."}},"required":["audio"],"title":"TtsResponse"},"workspace_get_Response_200":{"type":"object","properties":{"active_conversations":{"type":"integer","minimum":0,"description":"Number of conversations currently in progress for this workspace."},"max_active_conversations":{"type":"integer","minimum":0,"description":"Maximum number of concurrent conversations allowed for this workspace."},"logo_url":{"type":["string","null"],"description":"URL of the workspace logo (PNG or SVG), or null if not set."},"invite_link_allowed_domains":{"type":"array","items":{"type":"string"},"description":"Email domains allowed to join the workspace via invite link."},"ip_allowlist":{"type":"array","items":{"type":"string"},"description":"IP addresses or CIDR ranges allowed to access the workspace."}},"required":["active_conversations","max_active_conversations","logo_url","invite_link_allowed_domains","ip_allowlist"],"title":"workspace_get_Response_200"},"UpdateWorkspaceRequest":{"type":"object","properties":{"logo_url":{"type":["string","null"],"description":"URL of the workspace logo. Must be an https URL ending in .png or .svg, or null to clear it."},"invite_link_allowed_domains":{"type":"array","items":{"type":"string"},"description":"Email domains allowed to join the workspace via invite link."},"ip_allowlist":{"type":"array","items":{"type":"string"},"description":"IP addresses or CIDR ranges allowed to access the workspace."}},"title":"UpdateWorkspaceRequest"},"workspace_update_Response_200":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"title":"workspace_update_Response_200"},"CreateApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","description":"A name to identify the API key."}},"required":["name"],"title":"CreateApiKeyRequest"},"ApiKeyWithSecret":{"type":"object","properties":{"id":{"type":"string","description":"The API key ID."},"name":{"type":"string","description":"The name of the API key."},"api_key":{"type":"string","description":"The API key secret. Only returned once, when the key is created or rotated."}},"required":["id","name","api_key"],"title":"ApiKeyWithSecret"},"api_keys_delete_Response_200":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"title":"api_keys_delete_Response_200"},"UpdateApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","description":"The new name for the API key."}},"required":["name"],"title":"UpdateApiKeyRequest"},"api_keys_update_Response_200":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"title":"api_keys_update_Response_200"},"ReplayConversationItemRequest":{"type":"object","properties":{"system_prompt":{"type":"string","description":"The system prompt to use when generating replay responses. Use this to test prompt changes against this conversation turn. Omit it to replay the turn with the system prompt it originally ran with."},"num_responses":{"type":"integer","minimum":1,"maximum":200,"default":1,"description":"Number of alternative responses to generate."}},"title":"ReplayConversationItemRequest"},"ReplayToolCallTool":{"type":"object","properties":{"id":{"type":"string","description":"The tool ID."},"name":{"type":"string","description":"The tool name."}},"required":["id","name"],"title":"ReplayToolCallTool"},"ReplayToolCallEndpointMethod":{"type":"string","enum":["GET","POST"],"description":"HTTP method for webhook tool calls.","title":"ReplayToolCallEndpointMethod"},"ReplayToolCall":{"type":"object","properties":{"tool":{"$ref":"#/components/schemas/ReplayToolCallTool"},"endpoint_method":{"$ref":"#/components/schemas/ReplayToolCallEndpointMethod","description":"HTTP method for webhook tool calls."},"endpoint_url":{"type":"string","description":"URL for webhook tool calls."},"endpoint_headers":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Headers for webhook tool calls."},"query_params":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Query parameters the LLM produced for webhook tool calls."},"context":{"type":"string","description":"Context returned from custom-context tool calls."},"request_body":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Request body the LLM produced for the tool call."}},"required":["tool","request_body"],"title":"ReplayToolCall"},"ReplayConversationItemResponseResponsesItems":{"type":"object","properties":{"text":{"type":"string","description":"The text the LLM produced for this replay response."},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ReplayToolCall"},"description":"Tool calls the LLM would invoke for this replay response - note that the tools will not actually be called during replay."}},"required":["text","tool_calls"],"title":"ReplayConversationItemResponseResponsesItems"},"ReplayConversationItemResponse":{"type":"object","properties":{"responses":{"type":"array","items":{"$ref":"#/components/schemas/ReplayConversationItemResponseResponsesItems"},"description":"Alternative responses generated for the conversation item."}},"required":["responses"],"title":"ReplayConversationItemResponse"},"ConversationsGetParametersAudioContainer":{"type":"string","enum":["wav.gz","wav"],"default":"wav.gz","title":"ConversationsGetParametersAudioContainer"},"ConversationAgent":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the agent."},"name":{"type":"string","description":"The name of the agent."},"is_deleted":{"type":"boolean","description":"Whether the agent has been deleted."}},"required":["id","name","is_deleted"],"description":"The agent associated with the conversation.","title":"ConversationAgent"},"ConversationProject":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the project."},"name":{"type":"string","description":"The name of the project."}},"required":["id","name"],"description":"The project associated with the conversation.","title":"ConversationProject"},"ConversationOrigin":{"type":"string","enum":["web","web-playground","web-demo","direct","livekit-agents-py","livekit-agents-js","sdk-py","sdk-js","inbound","telephony-inbound","outbound","telephony-outbound","replay"],"description":"The origin of the conversation.","title":"ConversationOrigin"},"ConversationModel0":{"type":"string","enum":["phonic-0.5","phonic-1"],"title":"ConversationModel0"},"ConversationModel":{"oneOf":[{"$ref":"#/components/schemas/ConversationModel0"},{"type":"string"}],"description":"The Phonic speech-to-speech model used for the conversation.","title":"ConversationModel"},"ConversationBackgroundNoise":{"type":"string","enum":["office","call-center","coffee-shop"],"description":"The background noise type used in the conversation.","title":"ConversationBackgroundNoise"},"ConversationEndedBy":{"type":"string","enum":["user","user_canceled","user_validation_failed","assistant","assistant_silence_limit_reached","configuration_endpoint_timed_out","configuration_endpoint_error","configuration_endpoint_invalid_response","error"],"description":"Who or what ended the conversation.","title":"ConversationEndedBy"},"ConversationPronunciationDictionaryItems":{"type":"object","properties":{"word":{"type":"string","maxLength":30},"pronunciation":{"type":"string","maxLength":50}},"required":["word","pronunciation"],"title":"ConversationPronunciationDictionaryItems"},"ConversationMultilingualMode":{"type":"string","enum":["auto","request","initial"],"default":"request","description":"If `\"auto\"`, each user audio is automatically identified for the language to respond in. If `\"request\"`, user must request to change language (recommended). If `\"initial\"` the first turn user audio determines the language for the rest of the conversation.","title":"ConversationMultilingualMode"},"ConversationIntelligenceLevel":{"type":"string","enum":["standard","high"],"description":"The intelligence level used for the conversation.","title":"ConversationIntelligenceLevel"},"ConversationPhonicModel0":{"type":"string","enum":["phonic-0.5","phonic-1"],"title":"ConversationPhonicModel0"},"ConversationPhonicModel":{"oneOf":[{"$ref":"#/components/schemas/ConversationPhonicModel0"},{"type":"string"}],"description":"The Phonic speech-to-speech model used for the conversation. This field is deprecated. Use `model` instead.","title":"ConversationPhonicModel","deprecated":true},"ConversationItemRole":{"type":"string","enum":["user","assistant"],"description":"Who spoke in this turn.","title":"ConversationItemRole"},"ConversationItemToolCallsItemsTool":{"type":"object","properties":{"id":{"type":"string","description":"The tool ID."},"name":{"type":"string","description":"The tool name."}},"required":["id","name"],"title":"ConversationItemToolCallsItemsTool"},"ConversationItemToolCallsItemsRequestBody":{"oneOf":[{"type":"object","additionalProperties":{"description":"Any type"}},{"type":"array","items":{"description":"Any type"}},{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"}],"description":"The request body sent to the tool. Can be any JSON-serializable value.","title":"ConversationItemToolCallsItemsRequestBody"},"ConversationItemToolCallsItems":{"type":"object","properties":{"id":{"type":"string","description":"The tool call ID."},"tool":{"$ref":"#/components/schemas/ConversationItemToolCallsItemsTool"},"integration":{"type":["string","null"],"description":"The integration associated with the tool, if any."},"endpoint_method":{"type":["string","null"],"description":"HTTP method for webhook tool calls."},"endpoint_url":{"type":["string","null"],"description":"URL for webhook tool calls, as called (with any `url_path` placeholders filled in)."},"endpoint_headers":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Headers for webhook tool calls."},"endpoint_timeout_ms":{"type":["number","null"],"format":"double","description":"Timeout in milliseconds for webhook tool calls."},"endpoint_called_at":{"type":["string","null"],"format":"date-time","description":"When the webhook endpoint was called (null on error)."},"query_params":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Query parameters for webhook tool calls (null on error or when no params)."},"response_status_code":{"type":["number","null"],"format":"double","description":"HTTP response status code for webhook tool calls (null on error)."},"tool_call_output_timeout_ms":{"type":["number","null"],"format":"double","description":"Timeout in milliseconds for websocket tool calls."},"request_body":{"oneOf":[{"$ref":"#/components/schemas/ConversationItemToolCallsItemsRequestBody"},{"type":"null"}],"description":"The request body sent to the tool. Can be any JSON-serializable value."},"response_body":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"The response body received from the tool."},"timed_out":{"type":["boolean","null"],"description":"Whether the tool call timed out."},"error_message":{"type":["string","null"],"description":"Error message if the tool call failed."}},"required":["id","tool","request_body","response_body","timed_out","error_message"],"title":"ConversationItemToolCallsItems"},"ConversationItem":{"type":"object","properties":{"id":{"type":"string","description":"The conversation item ID."},"item_idx":{"type":"integer","description":"Index of the item in the conversation."},"role":{"$ref":"#/components/schemas/ConversationItemRole","description":"Who spoke in this turn."},"live_transcript":{"type":["string","null"],"description":"Live transcript of this turn. `null` when the turn has been redacted."},"post_call_transcript":{"type":["string","null"],"description":"Post-call processed transcript."},"redacted_transcript":{"type":["string","null"],"description":"The redacted transcript of this turn. `null` when the turn is not redacted."},"duration_ms":{"type":"number","format":"double","description":"Duration of this turn in milliseconds."},"started_at":{"type":"string","format":"date-time","description":"When this turn started."},"voice_id":{"type":"string","description":"Voice ID used (assistant only)."},"audio_speed":{"type":"number","format":"double","minimum":0.5,"maximum":1.5,"description":"Audio speed used (assistant only)."},"system_prompt":{"type":"string","description":"System prompt used for this assistant turn.","deprecated":true},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ConversationItemToolCallsItems"},"description":"Tool calls made during this turn. Tool calls made while the user is still speaking are attached to the user's turn."}},"required":["id","item_idx","role","live_transcript","post_call_transcript","duration_ms","started_at","tool_calls"],"title":"ConversationItem"},"ConversationCallInfo":{"type":"object","properties":{"from_phone_number":{"type":"string","description":"Caller phone number in E.164 format. `\"anonymous\"` for inbound calls whose caller withheld their number."},"to_phone_number":{"type":"string","description":"Callee phone number in E.164 format."},"twilio_call_sid":{"type":"string","description":"Twilio Call SID. Only present for user SIP trunking calls."}},"required":["from_phone_number","to_phone_number"],"description":"Phone call metadata. `null` for non-phone call conversations.","title":"ConversationCallInfo"},"ConversationAnalysis":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the conversation analysis."},"latencies_ms":{"type":"array","items":{"type":"number","format":"double"},"description":"Latencies between turns in milliseconds."},"interruptions_count":{"type":"integer","description":"Number of interruptions in the conversation."}},"required":["id","latencies_ms","interruptions_count"],"title":"ConversationAnalysis"},"ConversationDeletionInfo":{"type":"object","properties":{"transcripts_deleted_at":{"type":["string","null"],"format":"date-time","description":"When the transcripts were deleted. `null` if not deleted."},"audio_recordings_deleted_at":{"type":["string","null"],"format":"date-time","description":"When the audio recordings were deleted. `null` if not deleted."}},"required":["transcripts_deleted_at","audio_recordings_deleted_at"],"description":"Information about when transcripts and audio recordings are or were scheduled to be deleted.","title":"ConversationDeletionInfo"},"Conversation":{"type":"object","properties":{"id":{"type":"string","description":"The conversation ID."},"agent":{"oneOf":[{"$ref":"#/components/schemas/ConversationAgent"},{"type":"null"}],"description":"The agent associated with the conversation."},"workspace":{"type":"string","description":"The organization/workspace name."},"project":{"$ref":"#/components/schemas/ConversationProject","description":"The project associated with the conversation."},"external_id":{"type":["string","null"],"description":"External ID for conversation tracking."},"origin":{"$ref":"#/components/schemas/ConversationOrigin","description":"The origin of the conversation."},"model":{"$ref":"#/components/schemas/ConversationModel","description":"The Phonic speech-to-speech model used for the conversation."},"generate_welcome_message":{"type":"boolean","description":"Will be `true` if welcome message was automatically generated."},"is_welcome_message_interruptible":{"type":"boolean","description":"When `false`, the welcome message will not be interruptible by the user."},"listen_only":{"type":"boolean","description":"Whether this conversation used listen-only mode. The resolved greeting is stored in `welcome_message`."},"welcome_message":{"type":["string","null"],"description":"Welcome message played at start. Will be `null` when `generate_welcome_message` is `true`."},"template_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Template variables used in the conversation."},"system_prompt":{"type":["string","null"],"description":"System prompt used in the conversation."},"input_format":{"type":"string","description":"Audio input format."},"output_format":{"type":"string","description":"Audio output format."},"background_noise_level":{"type":"number","format":"double","minimum":0,"maximum":0.25,"description":"Background noise level used in the conversation."},"background_noise":{"$ref":"#/components/schemas/ConversationBackgroundNoise","description":"The background noise type used in the conversation."},"live_transcript":{"type":["string","null"],"description":"Live transcript of the conversation."},"post_call_transcript":{"type":["string","null"],"description":"Post-call processed transcript."},"summary":{"type":["string","null"],"description":"Summary of the conversation."},"duration_ms":{"type":["number","null"],"format":"double","description":"Duration of the conversation in milliseconds."},"audio_url":{"type":["string","null"],"format":"uri","description":"Presigned URL to the conversation audio file. Expires in 1 day."},"started_at":{"type":["string","null"],"format":"date-time","description":"When the conversation started."},"ended_at":{"type":["string","null"],"format":"date-time","description":"When the conversation ended."},"ended_by":{"$ref":"#/components/schemas/ConversationEndedBy","description":"Who or what ended the conversation."},"boosted_keywords":{"type":["array","null"],"items":{"type":"string"},"description":"These words, or short phrases, are more accurately recognized by the model."},"pronunciation_dictionary":{"type":"array","items":{"$ref":"#/components/schemas/ConversationPronunciationDictionaryItems"},"description":"Array of `{ word, pronunciation }` entries. Words must be unique."},"min_words_to_interrupt":{"type":"integer","minimum":1,"maximum":10,"default":1,"description":"Minimum number of words required to interrupt the assistant."},"default_language":{"$ref":"#/components/schemas/LanguageCode","description":"ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language."},"additional_languages":{"type":["array","null"],"items":{"$ref":"#/components/schemas/LanguageCode"},"description":"Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `\"auto\"`, a maximum of 2 additional languages is allowed."},"multilingual_mode":{"$ref":"#/components/schemas/ConversationMultilingualMode","description":"If `\"auto\"`, each user audio is automatically identified for the language to respond in. If `\"request\"`, user must request to change language (recommended). If `\"initial\"` the first turn user audio determines the language for the rest of the conversation."},"push_to_talk":{"type":"boolean","default":false,"description":"Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false."},"intelligence_level":{"$ref":"#/components/schemas/ConversationIntelligenceLevel","description":"The intelligence level used for the conversation."},"phonic_model":{"$ref":"#/components/schemas/ConversationPhonicModel","description":"The Phonic speech-to-speech model used for the conversation. This field is deprecated. Use `model` instead.","deprecated":true},"languages":{"type":"array","items":{"type":"string"},"description":"Array of ISO 639-1 language codes recognized by the model. This field is deprecated. Use `default_language` and `additional_languages` instead.","deprecated":true},"heard_languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageCode"},"description":"Distinct languages heard from the user across the conversation, in order of first appearance. Empty for conversations predating language tracking."},"generate_no_input_poke_text":{"type":["boolean","null"],"description":"Whether the no-input poke text was generated by AI."},"no_input_poke_sec":{"type":["integer","null"],"minimum":1,"maximum":120,"description":"Number of seconds of silence before a poke message is sent. `null` means the poke message is disabled."},"no_input_poke_text":{"type":["string","null"],"description":"The message to send after the specified silence. Relevant only if `no_input_poke_sec` is not `null`. Ignored when generate_no_input_poke_text is true."},"no_input_end_conversation_sec":{"type":["integer","null"],"minimum":30,"maximum":600,"description":"Seconds of silence before the conversation is ended."},"websocket_timeout_sec":{"type":"number","format":"double","minimum":1,"maximum":300,"description":"The WebSocket idle timeout in seconds."},"vad_prebuffer_duration_ms":{"type":["integer","null"],"minimum":0,"maximum":2000,"description":"Voice activity detection prebuffer duration in milliseconds. `null` when not applicable or unknown (e.g. push-to-talk, or legacy stored conversations)."},"vad_min_speech_duration_ms":{"type":["integer","null"],"minimum":0,"maximum":1500,"description":"Minimum speech duration for voice activity detection in milliseconds. `null` when not applicable or unknown."},"vad_min_silence_duration_ms":{"type":["integer","null"],"minimum":0,"maximum":1500,"description":"Minimum silence duration for voice activity detection in milliseconds. `null` when not applicable or unknown."},"vad_threshold":{"type":["number","null"],"format":"double","minimum":0.2,"maximum":0.8,"description":"Voice activity detection threshold. `null` when not applicable or unknown."},"task_results":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Results from conversation evaluations and extractions."},"items":{"type":"array","items":{"$ref":"#/components/schemas/ConversationItem"},"description":"Array of conversation items (turns)."},"call_info":{"oneOf":[{"$ref":"#/components/schemas/ConversationCallInfo"},{"type":"null"}],"description":"Phone call metadata. `null` for non-phone call conversations."},"analysis":{"$ref":"#/components/schemas/ConversationAnalysis","description":"Analysis of the conversation including latencies and interruptions."},"is_redacted":{"type":"boolean","description":"Whether PII and PHI have been redacted from the conversation."},"redacted_transcript":{"type":["string","null"],"description":"The redacted transcript of the conversation. `null` when the conversation is not redacted."},"metadata":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Arbitrary metadata associated with the conversation."},"enable_watermarking":{"type":"boolean","description":"Whether an inaudible watermark was embedded in the audio the agent generated during the conversation."},"data_retention_policy":{"$ref":"#/components/schemas/DataRetentionPolicy","description":"Controls how long transcripts and audio recordings are retained before deletion."},"deletion_info":{"$ref":"#/components/schemas/ConversationDeletionInfo","description":"Information about when transcripts and audio recordings are or were scheduled to be deleted."},"enable_assistant_backchannel":{"type":"boolean","description":"Whether the assistant produced backchannel responses during the conversation."},"assistant_backchannel_aggressiveness":{"type":["number","null"],"format":"double","description":"How aggressively the assistant produced backchannel responses during the conversation."}},"required":["id","agent","workspace","project","external_id","origin","model","generate_welcome_message","is_welcome_message_interruptible","listen_only","welcome_message","template_variables","input_format","output_format","background_noise_level","background_noise","live_transcript","post_call_transcript","duration_ms","audio_url","started_at","ended_at","ended_by","boosted_keywords","pronunciation_dictionary","min_words_to_interrupt","default_language","additional_languages","multilingual_mode","push_to_talk","no_input_poke_sec","no_input_poke_text","no_input_end_conversation_sec","task_results","items","call_info","analysis"],"title":"Conversation"},"ConversationsListResponseConversationsPagination":{"type":"object","properties":{"prev_cursor":{"type":["string","null"],"description":"Cursor to fetch the previous page of conversations (newer). Use this value in the `before` query parameter. `null` if there is no previous page."},"next_cursor":{"type":["string","null"],"description":"Cursor to fetch the next page of conversations (older). Use this value in the `after` query parameter. `null` if there is no next page."}},"required":["prev_cursor","next_cursor"],"title":"ConversationsListResponseConversationsPagination"},"ListConversationsResponse":{"type":"object","properties":{"conversations":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"}},"pagination":{"$ref":"#/components/schemas/ConversationsListResponseConversationsPagination"}},"required":["conversations","pagination"],"title":"ListConversationsResponse"},"GetConversationByExternalIdResponse":{"type":"object","properties":{"conversation":{"$ref":"#/components/schemas/Conversation"}},"required":["conversation"],"title":"GetConversationByExternalIdResponse"},"conversations_list_Response_200":{"oneOf":[{"$ref":"#/components/schemas/ListConversationsResponse"},{"$ref":"#/components/schemas/GetConversationByExternalIdResponse"}],"title":"conversations_list_Response_200"},"ConversationsIdGetParametersAudioContainer":{"type":"string","enum":["wav.gz","wav"],"default":"wav.gz","title":"ConversationsIdGetParametersAudioContainer"},"conversations_get_Response_200":{"type":"object","properties":{"conversation":{"$ref":"#/components/schemas/Conversation"}},"required":["conversation"],"title":"conversations_get_Response_200"},"conversations_delete_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the conversation was deleted successfully."}},"required":["success"],"title":"conversations_delete_Response_200"},"conversations_cancel_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the conversation was cancelled successfully."}},"required":["success"],"title":"conversations_cancel_Response_200"},"conversations_get_analysis_Response_200":{"type":"object","properties":{"analysis":{"$ref":"#/components/schemas/ConversationAnalysis"}},"required":["analysis"],"title":"conversations_get_analysis_Response_200"},"ConversationExtractionSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDeleted":{"type":"boolean","description":"Whether the extraction schema has been deleted."}},"required":["id","name","isDeleted"],"title":"ConversationExtractionSchema"},"ConversationExtraction":{"type":"object","properties":{"id":{"type":"string","description":"The extraction ID."},"schema":{"$ref":"#/components/schemas/ConversationExtractionSchema"},"result":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The extracted data."},"created_at":{"type":"string","format":"date-time","description":"When the extraction was created."}},"required":["id","schema","result","created_at"],"title":"ConversationExtraction"},"conversations_list_extractions_Response_200":{"type":"object","properties":{"extractions":{"type":"array","items":{"$ref":"#/components/schemas/ConversationExtraction"}}},"required":["extractions"],"title":"conversations_list_extractions_Response_200"},"ExtractDataRequest":{"type":"object","properties":{"schema_id":{"type":"string","description":"ID of the extraction schema to use."}},"required":["schema_id"],"title":"ExtractDataRequest"},"conversations_extract_data_Response_201":{"type":"object","properties":{"result":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The extracted data according to the schema."}},"required":["result"],"title":"conversations_extract_data_Response_201"},"ConversationEvaluationResultResult":{"type":"string","enum":["successful","unsuccessful","undecided","error"],"description":"The evaluation result.","title":"ConversationEvaluationResultResult"},"ConversationEvaluationResultPrompt":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"The evaluation prompt information.","title":"ConversationEvaluationResultPrompt"},"ConversationEvaluationResult":{"type":"object","properties":{"id":{"type":"string","description":"The evaluation ID."},"result":{"$ref":"#/components/schemas/ConversationEvaluationResultResult","description":"The evaluation result."},"prompt":{"$ref":"#/components/schemas/ConversationEvaluationResultPrompt","description":"The evaluation prompt information."},"created_at":{"type":"string","format":"date-time","description":"When the evaluation was created."}},"required":["id","result","prompt","created_at"],"title":"ConversationEvaluationResult"},"conversations_list_evaluations_Response_200":{"type":"object","properties":{"evals":{"type":"array","items":{"$ref":"#/components/schemas/ConversationEvaluationResult"}}},"required":["evals"],"title":"conversations_list_evaluations_Response_200"},"EvaluateConversationRequest":{"type":"object","properties":{"prompt_id":{"type":"string","description":"ID of the evaluation prompt to use."}},"required":["prompt_id"],"title":"EvaluateConversationRequest"},"ConversationsIdEvalsPostResponsesContentApplicationJsonSchemaEvaluationResult":{"type":"string","enum":["successful","unsuccessful","undecided","error"],"description":"The evaluation result.","title":"ConversationsIdEvalsPostResponsesContentApplicationJsonSchemaEvaluationResult"},"ConversationsIdEvalsPostResponsesContentApplicationJsonSchemaEvaluation":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/ConversationsIdEvalsPostResponsesContentApplicationJsonSchemaEvaluationResult","description":"The evaluation result."}},"required":["result"],"title":"ConversationsIdEvalsPostResponsesContentApplicationJsonSchemaEvaluation"},"conversations_evaluate_Response_201":{"type":"object","properties":{"evaluation":{"$ref":"#/components/schemas/ConversationsIdEvalsPostResponsesContentApplicationJsonSchemaEvaluation"}},"required":["evaluation"],"title":"conversations_evaluate_Response_201"},"OutboundCallConfigMultilingualMode":{"type":"string","enum":["auto","request","initial"],"default":"request","description":"If `\"auto\"`, each user audio is automatically identified for the language to respond in. If `\"request\"`, user must request to change language (recommended). If `\"initial\"` the first turn user audio determines the language for the rest of the conversation.","title":"OutboundCallConfigMultilingualMode"},"OutboundCallConfigIntelligenceLevel":{"type":"string","enum":["standard","high"],"default":"standard","description":"The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency.","title":"OutboundCallConfigIntelligenceLevel"},"OutboundCallConfigPhonicModel0":{"type":"string","enum":["phonic-0.5","phonic-1"],"title":"OutboundCallConfigPhonicModel0"},"OutboundCallConfigPhonicModel":{"oneOf":[{"$ref":"#/components/schemas/OutboundCallConfigPhonicModel0"},{"type":"string"}],"description":"The Phonic speech-to-speech model to generate with. This field is deprecated. Use `model` instead.","title":"OutboundCallConfigPhonicModel","deprecated":true},"OutboundCallConfigPronunciationDictionaryItems":{"type":"object","properties":{"word":{"type":"string","maxLength":30},"pronunciation":{"type":"string","maxLength":50}},"required":["word","pronunciation"],"title":"OutboundCallConfigPronunciationDictionaryItems"},"OutboundCallConfigToolsItems0":{"type":"string","enum":["keypad_input","natural_conversation_ending","choose_not_to_respond","web_search"],"description":"Built-in tool","title":"OutboundCallConfigToolsItems0"},"OutboundCallConfigToolsItems":{"oneOf":[{"$ref":"#/components/schemas/OutboundCallConfigToolsItems0"},{"type":"string"}],"title":"OutboundCallConfigToolsItems"},"OutboundCallConfigModel0":{"type":"string","enum":["phonic-0.5","phonic-1"],"title":"OutboundCallConfigModel0"},"OutboundCallConfigModel":{"oneOf":[{"$ref":"#/components/schemas/OutboundCallConfigModel0"},{"type":"string"}],"description":"The Phonic speech-to-speech model to generate with. Omit it to use the current default model.","title":"OutboundCallConfigModel"},"OutboundCallConfigBackgroundNoise":{"type":"string","enum":["office","call-center","coffee-shop"],"description":"The background noise type. Can be \"office\", \"call-center\", \"coffee-shop\", or null.","title":"OutboundCallConfigBackgroundNoise"},"OutboundCallConfigConfigurationEndpoint":{"type":"object","properties":{"url":{"type":"string","description":"URL to call. Must be a publicly routable HTTPS URL without embedded credentials."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Object of key-value pairs."},"timeout_ms":{"type":"integer","default":3000,"description":"Timeout in milliseconds for the endpoint call."}},"required":["url"],"description":"When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options.","title":"OutboundCallConfigConfigurationEndpoint"},"OutboundCallConfig":{"type":"object","properties":{"agent":{"type":"string","description":"The name of the agent to use for the call."},"project":{"type":"string","default":"main","description":"The name of the project to use for the call."},"generate_welcome_message":{"type":"boolean","default":false,"description":"When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored."},"is_welcome_message_interruptible":{"type":"boolean","default":true,"description":"When `false`, the welcome message will not be interruptible by the user."},"welcome_message":{"type":["string","null"],"description":"Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`."},"system_prompt":{"type":"string","default":"Respond in 1-2 sentences.","description":"Instructions for the conversation. Can contain template variables like `{{subject}}`."},"template_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Variables that can be used in the welcome message and the system prompt."},"voice_id":{"type":"string","default":"sabrina","description":"The voice ID to use for the agent."},"additional_voice_ids":{"type":"array","items":{"type":"string","minLength":1},"description":"Additional voice IDs that, together with `voice_id`, form a voice set. The conversation is assigned one voice from the set, chosen at random with equal probability. Must not include `voice_id` and must not contain duplicates."},"generate_no_input_poke_text":{"type":"boolean","default":false,"description":"Whether to have the no-input poke text be generated by AI."},"no_input_poke_sec":{"type":["integer","null"],"minimum":1,"maximum":120,"description":"Number of seconds of silence before sending a poke message. `null` disables the poke message."},"no_input_poke_text":{"type":"string","default":"Are you still there?","description":"The message to send after the specified silence. Ignored when generate_no_input_poke_text is true."},"no_input_end_conversation_sec":{"type":"integer","minimum":30,"maximum":600,"default":180,"description":"Seconds of silence before ending the conversation."},"default_language":{"$ref":"#/components/schemas/LanguageCode","description":"ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language."},"additional_languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageCode"},"default":[],"description":"Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. When `multilingual_mode` is `\"auto\"`, a maximum of 2 additional languages is allowed."},"languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageCode"},"default":["en"],"description":"Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead.","deprecated":true},"multilingual_mode":{"$ref":"#/components/schemas/OutboundCallConfigMultilingualMode","default":"request","description":"If `\"auto\"`, each user audio is automatically identified for the language to respond in. If `\"request\"`, user must request to change language (recommended). If `\"initial\"` the first turn user audio determines the language for the rest of the conversation."},"push_to_talk":{"type":"boolean","default":false,"description":"Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false."},"intelligence_level":{"$ref":"#/components/schemas/OutboundCallConfigIntelligenceLevel","default":"standard","description":"The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency."},"phonic_model":{"$ref":"#/components/schemas/OutboundCallConfigPhonicModel","description":"The Phonic speech-to-speech model to generate with. This field is deprecated. Use `model` instead.","deprecated":true},"boosted_keywords":{"type":"array","items":{"type":"string"},"description":"These words, or short phrases, will be more accurately recognized by the agent."},"pronunciation_dictionary":{"type":"array","items":{"$ref":"#/components/schemas/OutboundCallConfigPronunciationDictionaryItems"},"description":"Array of `{ word, pronunciation }` entries. Words must be unique."},"min_words_to_interrupt":{"type":"integer","minimum":1,"maximum":10,"default":1,"description":"Minimum number of words required to interrupt the assistant."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/OutboundCallConfigToolsItems"},"description":"Array of built-in or custom tool names to use."},"enable_redaction":{"type":"boolean","default":false,"description":"When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE]`) and bleeped from audio recordings after the conversation ends."},"enable_watermarking":{"type":"boolean","default":false,"description":"When `true`, an inaudible watermark is embedded in the audio the agent generates."},"model":{"$ref":"#/components/schemas/OutboundCallConfigModel","description":"The Phonic speech-to-speech model to generate with. Omit it to use the current default model."},"audio_speed":{"type":"number","format":"double","minimum":0.5,"maximum":1.5,"multipleOf":0.1,"default":1,"description":"The audio speed of the agent."},"background_noise":{"$ref":"#/components/schemas/OutboundCallConfigBackgroundNoise","description":"The background noise type. Can be \"office\", \"call-center\", \"coffee-shop\", or null."},"background_noise_level":{"type":"number","format":"double","minimum":0,"maximum":0.25,"default":0,"description":"The background noise level of the agent."},"mcp_servers":{"type":"array","items":{"type":"string"},"description":"Array of MCP server names to use."},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"},"description":"Array of task objects with `name` and `description` fields."},"outbound_number_pool":{"oneOf":[{"$ref":"#/components/schemas/OutboundNumberPool"},{"type":"null"}],"description":"Pool of phone numbers used for outbound calls."},"enable_assistant_backchannel":{"type":"boolean","default":false,"description":"When `true`, the assistant will produce backchannel responses (e.g. \"mm-hmm\") while the user is speaking."},"assistant_backchannel_aggressiveness":{"type":"number","format":"double","minimum":0,"maximum":1,"multipleOf":0.01,"default":0.1,"description":"How aggressively the assistant produces backchannel responses. Only relevant when `enable_assistant_backchannel` is `true`."},"configuration_endpoint":{"oneOf":[{"$ref":"#/components/schemas/OutboundCallConfigConfigurationEndpoint"},{"type":"null"}],"description":"When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options."},"additional_params":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Additional runtime parameters."},"data_retention_policy":{"$ref":"#/components/schemas/DataRetentionPolicy","description":"Controls how long transcripts and audio recordings are retained before deletion."}},"description":"When an `agent` is provided, these `config` options override the agent settings.","title":"OutboundCallConfig"},"OutboundCallRequest":{"type":"object","properties":{"to_phone_number":{"type":"string","description":"The phone number to call in E.164 format."},"config":{"$ref":"#/components/schemas/OutboundCallConfig"},"dry_run":{"type":"boolean","default":false,"description":"If true, validates the outbound call setup without placing a call. Returns HTTP 200 with `conversation_id` set to null."}},"required":["to_phone_number"],"title":"OutboundCallRequest"},"OutboundDryRunResponse":{"type":"object","properties":{"conversation_id":{"description":"Always null when `dry_run` is true."},"dry_run":{"type":"boolean","description":"Always true for this response."}},"required":["conversation_id","dry_run"],"title":"OutboundDryRunResponse"},"OutboundCallInitiatedResponse":{"type":"object","properties":{"conversation_id":{"type":"string","description":"The ID of the created conversation."},"dry_run":{"type":"boolean","description":"Always false when a call was placed."}},"required":["conversation_id","dry_run"],"title":"OutboundCallInitiatedResponse"},"conversations_outbound_call_Response_200":{"oneOf":[{"$ref":"#/components/schemas/OutboundDryRunResponse"},{"$ref":"#/components/schemas/OutboundCallInitiatedResponse"}],"title":"conversations_outbound_call_Response_200"},"ConversationsSipOutboundCallPostRequestBodyContentApplicationJsonSchemaSipTransport":{"type":"string","enum":["auto","udp","tcp","tls"],"default":"auto","description":"SIP signaling transport used for this call. The SIP address must not carry a `;transport=` parameter; set it here instead.","title":"ConversationsSipOutboundCallPostRequestBodyContentApplicationJsonSchemaSipTransport"},"ConversationsSipOutboundCallPostRequestBodyContentApplicationJsonSchemaSipMediaEncryption":{"type":"string","enum":["disabled","allowed","required"],"default":"disabled","description":"Whether media (SRTP) encryption is used on this call.","title":"ConversationsSipOutboundCallPostRequestBodyContentApplicationJsonSchemaSipMediaEncryption"},"ConversationsSipOutboundCallPostRequestBodyContentApplicationJsonSchemaSip":{"type":"object","properties":{"transport":{"$ref":"#/components/schemas/ConversationsSipOutboundCallPostRequestBodyContentApplicationJsonSchemaSipTransport","default":"auto","description":"SIP signaling transport used for this call. The SIP address must not carry a `;transport=` parameter; set it here instead."},"media_encryption":{"$ref":"#/components/schemas/ConversationsSipOutboundCallPostRequestBodyContentApplicationJsonSchemaSipMediaEncryption","default":"disabled","description":"Whether media (SRTP) encryption is used on this call."}},"description":"SIP trunk settings for the outbound trunk created for this call.","title":"ConversationsSipOutboundCallPostRequestBodyContentApplicationJsonSchemaSip"},"SipOutboundDryRunResponse":{"type":"object","properties":{"conversation_id":{"description":"Always null when `dry_run` is true."},"twilio_call_sid":{"description":"Always null when `dry_run` is true."},"dry_run":{"type":"boolean","description":"Always true for this response."}},"required":["conversation_id","twilio_call_sid","dry_run"],"title":"SipOutboundDryRunResponse"},"SipOutboundCallInitiatedResponse":{"type":"object","properties":{"conversation_id":{"type":"string","description":"The ID of the created conversation."},"twilio_call_sid":{"type":"string","description":"The Twilio Call SID."},"dry_run":{"type":"boolean","description":"Always false when a call was placed."}},"required":["conversation_id","twilio_call_sid","dry_run"],"title":"SipOutboundCallInitiatedResponse"},"conversations_sip_outbound_call_Response_200":{"oneOf":[{"$ref":"#/components/schemas/SipOutboundDryRunResponse"},{"$ref":"#/components/schemas/SipOutboundCallInitiatedResponse"}],"title":"conversations_sip_outbound_call_Response_200"},"SipCallErrorErrorCode":{"type":"string","enum":["sip_call_failed","sip_auth_failed","invalid_phone_number"],"description":"Machine-readable error code.","title":"SipCallErrorErrorCode"},"SipCallErrorError":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable error message."},"code":{"$ref":"#/components/schemas/SipCallErrorErrorCode","description":"Machine-readable error code."},"sip_status_code":{"type":"integer","description":"The SIP response status code from the carrier (e.g. 403, 486, 603)."},"sip_status":{"type":"string","description":"The SIP response reason phrase from the carrier (e.g. \"Network Blocked\", \"Trunk CPS limit exceeded\")."}},"required":["message","code","sip_status_code","sip_status"],"title":"SipCallErrorError"},"SipCallError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/SipCallErrorError"}},"required":["error"],"title":"SipCallError"},"PostConversationsSipOutboundCallRequestBadRequestError":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/BasicError"},{"$ref":"#/components/schemas/SipCallError"}],"title":"PostConversationsSipOutboundCallRequestBadRequestError"},"PostConversationsSipOutboundCallRequestConflictError":{"oneOf":[{"$ref":"#/components/schemas/SipCallError"},{"$ref":"#/components/schemas/BasicError"}],"title":"PostConversationsSipOutboundCallRequestConflictError"},"ReplayConversationRequest":{"type":"object","properties":{"agent":{"type":"string","description":"Name of the agent to replay the conversation with. Defaults to the agent originally associated with the conversation."}},"title":"ReplayConversationRequest"},"conversations_replay_Response_200":{"type":"object","properties":{"message":{"type":"string","description":"Confirmation that the replay has started."}},"required":["message"],"title":"conversations_replay_Response_200"},"CreateSessionTokenRequest":{"type":"object","properties":{"ttl_seconds":{"type":"integer","minimum":60,"maximum":3600,"default":300,"description":"Time-to-live for the session token in seconds."},"conversation_ids":{"type":"array","items":{"type":"string"},"description":"Restricts the token to these conversations. A restricted token can read only their live audio and transcript, and cannot open the STS WebSocket or create an STS session. Omit it and the token can read any live conversation in the org. Pass it whenever the token will reach an end user's browser."}},"title":"CreateSessionTokenRequest"},"auth_create_session_token_Response_200":{"type":"object","properties":{"session_token":{"type":"string","description":"The session token to use for authentication."},"expires_at":{"type":"string","format":"date-time","description":"When the session token expires."}},"required":["session_token","expires_at"],"title":"auth_create_session_token_Response_200"},"CreateConversationTokenRequest":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent the conversation token is scoped to."},"ttl_seconds":{"type":"integer","minimum":30,"maximum":60,"default":30,"description":"Time-to-live for the conversation token in seconds."}},"required":["agent_id"],"title":"CreateConversationTokenRequest"},"auth_create_conversation_token_Response_200":{"type":"object","properties":{"conversation_token":{"type":"string","description":"The conversation token to use for authentication."},"expires_at":{"type":"string","format":"date-time","description":"When the conversation token expires."}},"required":["conversation_token","expires_at"],"title":"auth_create_conversation_token_Response_200"},"ProjectDefaultAgent":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the project's default agent."},"name":{"type":"string","description":"The name of the project's default agent."}},"required":["id","name"],"description":"The project's default agent.","title":"ProjectDefaultAgent"},"Project":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the project."},"name":{"type":"string","description":"The name of the project."},"default_agent":{"oneOf":[{"$ref":"#/components/schemas/ProjectDefaultAgent"},{"type":"null"}],"description":"The project's default agent."},"active_conversations":{"type":"integer","minimum":0,"description":"Number of conversations currently in progress for this project."},"max_active_conversations":{"type":["integer","null"],"description":"Maximum number of concurrent conversations allowed for this project. When `null`, the workspace `max_active_conversations` limit is used."}},"required":["id","name","default_agent","active_conversations","max_active_conversations"],"title":"Project"},"projects_list_Response_200":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}},"required":["projects"],"title":"projects_list_Response_200"},"CreateProjectRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the project. Can only contain lowercase letters, numbers and hyphens. Must be unique within the workspace."}},"required":["name"],"title":"CreateProjectRequest"},"projects_create_Response_201":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the created project."},"name":{"type":"string","description":"The name of the created project."}},"required":["id","name"],"title":"projects_create_Response_201"},"projects_get_Response_200":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"],"title":"projects_get_Response_200"},"projects_delete_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the project was deleted successfully."}},"required":["success"],"title":"projects_delete_Response_200"},"UpdateProjectRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the project. Can only contain lowercase letters, numbers and hyphens. Must be unique within the workspace."},"default_agent":{"type":["string","null"],"description":"The name of the new project's default agent. Set to `null` to remove the default agent."},"max_active_conversations":{"type":["integer","null"],"description":"Maximum number of concurrent conversations allowed for this project. When `null`, the workspace `max_active_conversations` limit is used."}},"title":"UpdateProjectRequest"},"projects_update_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the project was updated successfully."}},"required":["success"],"title":"projects_update_Response_200"},"ConversationEvalPrompt":{"type":"object","properties":{"id":{"type":"string","description":"The evaluation prompt ID."},"name":{"type":"string","description":"The evaluation prompt name."},"prompt":{"type":"string","description":"The evaluation prompt text."}},"required":["id","name","prompt"],"title":"ConversationEvalPrompt"},"projects_list_eval_prompts_Response_200":{"type":"object","properties":{"conversation_eval_prompts":{"type":"array","items":{"$ref":"#/components/schemas/ConversationEvalPrompt"}}},"required":["conversation_eval_prompts"],"title":"projects_list_eval_prompts_Response_200"},"CreateConversationEvalPromptRequest":{"type":"object","properties":{"name":{"type":"string","description":"A useful name for referring to this prompt."},"prompt":{"type":"string","description":"Actual evaluation prompt text to evaluate conversations with."}},"required":["name","prompt"],"title":"CreateConversationEvalPromptRequest"},"projects_create_eval_prompt_Response_201":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the created evaluation prompt."}},"required":["id"],"title":"projects_create_eval_prompt_Response_201"},"ConversationEvalPromptInfo":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"The evaluation prompt information.","title":"ConversationEvalPromptInfo"},"ConversationEvalResult":{"type":"string","enum":["successful","unsuccessful","undecided","error"],"description":"The evaluation result.","title":"ConversationEvalResult"},"ConversationEval":{"type":"object","properties":{"id":{"type":"string","description":"The evaluation ID."},"conversation_id":{"type":"string","description":"The ID of the conversation that was evaluated."},"prompt":{"$ref":"#/components/schemas/ConversationEvalPromptInfo"},"result":{"$ref":"#/components/schemas/ConversationEvalResult","description":"The evaluation result."},"created_at":{"type":"string","format":"date-time","description":"When the evaluation was created."}},"required":["id","conversation_id","prompt","result","created_at"],"title":"ConversationEval"},"projects_list_evals_Response_200":{"type":"object","properties":{"evals":{"type":"array","items":{"$ref":"#/components/schemas/ConversationEval"}}},"required":["evals"],"title":"projects_list_evals_Response_200"},"ResponsesUserMessage":{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"text":{"type":"string","minLength":1,"description":"What the user said."}},"required":["role","text"],"description":"Something the user said.","title":"ResponsesUserMessage"},"ResponsesToolReference":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Optional tool ID, accepted for compatibility with tool calls copied from conversation items."},"name":{"type":"string","minLength":1,"description":"Name of the tool that was called."}},"required":["name"],"description":"A pointer to the tool that was called by the assistant (see ResponsesToolCall).","title":"ResponsesToolReference"},"ResponsesToolCall":{"type":"object","properties":{"tool_call_id":{"type":"string","minLength":1,"maxLength":200,"description":"Identifier for this tool call, unique within `input`."},"tool":{"$ref":"#/components/schemas/ResponsesToolReference"},"request_body":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Arguments the assistant passed in the request body."},"query_params":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Arguments the assistant passed as query parameters. An argument cannot appear in both `request_body` and `query_params`."}},"required":["tool_call_id","tool"],"description":"A tool call the assistant made earlier in the conversation.","title":"ResponsesToolCall"},"ResponsesChoseNotToRespondAction":{"type":"object","properties":{"type":{"type":"string","enum":["assistant_chose_not_to_respond"]},"respond_after_sec":{"type":["number","null"],"format":"double","minimum":1,"maximum":30,"description":"Number of seconds the assistant would wait before speaking a follow-up if the user stays silent, echoed from the tool's configuration. When null, the assistant stays silent."}},"required":["type"],"description":"The assistant stayed silent instead of responding (the `choose_not_to_respond` built-in tool).","title":"ResponsesChoseNotToRespondAction"},"ResponsesEndedConversationAction":{"type":"object","properties":{"type":{"type":"string","enum":["assistant_ended_conversation"]}},"required":["type"],"description":"The assistant ended the conversation (the `natural_conversation_ending` built-in tool).","title":"ResponsesEndedConversationAction"},"ResponsesDtmfAction":{"type":"object","properties":{"type":{"type":"string","enum":["dtmf"]},"digits":{"type":"string","description":"The digits the assistant pressed."}},"required":["type","digits"],"description":"The assistant pressed keypad digits (the `keypad_input` built-in tool).","title":"ResponsesDtmfAction"},"ResponsesTransferToPhoneNumberActionOnTransferNoAnswer":{"type":"string","enum":["return_to_assistant","keep_retrying"],"description":"What Phonic would do if the transfer target does not answer. `return_to_assistant` hands control back to the agent; `keep_retrying` re-dials the target.","title":"ResponsesTransferToPhoneNumberActionOnTransferNoAnswer"},"ResponsesTransferToPhoneNumberAction":{"type":"object","properties":{"type":{"type":"string","enum":["transfer_to_phone_number"]},"phone_number":{"type":["string","null"],"minLength":1,"description":"The phone number the call would be transferred to, in E.164 format. Null when transferring to `sip` instead."},"sip":{"oneOf":[{"$ref":"#/components/schemas/TransferSip"},{"type":"null"}],"description":"The SIP destination the call would be transferred to. Null when transferring to `phone_number` instead."},"detect_voicemail":{"type":"boolean","description":"Whether Phonic would detect whether the transfer reached a voicemail."},"use_agent_phone_number":{"type":"boolean","description":"Whether the transfer would be placed from the agent's phone number."},"keep_listening":{"type":"boolean","description":"Whether Phonic would keep transcribing the call after the transfer."},"on_transfer_no_answer":{"$ref":"#/components/schemas/ResponsesTransferToPhoneNumberActionOnTransferNoAnswer","description":"What Phonic would do if the transfer target does not answer. `return_to_assistant` hands control back to the agent; `keep_retrying` re-dials the target."},"dtmf":{"type":["string","null"],"description":"Digits to dial after the transfer connects, for navigating a phone menu. Null when there are none."}},"required":["type","detect_voicemail","use_agent_phone_number","keep_listening","on_transfer_no_answer"],"description":"The assistant transferred the call to a phone number (a `built_in_transfer_to_phone_number` tool).","title":"ResponsesTransferToPhoneNumberAction"},"ResponsesTransferToAgentAction":{"type":"object","properties":{"type":{"type":"string","enum":["transfer_to_agent"]},"agent":{"type":"string","minLength":1,"description":"Name of the agent the conversation would be transferred to."}},"required":["type","agent"],"description":"The assistant transferred the conversation to another agent (a `built_in_transfer_to_agent` tool).","title":"ResponsesTransferToAgentAction"},"ResponsesAction":{"oneOf":[{"$ref":"#/components/schemas/ResponsesChoseNotToRespondAction"},{"$ref":"#/components/schemas/ResponsesEndedConversationAction"},{"$ref":"#/components/schemas/ResponsesDtmfAction"},{"$ref":"#/components/schemas/ResponsesTransferToPhoneNumberAction"},{"$ref":"#/components/schemas/ResponsesTransferToAgentAction"}],"description":"The action the assistant takes on a turn - the event a live Phonic conversation would have emitted over the STS WebSocket, without the effect actually being carried out.","title":"ResponsesAction"},"ResponsesAssistantMessage":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"text":{"type":"string","description":"What the assistant said. Empty when the turn only made tool calls or only took an action."},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ResponsesToolCall"},"description":"Tool calls the assistant made on this turn. Each one must be followed immediately by its matching `tool_call_output` item."},"action":{"$ref":"#/components/schemas/ResponsesAction","description":"The action the assistant took on this turn. Cannot be combined with `tool_calls`."}},"required":["role","text"],"description":"An assistant turn. Must carry at least one of `text`, `tool_calls`, or `action`. `tool_calls` and `action` cannot both be present.","title":"ResponsesAssistantMessage"},"ResponsesToolCallOutputResponseBody":{"oneOf":[{"type":"object","additionalProperties":{"description":"Any type"}},{"type":"array","items":{"description":"Any type"}},{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"}],"description":"The value the tool returned. Can be any JSON-serializable value.","title":"ResponsesToolCallOutputResponseBody"},"ResponsesToolCallOutput":{"type":"object","properties":{"type":{"type":"string","enum":["tool_call_output"]},"tool_call_id":{"type":"string","minLength":1,"maxLength":200,"description":"The `tool_call_id` of the assistant tool call this output belongs to."},"response_body":{"oneOf":[{"$ref":"#/components/schemas/ResponsesToolCallOutputResponseBody"},{"type":"null"}],"description":"The value the tool returned. Can be any JSON-serializable value."},"response_status_code":{"type":["integer","null"],"description":"HTTP status code the tool returned, for tools called over HTTP."},"timed_out":{"type":"boolean","description":"Whether the tool call timed out."},"error_message":{"type":["string","null"],"description":"The error the tool call failed with."},"interrupted":{"type":"boolean","description":"Whether the tool call was interrupted before it finished."}},"required":["type","tool_call_id"],"description":"The result of an assistant tool call. Must record an outcome through `response_body`, `response_status_code`, `error_message`, `timed_out`, or `interrupted`.","title":"ResponsesToolCallOutput"},"ResponsesInputItem":{"oneOf":[{"$ref":"#/components/schemas/ResponsesUserMessage"},{"$ref":"#/components/schemas/ResponsesAssistantMessage"},{"$ref":"#/components/schemas/ResponsesToolCallOutput"}],"description":"One item of conversation history - a user message, an assistant message, or the output of an assistant tool call.","title":"ResponsesInputItem"},"ResponsesToolDefinition":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The tool name."},"description":{"type":"string","maxLength":2000,"description":"What the tool does. The model uses this to decide when to call it."},"parameters":{"$ref":"#/components/schemas/ToolParametersJsonSchema"},"require_speech_before_tool_call":{"type":"boolean","default":true,"description":"When true, forces the agent to speak before executing the tool. Note this defaults to true here, unlike on the tools API, so a simulated turn matches the default a custom tool runs with in a live call."},"forbid_tool_call_after_speech":{"type":"boolean","default":false,"description":"When true, forbids the agent from calling the tool right after it has spoken. The call is dropped and the speech is kept."}},"required":["name","description","parameters"],"description":"A tool the assistant may call, defined inline for this request only.","title":"ResponsesToolDefinition"},"ResponsesToolName":{"type":"string","minLength":1,"description":"Name of a built-in tool, or of a transfer tool stored in `project`. Must be snake_case.","title":"ResponsesToolName"},"ResponsesBuiltInToolName":{"type":"string","enum":["keypad_input","natural_conversation_ending","choose_not_to_respond","web_search"],"description":"The name of the built-in tool.","title":"ResponsesBuiltInToolName"},"ResponsesBuiltInToolToolConfig":{"oneOf":[{"$ref":"#/components/schemas/BuiltInToolConfig"},{"$ref":"#/components/schemas/ChooseNotToRespondToolConfig"}],"description":"The tool's configuration. Use `BuiltInToolConfig` for `keypad_input`, `natural_conversation_ending`, and `web_search`, or `ChooseNotToRespondToolConfig` for `choose_not_to_respond`.","title":"ResponsesBuiltInToolToolConfig"},"ResponsesBuiltInTool":{"type":"object","properties":{"type":{"type":"string","enum":["built_in"]},"name":{"$ref":"#/components/schemas/ResponsesBuiltInToolName","description":"The name of the built-in tool."},"tool_config":{"$ref":"#/components/schemas/ResponsesBuiltInToolToolConfig","description":"The tool's configuration. Use `BuiltInToolConfig` for `keypad_input`, `natural_conversation_ending`, and `web_search`, or `ChooseNotToRespondToolConfig` for `choose_not_to_respond`."}},"required":["type","name","tool_config"],"description":"A built-in tool with an explicit configuration, as an alternative to referencing it by bare name (which uses the tool's default configuration). `keypad_input`, `natural_conversation_ending`, and `web_search` take a `speech_before_tool_call` config; `choose_not_to_respond` takes a `respond_after_sec` config.","title":"ResponsesBuiltInTool"},"ResponsesTool":{"oneOf":[{"$ref":"#/components/schemas/ResponsesToolName"},{"$ref":"#/components/schemas/ResponsesBuiltInTool"}],"description":"A tool that already exists, referenced by name - either a built-in tool or a transfer tool stored in `project`. Use the object form to configure a built-in tool explicitly; a bare name uses the tool's default configuration.","title":"ResponsesTool"},"GenerateResponsesRequestModel0":{"type":"string","enum":["phonic-0.5","phonic-1"],"title":"GenerateResponsesRequestModel0"},"GenerateResponsesRequestModel":{"oneOf":[{"$ref":"#/components/schemas/GenerateResponsesRequestModel0"},{"type":"string"}],"description":"The Phonic speech-to-speech model to generate with. Omit it to use the current default model.","title":"GenerateResponsesRequestModel"},"GenerateResponsesRequestPhonicModel0":{"type":"string","enum":["phonic-0.5","phonic-1"],"title":"GenerateResponsesRequestPhonicModel0"},"GenerateResponsesRequestPhonicModel":{"oneOf":[{"$ref":"#/components/schemas/GenerateResponsesRequestPhonicModel0"},{"type":"string"}],"description":"The Phonic speech-to-speech model to generate with. This field is deprecated. Use `model` instead.","title":"GenerateResponsesRequestPhonicModel","deprecated":true},"GenerateResponsesRequest":{"type":"object","properties":{"system_prompt":{"type":"string","minLength":1,"description":"The system prompt the assistant should follow."},"voice_id":{"type":"string","default":"sabrina","description":"ID of the voice the assistant would speak with. It shapes how the responses are worded."},"default_language":{"$ref":"#/components/schemas/LanguageCode","description":"ISO 639-1 language code that sets the assistant's default language to recognize and speak."},"additional_languages":{"type":"array","items":{"$ref":"#/components/schemas/LanguageCode"},"default":[],"description":"Array of additional ISO 639-1 language codes that the assistant should be able to recognize and speak. Should not include `default_language`."},"input":{"type":"array","items":{"$ref":"#/components/schemas/ResponsesInputItem"},"description":"The conversation so far, in order. Must contain at least one item."},"tool_definitions":{"type":"array","items":{"$ref":"#/components/schemas/ResponsesToolDefinition"},"default":[],"description":"Tools defined inline for this request only. Typically if you use LiveKit, this is where you can pass in your tool definitions. Names must be unique, must not repeat a name in `tools`, and cannot be one of the names Phonic reserves for its built-in tools."},"project":{"type":"string","minLength":1,"description":"Name of the project the tools referenced by name in `tools` belong to. Required whenever `tools` names a tool stored in your workspace; built-in tools can be referenced without it."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ResponsesTool"},"default":[],"description":"Tools the assistant may call that already exist - a built-in tool, or a transfer tool stored in `project`, referenced by name. Names must be unique and must not repeat a name in `tool_definitions`. Stored tools that are not transfer tools cannot be referenced here yet; define them inline as `tool_definitions` instead."},"model":{"$ref":"#/components/schemas/GenerateResponsesRequestModel","description":"The Phonic speech-to-speech model to generate with. Omit it to use the current default model."},"phonic_model":{"$ref":"#/components/schemas/GenerateResponsesRequestPhonicModel","description":"The Phonic speech-to-speech model to generate with. This field is deprecated. Use `model` instead.","deprecated":true},"num_responses":{"type":"integer","minimum":1,"maximum":200,"default":1,"description":"Number of alternative responses to generate."}},"required":["system_prompt","input"],"title":"GenerateResponsesRequest"},"GeneratedToolReference":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tool to call. Always one of the `tool_definitions` from the request."}},"required":["name"],"description":"The tool the assistant wants to call.","title":"GeneratedToolReference"},"GeneratedToolCall":{"type":"object","properties":{"tool_call_id":{"type":"string","description":"Identifier for this tool call. Send it back as the `tool_call_id` of the matching `tool_call_output` input item."},"tool":{"$ref":"#/components/schemas/GeneratedToolReference"},"request_body":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Arguments the assistant produced for the request body."},"query_params":{"type":"object","additionalProperties":{"type":"string"},"description":"Arguments the assistant produced as query parameters."}},"required":["tool_call_id","tool"],"title":"GeneratedToolCall"},"GeneratedResponse":{"type":"object","properties":{"text":{"type":"string","description":"The text the assistant would say. Empty when the response only makes tool calls or only takes an action."},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/GeneratedToolCall"},"description":"Tool calls the assistant would make - note that the tools are not actually called."},"action":{"$ref":"#/components/schemas/ResponsesAction","description":"The action the assistant would take, when the response calls one of the tools referenced in `tools`. Note that the action is not actually carried out."}},"required":["text","tool_calls"],"title":"GeneratedResponse"},"GenerateResponsesResponse":{"type":"object","properties":{"responses":{"type":"array","items":{"$ref":"#/components/schemas/GeneratedResponse"},"description":"The generated responses - always `num_responses` of them."}},"required":["responses"],"title":"GenerateResponsesResponse"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer <PHONIC_API_KEY>`. Manage your API keys [here](https://phonic.co/api-keys)."}}}}