{ "openapi": "3.0.0", "info": { "title": "VoIPBin API", "version": "1.0.0", "x-logo": { "url": "https://github.com/pchero/voipbin/blob/master/logos/voipbin-high-resolution-logo-black-transparent.png?raw=true", "backgroundColor": "#FFFFFF", "altText": "voipbin", "href": "https://api.voipbin.net/docs/" } }, "servers": [ { "url": "https://api.voipbin.net/v1.0" } ], "tags": [ { "name": "Auth", "description": "Authentication operations", "externalDocs": { "description": "Find more about authentication", "url": "https://api.voipbin.net/docs/auth.html" } }, { "name": "Accesskey", "description": "Operations related to accesskey", "externalDocs": { "description": "Find more about accesskey", "url": "https://api.voipbin.net/docs/accesskey.html" } }, { "name": "Activeflow", "description": "Operations related to activeflow", "externalDocs": { "description": "Find more about activeflow", "url": "https://api.voipbin.net/docs/activeflow.html" } }, { "name": "Agent", "description": "Operations related to agent", "externalDocs": { "description": "Find more about agent", "url": "https://api.voipbin.net/docs/agent.html" } }, { "name": "Billing", "description": "Operations related to billing", "externalDocs": { "description": "Find more about billing", "url": "https://api.voipbin.net/docs/billing_account.html" } }, { "name": "Call", "description": "Operations related to call", "externalDocs": { "description": "Find more about call", "url": "https://api.voipbin.net/docs/call.html" } }, { "name": "Campaign", "description": "Operations related to campaign", "externalDocs": { "description": "Find more about campaign", "url": "https://api.voipbin.net/docs/campaign.html" } }, { "name": "AI", "description": "Operations related to ai", "externalDocs": { "description": "Find more about ai", "url": "https://api.voipbin.net/docs/ai.html" } }, { "name": "Conference", "description": "Operations related to conference", "externalDocs": { "description": "Find more about conference", "url": "https://api.voipbin.net/docs/conference.html" } }, { "name": "Conversation", "description": "Operations related to conversation", "externalDocs": { "description": "Find more about conversation", "url": "https://api.voipbin.net/docs/conversation.html" } }, { "name": "Customer", "description": "Operations related to customer", "externalDocs": { "description": "Find more about customer", "url": "https://api.voipbin.net/docs/customer.html" } }, { "name": "Extension", "description": "Operations related to extension", "externalDocs": { "description": "Find more about extension", "url": "https://api.voipbin.net/docs/extension.html" } }, { "name": "File", "description": "Operations related to file" }, { "name": "Flow", "description": "Operations related to flow", "externalDocs": { "description": "Find more about flow", "url": "https://api.voipbin.net/docs/flow.html" } }, { "name": "Groupcall", "description": "Operations related to groupcall", "externalDocs": { "description": "Find more about groupcall", "url": "https://api.voipbin.net/docs/groupcall.html" } }, { "name": "Me", "description": "Operations related to myself data" }, { "name": "Message", "description": "Operations related to message", "externalDocs": { "description": "Find more about message", "url": "https://api.voipbin.net/docs/message.html" } }, { "name": "Number", "description": "Operations related to number", "externalDocs": { "description": "Find more about number", "url": "https://api.voipbin.net/docs/number.html" } }, { "name": "Outdial", "description": "Operations related to outdial", "externalDocs": { "description": "Find more about outdial", "url": "https://api.voipbin.net/docs/outdial.html" } }, { "name": "Outplan", "description": "Operations related to outplan", "externalDocs": { "description": "Find more about outplan", "url": "https://api.voipbin.net/docs/outplan.html" } }, { "name": "Provider", "description": "Operations related to provider", "externalDocs": { "description": "Find more about provider", "url": "https://api.voipbin.net/docs/provider.html" } }, { "name": "ProviderCall", "description": "Operations related to providercall (admin-triggered calls placed through a specific provider)", "externalDocs": { "description": "Find more about providercall", "url": "https://api.voipbin.net/docs/providercall.html" } }, { "name": "Queue", "description": "Operations related to queue", "externalDocs": { "description": "Find more about queue", "url": "https://api.voipbin.net/docs/queue.html" } }, { "name": "Recording", "description": "Operations related to recording", "externalDocs": { "description": "Find more about recording", "url": "https://api.voipbin.net/docs/recording.html" } }, { "name": "Route", "description": "Operations related to route", "externalDocs": { "description": "Find more about route", "url": "https://api.voipbin.net/docs/route.html" } }, { "name": "Service Agent", "description": "Operations related to individual agent service" }, { "name": "Speaking", "description": "Operations related to real-time streaming TTS sessions" }, { "name": "Storage", "description": "Operations related to storage", "externalDocs": { "description": "Find more about storage", "url": "https://api.voipbin.net/docs/storage.html" } }, { "name": "Tag", "description": "Operations related to tag", "externalDocs": { "description": "Find more about tag", "url": "https://api.voipbin.net/docs/tag.html" } }, { "name": "Transcribe", "description": "Operations related to transcribe", "externalDocs": { "description": "Find more about transcribe", "url": "https://api.voipbin.net/docs/transcribe.html" } }, { "name": "Transfer", "description": "Operations related to transfer", "externalDocs": { "description": "Find more about transfer", "url": "https://api.voipbin.net/docs/transfer.html" } }, { "name": "Trunk", "description": "Operations related to trunk", "externalDocs": { "description": "Find more about trunk", "url": "https://api.voipbin.net/docs/trunk.html" } }, { "name": "Websocket", "description": "Operations related to websocket", "externalDocs": { "description": "Find more about websocket", "url": "https://api.voipbin.net/docs/websocket.html" } }, { "name": "Timeline", "description": "Operations related to timeline events" }, { "name": "RAG", "description": "Operations related to RAG (Retrieval-Augmented Generation)" }, { "name": "Team", "description": "Team operations", "externalDocs": { "description": "Team Tutorial", "url": "https://api.voipbin.net/docs/team_overview.html" } } ], "paths": { "/accesskeys": { "get": { "summary": "Get list of accesskeys", "description": "Get accesskeys of the customer", "tags": [ "Accesskey" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/CustomerManagerAccesskey" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new accesskey.", "description": "Create a new accesskey.", "tags": [ "Accesskey" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "expire": { "type": "integer", "format": "int" } } } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerAccesskey" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/accesskeys/{id}": { "get": { "summary": "Get details of an accesskey", "tags": [ "Accesskey" ], "parameters": [ { "name": "id", "in": "path", "description": "ID of the accesskey", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Accesskey details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerAccesskey" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete an accesskey", "tags": [ "Accesskey" ], "parameters": [ { "name": "id", "in": "path", "description": "ID of the accesskey", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Accesskey deleted successfully" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update an accesskey", "tags": [ "Accesskey" ], "parameters": [ { "name": "id", "in": "path", "description": "ID of the accesskey", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" } } } } } }, "responses": { "200": { "description": "Accesskey updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerAccesskey" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/activeflows": { "post": { "summary": "Create a new activeflow", "description": "Endpoint to create a new activeflow.", "tags": [ "Activeflow" ], "requestBody": { "description": "Request body to create a new activeflow.", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Optional client-supplied UUID for the new activeflow. If omitted, the server generates one.\n" }, "flow_id": { "type": "string", "description": "UUID of an existing flow to run. Obtain it from the id field of a GET /flows or POST /flows response. Provide either flow_id or an inline actions array.\n" }, "actions": { "type": "array", "description": "Inline action list to run when no flow_id is provided. Provide either flow_id or actions.\n", "items": { "$ref": "#/components/schemas/FlowManagerAction" } }, "variables": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Optional flat key-value context seeded into the created activeflow as runtime variables, readable in the flow via ${key}. String values only. Reserved keys starting with 'voipbin.' are ignored. Max 100 keys, 64KB total, 32KB per value.\n", "example": { "campaign_id": "summer-2026", "customer_name": "Jane Doe" } }, "webhook_uri": { "type": "string", "description": "Optional per-activeflow webhook destination URI. When set, activeflow webhook events are delivered additively to this URI in addition to the customer-level webhook destination. Must be a valid http or https URL.\n", "example": "https://example.com/webhooks/activeflow" }, "webhook_method": { "$ref": "#/components/schemas/FlowManagerWebhookMethod", "description": "Optional HTTP method used to deliver the per-activeflow webhook. Must be one of POST, GET, PUT or DELETE.\n", "example": "POST" } } } } } }, "responses": { "200": { "description": "activeflow created successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlowManagerActiveflow" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "get": { "summary": "List all activeflows", "description": "Retrieve a list of all activeflows.", "tags": [ "Activeflow" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/FlowManagerActiveflow" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/activeflows/{id}": { "delete": { "summary": "Delete an activeflow", "description": "Endpoint to delete an activeflow by its ID.", "tags": [ "Activeflow" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the activeflow to delete." } } ], "responses": { "204": { "description": "Activeflow deleted successfully." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "get": { "summary": "Get an activeflow by ID", "description": "Retrieve details of a specific flow.", "tags": [ "Activeflow" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the activeflow." } } ], "responses": { "200": { "description": "Activeflow details retrieved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlowManagerActiveflow" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/activeflows/{id}/stop": { "post": { "summary": "Stop an activeflow", "description": "Endpoint to stop an activeflow by its ID.", "tags": [ "Activeflow" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the activeflow to stop." } } ], "responses": { "200": { "description": "Activeflow stopped successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlowManagerActiveflow" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/agents": { "get": { "summary": "List agents", "description": "Get agents of the user.", "tags": [ "Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "tag_ids", "in": "query", "description": "Comma separated tag ids.", "required": false, "schema": { "type": "string" } }, { "name": "status", "in": "query", "description": "Agent status.", "required": false, "schema": { "$ref": "#/components/schemas/AgentManagerAgentStatus" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AgentManagerAgent" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new agent", "description": "Endpoint to create a new agent.", "tags": [ "Agent" ], "requestBody": { "description": "Request body to create a new agent.", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "username": { "type": "string" }, "password": { "type": "string" }, "name": { "type": "string" }, "detail": { "type": "string" }, "ring_method": { "$ref": "#/components/schemas/AgentManagerAgentRingMethod" }, "permission": { "$ref": "#/components/schemas/AgentManagerAgentPermission" }, "tag_ids": { "type": "array", "items": { "type": "string" } }, "addresses": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" } } }, "required": [ "username", "password", "name", "detail", "ring_method", "permission", "tag_ids", "addresses" ] } } } }, "responses": { "201": { "description": "Agent created successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/agents/{id}": { "get": { "summary": "Get the agent", "description": "Get the agent of the given ID.", "tags": [ "Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the agent.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete the agent", "description": "Delete the agent of the given ID.", "tags": [ "Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the agent.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update an agent", "description": "Update an agent and return updated details.", "tags": [ "Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the agent.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "ring_method": { "$ref": "#/components/schemas/AgentManagerAgentRingMethod" } } } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/agents/{id}/addresses": { "put": { "summary": "Update an agent's addresses", "description": "Update an agent's addresses and return updated details.", "tags": [ "Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the agent.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "addresses": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" } } } } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/agents/{id}/tag_ids": { "put": { "summary": "Update an agent's tag IDs", "description": "Update an agent's tag IDs and return updated details.", "tags": [ "Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the agent.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "tag_ids": { "type": "array", "items": { "type": "string" } } } } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/agents/{id}/permission": { "put": { "summary": "Update an agent's permission", "description": "Update an agent's permission and return updated details.", "tags": [ "Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the agent.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "permission": { "$ref": "#/components/schemas/AgentManagerAgentPermission" } } } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/agents/{id}/status": { "put": { "summary": "Update an agent's status", "description": "Update an agent's status and return updated details.", "tags": [ "Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the agent.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/AgentManagerAgentStatus" } } } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/agents/{id}/password": { "put": { "summary": "Update an agent's password", "description": "Update an agent's password and return updated details.", "tags": [ "Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the agent.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "password": { "type": "string" } } } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/agents/{id}/direct-hash-regenerate": { "post": { "summary": "Regenerate direct hash for agent", "description": "Regenerates the direct hash for the specified agent. If no direct hash exists, one is created. Returns the updated agent with the new direct_hash.", "tags": [ "Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the agent. Returned from the `GET /agents` response." } ], "responses": { "200": { "description": "Direct hash regenerated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aimessages/{id}": { "get": { "summary": "Retrieve details of a aicall message", "description": "Fetches detailed information about a specific aicall message by ID.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the aicall message", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a aicall message", "description": "Deletes a specific aicall message by ID and returns its details.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the aicall message", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aimessages": { "get": { "summary": "Retrieve a list of aicall messages", "description": "Fetches a paginated list of aicall messages.", "tags": [ "AI" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "aicall_id", "in": "query", "description": "The aicall id.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A list of aicall messages.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerMessage" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Send a aicall message", "description": "Creates and send a new aicall message and returns the details of the created message.", "tags": [ "AI" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "aicall_id": { "type": "string" }, "role": { "$ref": "#/components/schemas/AIManagerMessageRole" }, "content": { "type": "string" } }, "required": [ "aicall_id", "role", "content" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aicalls/{id}": { "get": { "summary": "Get details of a specific ai call", "description": "Retrieves detailed information about a ai call identified by its ID.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the ai call." } ], "responses": { "200": { "description": "Details of the specified ai call.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAIcall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a specific ai call", "description": "Deletes a ai call identified by its ID.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the ai call." } ], "responses": { "200": { "description": "The aicall was successfully deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAIcall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aicalls/{id}/terminate": { "post": { "summary": "Terminate a specific ai call", "description": "Terminates an active AI call identified by its ID. The call must be in a progressing state. Use this endpoint to end an ongoing AI call session before it completes naturally.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "11111111-1111-1111-1111-111111111111" }, "description": "The ID of the ai call to terminate." } ], "responses": { "200": { "description": "The aicall was successfully terminated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAIcall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aicalls/{id}/participants": { "get": { "summary": "List participants of an AI call", "description": "Retrieves a paginated list of AI agents that participated in the specified AI call.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "11111111-1111-1111-1111-111111111111" }, "description": "The unique identifier of the AI call. Returned from the `POST /aicalls` or `GET /aicalls` response." }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A paginated list of participants.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerParticipant" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aicalls": { "get": { "summary": "Gets a list of ai calls", "description": "Retrieves a paginated list of ai calls based on the provided query parameters.", "tags": [ "AI" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of ai calls.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerAIcall" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new aicall.", "description": "Creates a new aicall and returns the created aicall's details.", "tags": [ "AI" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assistance_type": { "$ref": "#/components/schemas/AIManagerAIcallAssistanceType" }, "assistance_id": { "type": "string" }, "reference_type": { "$ref": "#/components/schemas/AIManagerAIcallReferenceType" }, "reference_id": { "type": "string" } }, "required": [ "assistance_type", "assistance_id", "reference_type", "reference_id" ] } } } }, "responses": { "200": { "description": "Details of the created chatboaicall.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAIcall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/ais/{id}": { "get": { "summary": "Get ai details.", "description": "Retrieves detailed information for a specific ai by its ID.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the ai." } ], "responses": { "200": { "description": "Details of the requested ai.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAI" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a ai.", "description": "Deletes an existing ai by its ID.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the ai." } ], "responses": { "200": { "description": "AI successfully deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAI" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a ai.", "description": "Updates an existing ai's details and returns the updated information.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the ai." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "type": { "type": "string", "enum": [ "normal", "insight" ], "description": "AI type. `normal` (default) is a general-purpose AI. `insight` restricts the AI to the Insight tool set and uses a dedicated system prompt.", "example": "normal" }, "engine_model": { "$ref": "#/components/schemas/AIManagerAIEngineModel" }, "parameter": { "type": "object", "additionalProperties": true, "description": "Data associated with the ai's engine, can be dynamic and vary based on the engine type." }, "engine_key": { "type": "string", "description": "API key or credential for the AI engine." }, "rag_id": { "type": "string", "description": "The knowledge base ID (UUID) for the search_knowledge tool. Returned from the `id` field of the `GET /rags` response. Send empty string or omit to clear." }, "init_prompt": { "type": "string" }, "tts_type": { "type": "string", "description": "Text-to-speech engine type." }, "tts_voice_id": { "type": "string", "description": "Voice ID for the text-to-speech engine." }, "stt_type": { "type": "string", "description": "Speech-to-text engine type." }, "stt_language": { "type": "string", "description": "STT language in BCP-47 format (e.g., ko-KR, en-US).", "example": "en-US" }, "vad_config": { "$ref": "#/components/schemas/AIManagerVADConfig", "description": "Voice Activity Detection configuration. All fields are optional." }, "tool_names": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerToolName" }, "description": "List of tool names to enable for this AI. Use [\"all\"] to enable all available tools. For type=insight AIs, only Insight tool names are permitted (currently: get_contact_interactions, get_conversation_content); type=normal AIs may use any Normal tool name or [\"all\"]. Mismatched combinations are rejected with a 400." }, "auto_aicall_audit_enabled": { "type": "boolean", "description": "When true, any finished AICall involving this AI is audited automatically.", "example": false } }, "required": [ "name", "detail", "engine_model", "parameter", "engine_key", "init_prompt", "tts_type", "tts_voice_id", "stt_type" ] } } } }, "responses": { "200": { "description": "Details of the updated ai.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAI" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/ais/{id}/activate_insight": { "post": { "summary": "Activate an Insight AI", "description": "Makes the specified Insight AI the customer's active one, deactivating whichever Insight AI was active before. A customer may hold any number of `type=insight` AIs, but at most one may be active at a time. The active one is what the Case Insight Assistant panel auto-attaches to a case. Newly created Insight AIs are always inactive. Returns the updated AI with `is_insight_active` set to `true`. Activating an already-active AI succeeds and changes nothing. Fails with `400` if the target AI is not `type=insight`.\n", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the AI. Returned from the `GET /ais` response." } ], "responses": { "200": { "description": "Insight AI activated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAI" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/ais/{id}/direct-hash-regenerate": { "post": { "summary": "Regenerate direct hash for AI", "description": "Regenerates the direct hash for the specified AI. If no direct hash exists, one is created. Returns the updated AI with the new direct_hash.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the AI. Returned from the `GET /ais` response." } ], "responses": { "200": { "description": "Direct hash regenerated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAI" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/ais/{id}/prompt_histories": { "get": { "summary": "List AI prompt history entries.", "description": "Returns a paginated list of historical init_prompt values for the specified AI, newest first.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the AI. Returned from the `GET /ais` response." }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of AI prompt history entries.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerAIPromptHistory" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/ais/{id}/prompt_histories/{history_id}": { "get": { "summary": "Get a single AI prompt history entry.", "description": "Retrieves a specific historical init_prompt entry by its ID.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the AI. Returned from the `GET /ais` response." }, { "name": "history_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the prompt history entry. Returned from the `GET /ais/{id}/prompt_histories` response." } ], "responses": { "200": { "description": "Details of the requested prompt history entry.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAIPromptHistory" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/ais/{id}/participants": { "get": { "summary": "List AI calls an AI agent participated in", "description": "Retrieves a paginated list of AI calls in which the specified AI agent participated.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "22222222-2222-2222-2222-222222222222" }, "description": "The unique identifier of the AI agent. Returned from the `POST /ais` or `GET /ais` response." }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A paginated list of participation records for the specified AI agent.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerParticipant" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/ais": { "get": { "summary": "Gets a list of ais.", "description": "Retrieves a paginated list of ais.", "tags": [ "AI" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of ais.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerAI" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new ai.", "description": "Creates a new ai and returns the created ai's details.", "tags": [ "AI" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "type": { "type": "string", "enum": [ "normal", "insight" ], "description": "AI type. `normal` (default) is a general-purpose AI. `insight` restricts the AI to the Insight tool set and uses a dedicated system prompt.", "example": "normal" }, "engine_model": { "$ref": "#/components/schemas/AIManagerAIEngineModel" }, "parameter": { "type": "object", "additionalProperties": true, "description": "Data associated with the ai's engine, can be dynamic and vary based on the engine type." }, "engine_key": { "type": "string", "description": "API key or credential for the AI engine." }, "rag_id": { "type": "string", "description": "The knowledge base ID (UUID) for the search_knowledge tool. Returned from the `id` field of the `GET /rags` response. Send empty string or omit to clear." }, "init_prompt": { "type": "string" }, "tts_type": { "type": "string", "description": "Text-to-speech engine type." }, "tts_voice_id": { "type": "string", "description": "Voice ID for the text-to-speech engine." }, "stt_type": { "type": "string", "description": "Speech-to-text engine type." }, "stt_language": { "type": "string", "description": "STT language in BCP-47 format (e.g., ko-KR, en-US).", "example": "en-US" }, "vad_config": { "$ref": "#/components/schemas/AIManagerVADConfig", "description": "Voice Activity Detection configuration. All fields are optional." }, "tool_names": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerToolName" }, "description": "List of tool names to enable for this AI. Use [\"all\"] to enable all available tools. For type=insight AIs, only Insight tool names are permitted (currently: get_contact_interactions, get_conversation_content); type=normal AIs may use any Normal tool name or [\"all\"]. Mismatched combinations are rejected with a 400." }, "auto_aicall_audit_enabled": { "type": "boolean", "description": "When true, any finished AICall involving this AI is audited automatically.", "example": false } }, "required": [ "name", "detail", "engine_model", "parameter", "engine_key", "init_prompt", "tts_type", "tts_voice_id", "stt_type" ] } } } }, "responses": { "200": { "description": "Details of the created ai.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAI" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aisummaries/{id}": { "get": { "summary": "Get ai summary details.", "description": "Retrieves detailed information for a specific ai summary by its ID.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the ai summary." } ], "responses": { "200": { "description": "Details of the requested ai summary.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerSummary" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a ai summary.", "description": "Deletes an existing ai summary by its ID.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the ai." } ], "responses": { "200": { "description": "AI successfully deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerSummary" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aisummaries": { "get": { "summary": "Gets a list of ai summaries.", "description": "Retrieves a paginated list of ai summaries.", "tags": [ "AI" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of ai summaries.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerSummary" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new ai summary.", "description": "Creates a new ai summary and returns the created ai summary's details.", "tags": [ "AI" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "on_end_flow_id": { "type": "string", "description": "The ID of the flow to be executed when the ai summary ends." }, "reference_type": { "$ref": "#/components/schemas/AIManagerSummaryReferenceType" }, "reference_id": { "type": "string", "description": "The ID of the reference for the ai summary." }, "language": { "type": "string", "description": "The language of the ai summary." } }, "required": [ "on_end_flow_id", "reference_type", "reference_id", "language" ] } } } }, "responses": { "200": { "description": "Details of the created ai summary.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerSummary" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aiaudits/{id}": { "get": { "summary": "Get an AI audit by ID.", "description": "Returns a single AI audit record.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The AI audit ID." } ], "responses": { "200": { "description": "The AI audit record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAIAudit" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete an AI audit.", "description": "Soft-deletes an AI audit record. The associated aicall is not affected.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The AI audit ID." } ], "responses": { "200": { "description": "The deleted AI audit record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAIAudit" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aiaudits": { "get": { "summary": "Gets a list of AI audits.", "description": "Retrieves a paginated list of AI audit records for the authenticated customer.", "tags": [ "AI" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "aicall_id", "in": "query", "schema": { "type": "string", "format": "uuid" }, "description": "Filter by AI call ID." }, { "name": "ai_id", "in": "query", "schema": { "type": "string", "format": "uuid" }, "description": "Filter by AI ID." } ], "responses": { "200": { "description": "A list of AI audits.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerAIAudit" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Trigger an AI audit for a completed AI call.", "description": "Evaluates each AI participant in the specified call asynchronously using Gemini. Returns 202 Accepted immediately; poll GET /aiaudits/{id} for completion.\n", "tags": [ "AI" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "aicall_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The ID of the AI call to audit." }, "language": { "type": "string", "description": "BCP47 language code for audit output (e.g. \"en-US\", \"ko-KR\"). Defaults to the call's stt_language or \"en-US\"." } }, "required": [ "aicall_id" ] } } } }, "responses": { "202": { "description": "Audit jobs accepted and running in background.", "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerAIAudit" } } } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aipromptproposals/{id}": { "get": { "summary": "Get an AI prompt proposal by ID.", "description": "Returns a single AI prompt proposal record.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The AI prompt proposal ID." } ], "responses": { "200": { "description": "The AI prompt proposal record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAIPromptProposal" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete an AI prompt proposal.", "description": "Soft-deletes an AI prompt proposal record.", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The AI prompt proposal ID." } ], "responses": { "200": { "description": "The deleted AI prompt proposal record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAIPromptProposal" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aipromptproposals/{id}/accept": { "post": { "summary": "Accept and apply an AI prompt proposal.", "description": "Promotes the proposal's `proposed_prompt` to the AI's current prompt. Only allowed when status is `completed` and the basis prompt has not drifted. On success, returns the updated proposal with `status=accepted` and `applied_prompt_history_id` set.\n", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The AI prompt proposal ID." } ], "responses": { "200": { "description": "The accepted AI prompt proposal record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAIPromptProposal" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aipromptproposals/{id}/reject": { "post": { "summary": "Reject an AI prompt proposal.", "description": "Marks the proposal as `rejected` without applying it. Only allowed when status is `completed`.\n", "tags": [ "AI" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The AI prompt proposal ID." } ], "responses": { "200": { "description": "The rejected AI prompt proposal record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAIPromptProposal" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aipromptproposals": { "get": { "summary": "Gets a list of AI prompt proposals.", "description": "Retrieves a paginated list of AI prompt proposal records for the authenticated customer.", "tags": [ "AI" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "ai_id", "in": "query", "schema": { "type": "string", "format": "uuid" }, "description": "Filter by AI ID." }, { "name": "status", "in": "query", "schema": { "type": "string" }, "description": "Filter by proposal status (progressing, completed, failed, accepted, rejected, expired)." } ], "responses": { "200": { "description": "A list of AI prompt proposals.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerAIPromptProposal" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Propose an improved AI prompt based on selected audits.", "description": "Generates a prompt improvement proposal asynchronously using Gemini, based on the selected completed audits. Returns 202 Accepted immediately with status `progressing`; poll GET /aipromptproposals/{id} for completion. All selected audits must belong to the same AI and reference the AI's current prompt version.\n", "tags": [ "AI" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "ai_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The AI participant whose prompt should be improved." }, "audit_ids": { "type": "array", "minItems": 1, "items": { "type": "string", "format": "uuid", "x-go-type": "string" }, "description": "The completed AI audits to use as evidence for the proposal." }, "language": { "type": "string", "description": "BCP47 language code for proposal output (e.g. \"en-US\", \"ko-KR\"). Defaults to \"en-US\"." } }, "required": [ "ai_id", "audit_ids" ] } } } }, "responses": { "202": { "description": "Proposal accepted and running in background.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAIPromptProposal" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/teams/{id}": { "get": { "summary": "Get team details.", "description": "Retrieves detailed information for a specific team by its ID.", "tags": [ "Team" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the team." } ], "responses": { "200": { "description": "Details of the requested team.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerTeam" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a team.", "description": "Deletes an existing team by its ID.", "tags": [ "Team" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the team." } ], "responses": { "200": { "description": "Team successfully deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerTeam" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a team.", "description": "Updates an existing team's details and returns the updated information.", "tags": [ "Team" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the team." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the team.", "example": "Customer Support Team" }, "detail": { "type": "string", "description": "Detailed description of the team.", "example": "Multi-agent team for handling customer inquiries" }, "start_member_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The member ID that starts the conversation. Must reference one of the members in the members array.", "example": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" }, "members": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerTeamMember" }, "minItems": 1, "description": "List of team members forming the graph nodes." }, "parameter": { "type": "object", "additionalProperties": true, "description": "Custom key-value parameter data for the team. Supports flow variable substitution at runtime.", "example": { "language": "en-US", "department": "support" } } }, "required": [ "name", "detail", "start_member_id", "members" ] } } } }, "responses": { "200": { "description": "Details of the updated team.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerTeam" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/teams/{id}/direct-hash-regenerate": { "post": { "summary": "Regenerate direct hash for team", "description": "Regenerates the direct hash for the specified team. If no direct hash exists, one is created. Returns the updated team with the new direct_hash.", "tags": [ "Team" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the team. Returned from the `GET /teams` response." } ], "responses": { "200": { "description": "Direct hash regenerated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerTeam" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/teams": { "get": { "summary": "Gets a list of teams.", "description": "Retrieves a paginated list of teams.", "tags": [ "Team" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of teams.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerTeam" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new team.", "description": "Creates a new team that composes multiple AI members into a directed graph for Pipecat Flows.", "tags": [ "Team" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the team.", "example": "Customer Support Team" }, "detail": { "type": "string", "description": "Detailed description of the team.", "example": "Multi-agent team for handling customer inquiries" }, "start_member_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The member ID that starts the conversation. Must reference one of the members in the members array.", "example": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" }, "members": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerTeamMember" }, "minItems": 1, "description": "List of team members forming the graph nodes. Must contain at least one member." }, "parameter": { "type": "object", "additionalProperties": true, "description": "Custom key-value parameter data for the team. Supports flow variable substitution at runtime.", "example": { "language": "en-US", "department": "support" } } }, "required": [ "name", "detail", "start_member_id", "members" ] } } } }, "responses": { "200": { "description": "Details of the created team.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerTeam" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/webchat_widgets": { "get": { "summary": "Get a list of webchat widgets.", "description": "Retrieves a paginated list of webchat widgets for the authenticated customer.", "tags": [ "Webchat" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of webchat widgets.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/WebchatManagerWidget" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new webchat widget.", "description": "Creates a new webchat widget configuration. Also issues a direct hash for anonymous visitor authentication.", "tags": [ "Webchat" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the widget.", "example": "Support Widget" }, "session_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Fires once per Session, at session creation/start. Returned from the `POST /flows` or `GET /flows` response.", "example": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" }, "message_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Optional. Fires on every inbound message, independently. Returned from the `POST /flows` or `GET /flows` response.", "example": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" }, "session_idle_timeout": { "type": "integer", "description": "Session idle timeout in seconds before the session is automatically ended. Defaults to 1800 (30 minutes) when omitted.", "example": 1800 }, "theme_config": { "$ref": "#/components/schemas/WebchatManagerWidgetThemeConfig" } }, "required": [ "name", "session_flow_id" ] } } } }, "responses": { "200": { "description": "Details of the created widget.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebchatManagerWidget" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/webchat_widgets/{id}": { "get": { "summary": "Get webchat widget details.", "description": "Retrieves detailed information for a specific webchat widget by its ID.", "tags": [ "Webchat" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the widget. Returned from the `POST /widgets` response." } ], "responses": { "200": { "description": "Details of the requested widget.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebchatManagerWidget" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a webchat widget.", "description": "Updates an existing webchat widget's basic info and returns the updated resource.", "tags": [ "Webchat" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the widget. Returned from the `POST /widgets` response." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the widget.", "example": "Support Widget" }, "session_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Fires once per Session, at session creation/start. Returned from the `POST /flows` or `GET /flows` response.", "example": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" }, "message_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Optional. Fires on every inbound message, independently. Returned from the `POST /flows` or `GET /flows` response.", "example": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" }, "session_idle_timeout": { "type": "integer", "description": "Session idle timeout in seconds before the session is automatically ended.", "example": 1800 }, "theme_config": { "$ref": "#/components/schemas/WebchatManagerWidgetThemeConfig" } }, "required": [ "name", "session_flow_id" ] } } } }, "responses": { "200": { "description": "Details of the updated widget.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebchatManagerWidget" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a webchat widget.", "description": "Deletes an existing webchat widget by its ID. Cascades to revoke the associated direct hash.", "tags": [ "Webchat" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the widget. Returned from the `POST /widgets` response." } ], "responses": { "200": { "description": "Widget successfully deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebchatManagerWidget" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/webchat_widgets/{id}/direct_hash_regenerate": { "post": { "summary": "Regenerate direct hash for a webchat widget.", "description": "Regenerates the direct hash used for anonymous visitor authentication on the specified widget. If no direct hash exists, one is created.", "tags": [ "Webchat" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the widget. Returned from the `POST /widgets` response." } ], "responses": { "200": { "description": "Direct hash regenerated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebchatManagerWidget" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/webchat_sessions": { "get": { "summary": "Get a list of webchat sessions.", "description": "Retrieves a paginated list of webchat sessions for the authenticated customer.", "tags": [ "Webchat" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "widget_id", "in": "query", "required": false, "schema": { "type": "string", "format": "uuid" }, "description": "Filter sessions to those belonging to this widget. Returned from the `POST /webchat_widgets` or `GET /webchat_widgets` response.", "example": "550e8400-e29b-41d4-a716-446655440000" } ], "responses": { "200": { "description": "A list of webchat sessions.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/WebchatManagerSession" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new webchat session.", "description": "Creates a new webchat visitor session for the given widget. Always creates a brand-new session.", "tags": [ "Webchat" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "widget_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The widget to create the session for. Returned from the `POST /widgets` or `GET /widgets` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "page_url": { "type": "string", "maxLength": 2048, "description": "The URL of the page the widget was embedded on when this session was created. Captured client-side from window.location.href at session-creation time; not re-captured on subsequent navigation within the same session.", "example": "https://example.com/pricing" }, "referrer": { "type": "string", "maxLength": 2048, "description": "document.referrer at session-creation time -- the page the visitor was on immediately before arriving at the page that embeds the widget. Distinct from page_url (the page the widget is currently embedded on). Captured client-side; not re-captured on subsequent navigation within the same session.", "example": "https://example.com/blog/some-article" } }, "required": [ "widget_id" ] } } } }, "responses": { "200": { "description": "Details of the created session.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebchatManagerSession" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/webchat_sessions/{id}": { "get": { "summary": "Get webchat session details.", "description": "Retrieves detailed information for a specific webchat session by its ID.", "tags": [ "Webchat" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the session. Returned from the `POST /sessions` response." } ], "responses": { "200": { "description": "Details of the requested session.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebchatManagerSession" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a webchat session.", "description": "Deletes an existing webchat session by its ID.", "tags": [ "Webchat" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the session. Returned from the `POST /sessions` response." } ], "responses": { "200": { "description": "Session successfully deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebchatManagerSession" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/webchat_sessions/{id}/end": { "post": { "summary": "End a webchat session.", "description": "Explicitly ends an active webchat session and returns the updated resource.", "tags": [ "Webchat" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the session. Returned from the `POST /sessions` response." } ], "responses": { "200": { "description": "Session ended successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebchatManagerSession" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/webchat_messages": { "get": { "summary": "Get a list of webchat messages.", "description": "Retrieves a paginated list of webchat messages for the authenticated customer.", "tags": [ "Webchat" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "session_id", "in": "query", "required": false, "schema": { "type": "string", "format": "uuid" }, "description": "Filter messages to those belonging to this session. Returned from the `POST /webchat_sessions` or `GET /webchat_sessions` response.", "example": "7a1bcb1a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" } ], "responses": { "200": { "description": "A list of webchat messages.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/WebchatManagerMessage" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new webchat message.", "description": "Creates (sends) a new message on a webchat session. Used for agent/API-authored outbound replies.", "tags": [ "Webchat" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "session_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The session to send the message on. Returned from the `POST /sessions` or `GET /sessions` response.", "example": "7a1bcb1a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "direction": { "$ref": "#/components/schemas/WebchatManagerMessageDirection", "description": "The direction of the message.", "example": "outbound" }, "text": { "type": "string", "description": "The text content of the message.", "example": "Thanks for reaching out! How can we help?" } }, "required": [ "session_id", "direction", "text" ] } } } }, "responses": { "200": { "description": "Details of the created message.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebchatManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/webchat_messages/{id}": { "get": { "summary": "Get webchat message details.", "description": "Retrieves detailed information for a specific webchat message by its ID.", "tags": [ "Webchat" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the message. Returned from the `POST /messages` response." } ], "responses": { "200": { "description": "Details of the requested message.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebchatManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a webchat message.", "description": "Deletes an existing webchat message by its ID.", "tags": [ "Webchat" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the message. Returned from the `POST /messages` response." } ], "responses": { "200": { "description": "Message successfully deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebchatManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/auth/boot": { "post": { "summary": "Generate a resource-scoped JWT from a direct hash.", "description": "Resolves a direct hash link and returns a resource-scoped JWT token. The token grants\nlimited access to specific resource types associated with the direct hash (e.g., aicall\nfor an AI direct hash). This endpoint is unauthenticated — the direct hash acts as the\ncredential.\n", "tags": [ "Auth" ], "operationId": "postAuthBoot", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestBodyAuthBootPOST" } } } }, "responses": { "200": { "description": "Resource-scoped JWT generated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthBootResponse" } } } }, "400": { "description": "Bad request. Possible causes:\n- `direct_hash` is missing or empty.\n- The direct hash format is invalid.\n- The direct hash does not resolve to any resource.\n" } } } }, "/auth/signup": { "post": { "summary": "Create a new customer account (self-service signup).", "description": "Initiates a new customer account registration. The request must include `accepted_tos: true`\nto confirm Terms of Service agreement.\n\nOn success, returns a customer object and a provisioned access key. On failure (e.g., duplicate email),\nstill returns HTTP 200 with an empty body to prevent email enumeration attacks.\n\nAfter signup, the customer receives a verification email. Use `POST /auth/email-verify` with the\ntoken from the email to verify the account.\n", "tags": [ "Auth" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestBodyAuthSignupPOST" } } } }, "responses": { "200": { "description": "Signup initiated successfully, or silently ignored if the email already exists (to prevent enumeration).\nOn success, the response contains the customer object and a provisioned access key.\nOn failure, the response body is an empty JSON object `{}`.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerSignupResult" } } } }, "400": { "description": "Bad request. Possible causes:\n- `accepted_tos` is `false` or missing.\n- `email` is missing.\n- Request body is malformed JSON.\n" } } } }, "/auth/email-verify": { "post": { "summary": "Verify customer email address.", "description": "Validates the email verification token sent to the customer's email during signup.\nOn success, the customer's email is marked as verified and an access key is provisioned.\n\nThe `token` is a 64-character lowercase hexadecimal string included in the verification email.\n", "tags": [ "Auth" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestBodyAuthEmailVerifyPOST" } } } }, "responses": { "200": { "description": "Email verified successfully. Returns the customer and a provisioned access key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerEmailVerifyResult" } } } }, "400": { "description": "Bad request. Possible causes:\n- Token is invalid, expired, or already used.\n- Request body is malformed JSON.\n- `token` field is missing.\n" } } } }, "/auth/unregister": { "post": { "summary": "Schedule or immediately execute account deletion (self-service).", "description": "Marks the authenticated customer's account for deletion. The account enters 'frozen' state immediately.\nActive calls are terminated and new operations are blocked.\n\nBy default, the customer has 30 days to recover via `DELETE /auth/unregister` before permanent deletion.\n\nIf `immediate` is set to `true`, the account is frozen and then permanently deleted (PII anonymized,\nall resources cascade-deleted) in a single request. This cannot be undone.\n\nExactly one of `password` or `confirmation_phrase` must be provided:\n- Password-based accounts: provide `password` for re-authentication.\n- SSO or API-key authenticated requests: provide `confirmation_phrase` set to `\"DELETE\"`.\n", "tags": [ "Auth" ], "parameters": [ { "name": "accesskey", "in": "query", "required": false, "schema": { "type": "string" }, "description": "API access key token. Returned from the `GET /accesskeys` response. Alternative to Bearer token authentication." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestBodyAuthUnregisterPOST" } } } }, "responses": { "200": { "description": "Account frozen successfully (or deleted if `immediate` was `true`).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomer" } } } }, "400": { "description": "Bad request. Possible causes:\n- Neither `password` nor `confirmation_phrase` was provided.\n- Both `password` and `confirmation_phrase` were provided (exactly one required).\n- Password validation failed.\n- `confirmation_phrase` is not `\"DELETE\"`.\n" }, "401": { "description": "Authentication failed. Invalid or missing access key / bearer token." } } }, "delete": { "summary": "Cancel account deletion (self-service recover).", "description": "Cancels a scheduled deletion and restores the authenticated customer's account to active state.\nOnly works during the 30-day grace period while the account is in 'frozen' status.\nNo request body required.\n", "tags": [ "Auth" ], "parameters": [ { "name": "accesskey", "in": "query", "required": false, "schema": { "type": "string" }, "description": "API access key token. Returned from the `GET /accesskeys` response. Alternative to Bearer token authentication." } ], "responses": { "200": { "description": "Account recovered successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomer" } } } }, "400": { "description": "Recovery failed. Account may not be in frozen state." }, "401": { "description": "Authentication failed. Invalid or missing access key / bearer token." } } } }, "/auth/password-forgot": { "post": { "summary": "Request a password reset email.", "description": "Generates a password reset token and sends an email to the agent with a reset link.\nThe link expires in 1 hour.\n\nAlways returns HTTP 200 regardless of whether the username exists, to prevent\nusername enumeration attacks.\n\nThis endpoint is unauthenticated. Use `POST /auth/password-reset` with the token\nfrom the email to complete the reset.\n", "tags": [ "Auth" ], "operationId": "postAuthPasswordForgot", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestBodyAuthPasswordForgotPOST" } } } }, "responses": { "200": { "description": "Request accepted. A reset email will be sent if the username exists.\nAlways returns 200 to prevent username enumeration.\n", "content": { "application/json": { "schema": { "type": "object" } } } }, "400": { "description": "Bad request. Possible causes:\n- `username` is missing.\n- Request body is malformed JSON.\n" } } } }, "/auth/password-reset": { "get": { "summary": "Serve the password reset form (browser redirect target).", "description": "Returns an HTML page containing the password reset form. This endpoint is\nthe link target embedded in the reset email sent by `POST /auth/password-forgot`.\n\nThe `token` query parameter must be a 64-character lowercase hex string.\nAn invalid or missing token returns HTTP 400.\n\nThis endpoint is unauthenticated and intended for browser use only.\nTo perform the actual password update, the form submits to `POST /auth/password-reset`.\n", "tags": [ "Auth" ], "operationId": "getAuthPasswordReset", "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "pattern": "^[0-9a-f]{64}$", "example": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6abcd" }, "description": "64-character lowercase hexadecimal password reset token from the reset email." } ], "responses": { "200": { "description": "HTML password reset form rendered successfully.", "content": { "text/html": { "schema": { "type": "string" } } } }, "400": { "description": "Token is missing, not 64 lowercase hex characters, or otherwise invalid." } } }, "post": { "summary": "Reset agent password using a reset token.", "description": "Validates the password reset token (received via email from `POST /auth/password-forgot`)\nand updates the agent's password.\n\nThe token is single-use and expires in 1 hour. Guest agents cannot reset their password.\n\nThis endpoint is unauthenticated. The reset token acts as proof of identity.\n", "tags": [ "Auth" ], "operationId": "postAuthPasswordReset", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestBodyAuthPasswordResetPOST" } } } }, "responses": { "200": { "description": "Password updated successfully.", "content": { "application/json": { "schema": { "type": "object" } } } }, "400": { "description": "Bad request. Possible causes:\n- `token` is missing, invalid, or expired (tokens expire after 1 hour).\n- `password` is missing or fewer than 8 characters.\n- Request body is malformed JSON.\n" } } } }, "/available_numbers": { "get": { "summary": "List available numbers", "description": "Get available phone numbers for the specified country or virtual numbers.", "tags": [ "Number" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "name": "country_code", "in": "query", "description": "The ISO country code. Required when type is not virtual.", "schema": { "type": "string" } }, { "name": "type", "in": "query", "description": "The type of available numbers to retrieve (normal or virtual). Defaults to normal.", "schema": { "$ref": "#/components/schemas/NumberManagerNumberType" } } ], "responses": { "200": { "description": "A list of available phone numbers.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/NumberManagerAvailableNumber" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/billing_account": { "get": { "summary": "Get billing account info", "description": "Retrieve the billing account of the authenticated customer. The billing account is automatically resolved from the authenticated user's customer record.", "tags": [ "Billing" ], "responses": { "200": { "description": "The billing account information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingManagerAccount" } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update billing account", "description": "Update the billing account name and detail of the authenticated customer.", "tags": [ "Billing" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The display name of the billing account.", "example": "Production Account" }, "detail": { "type": "string", "description": "A human-readable note describing the purpose of this account.", "example": "Main billing account for production services" } } } } } }, "responses": { "200": { "description": "Successfully updated billing account.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingManagerAccount" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/billing_account/payment_info": { "put": { "summary": "Update billing account payment info", "description": "Update the payment type and method of the authenticated customer's billing account.", "tags": [ "Billing" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "payment_type": { "description": "The type of payment for the account.", "example": "prepaid", "$ref": "#/components/schemas/BillingManagerAccountPaymentType" }, "payment_method": { "description": "The method of payment for the account.", "example": "credit card", "$ref": "#/components/schemas/BillingManagerAccountPaymentMethod" } } } } } }, "responses": { "200": { "description": "Successfully updated billing account payment info.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingManagerAccount" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/billing_account/paddle_portal_session": { "post": { "operationId": "postBillingAccountPaddlePortalSession", "summary": "Create Paddle portal session", "description": "Generate a Paddle Customer Portal session URL for the authenticated customer to manage their subscription. The customer must have an active Paddle subscription linked to their billing account.", "tags": [ "Billing" ], "responses": { "200": { "description": "Successfully created portal session.", "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "The Paddle Customer Portal URL. Valid for a limited time.", "example": "https://customer-portal.paddle.com/cpl_session_abc123" } } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/billing_accounts": { "get": { "summary": "Get list of billing accounts", "description": "Returns a list of all billing accounts. Requires project super admin permission.", "tags": [ "Billing" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "Successfully retrieved billing accounts list.", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_page_token": { "type": "string", "description": "Token for the next page of results.", "example": "2026-01-15T09:30:00.000000Z" }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/BillingManagerAccountAdmin" } } } } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/billing_accounts/{id}": { "get": { "summary": "Get detailed billing account info", "description": "Returns detailed billing account info for the given ID.", "tags": [ "Billing" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the billing account." } ], "responses": { "200": { "description": "Successfully retrieved billing account info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingManagerAccountAdmin" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update billing account", "description": "Updates the billing account information for the given ID.", "tags": [ "Billing" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the billing account." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" } } } } } }, "responses": { "200": { "description": "Successfully updated billing account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingManagerAccountAdmin" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/billing_accounts/{id}/payment_info": { "put": { "summary": "Update billing account's payment info", "description": "Updates the payment info for the given billing account ID.", "tags": [ "Billing" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the billing account." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "payment_type": { "$ref": "#/components/schemas/BillingManagerAccountPaymentType" }, "payment_method": { "$ref": "#/components/schemas/BillingManagerAccountPaymentMethod" } } } } } }, "responses": { "200": { "description": "Successfully updated billing account payment info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingManagerAccountAdmin" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/billing_accounts/{id}/balance_add_force": { "post": { "summary": "Add balance to billing account", "description": "Adds the given balance to the billing account.", "tags": [ "Billing" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the billing account." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "balance": { "type": "number", "format": "float" } } } } } }, "responses": { "200": { "description": "Successfully added balance to the billing account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingManagerAccount" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/billing_accounts/{id}/balance_subtract_force": { "post": { "summary": "Subtract balance from billing account", "description": "Subtracts the given balance from the billing account.", "tags": [ "Billing" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the billing account." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "balance": { "type": "number", "format": "float" } } } } } }, "responses": { "200": { "description": "Successfully subtracted balance from the billing account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingManagerAccount" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/billings": { "get": { "summary": "Get list of billings", "description": "Retrieve a list of the customer's billings.", "tags": [ "Billing" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of billings.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/BillingManagerBilling" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/billings/{billing-id}": { "get": { "summary": "Get a billing record by ID", "description": "Retrieves a single billing record by its unique identifier. Returns only the billing record without related account or reference resource data.", "tags": [ "Billing" ], "parameters": [ { "name": "billing-id", "in": "path", "required": true, "description": "The unique identifier of the billing record", "schema": { "type": "string", "format": "uuid" }, "example": "550e8400-e29b-41d4-a716-446655440000" } ], "responses": { "200": { "description": "Successfully retrieved billing record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingManagerBilling" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/calls/{id}/recording_start": { "post": { "summary": "Start call recording", "description": "Initiate recording for the specified call.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the call" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "format": { "description": "The format of the recording.", "type": "string", "enum": [ "wav" ] }, "end_of_silence": { "description": "The duration of silence (in seconds) after which the recording will be stopped.", "type": "integer" }, "end_of_key": { "description": "The key that will stop the recording.", "type": "string" }, "duration": { "description": "The maximum duration of the recording (in seconds).", "type": "integer" }, "on_end_flow_id": { "description": "The ID of the flow to be executed when the recording ends.", "type": "string" } }, "required": [ "format", "end_of_silence", "end_of_key", "duration", "on_end_flow_id" ] } } } }, "responses": { "200": { "description": "Detailed call information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerCall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/calls/{id}/recording_stop": { "post": { "summary": "Stop call recording", "description": "Stop the ongoing recording for the specified call.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the call" } ], "responses": { "200": { "description": "Detailed call information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerCall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/calls/{id}/hangup": { "post": { "summary": "Hang up the call", "description": "Ends the call.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The result of the hangup action.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerCall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/calls/{id}/hold": { "post": { "summary": "Hold the call", "description": "Puts the specified call on hold.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The result of the hold action." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } }, "delete": { "summary": "Unhold the call", "description": "Removes the hold status on the call.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The result of the unhold action." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/calls/{id}/media_stream": { "get": { "summary": "Get media stream for the call", "description": "Retrieve the media stream information for a specific call. WebSocket endpoint — only handshake-time errors are reported via HTTP status. Errors after the connection upgrades to WebSocket are signaled via close frames and are not in HTTP scope.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the call", "schema": { "type": "string" } }, { "encapsulation": null, "name": "encapsulation", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Media stream information retrieved successfully" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/calls/{id}/moh": { "post": { "summary": "Enable Music on Hold (MOH)", "description": "Activates Music on Hold for the call.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The result of the MOH activation." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } }, "delete": { "summary": "Disable Music on Hold (MOH)", "description": "Deactivates Music on Hold for the call.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The result of the MOH deactivation." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/calls/{id}/mute": { "post": { "summary": "Mute the call", "description": "Mutes the specified call.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "direction": { "$ref": "#/components/schemas/CallManagerCallMuteDirection" } } } } } }, "responses": { "200": { "description": "The result of the mute action." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } }, "delete": { "summary": "Unmute the call", "description": "Unmutes the specified call.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "direction": { "$ref": "#/components/schemas/CallManagerCallMuteDirection" } } } } } }, "responses": { "200": { "description": "The result of the unmute action." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/calls/{id}/silence": { "post": { "summary": "Silence a call", "description": "Mute the audio stream for the specified call.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the call", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Call silenced successfully" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } }, "delete": { "summary": "Un-silence a call", "description": "Unmute the audio stream for the specified call.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the call", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Call un-silenced successfully" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/calls/{id}/talk": { "post": { "summary": "Talk to the call", "description": "Initiates a talking action to the call.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "string" }, "language": { "type": "string" }, "provider": { "type": "string", "description": "TTS provider to use (gcp or aws). If empty, defaults to GCP. If the selected provider fails, the system falls back to the alternative provider with the default voice for the language." }, "voice_id": { "type": "string", "description": "Provider-specific voice ID. If empty, uses the default voice for the given language. On fallback, the voice_id is reset to the alternative provider's default." } } } } } }, "responses": { "200": { "description": "The result of the talk action." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/calls/{id}": { "get": { "summary": "Get detail call info", "description": "Returns detailed information about the specified call.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Detailed call information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerCall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } }, "delete": { "summary": "Delete up the call", "description": "Delete the call", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The result of the deleted call info.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerCall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/calls": { "get": { "summary": "Get list of calls", "description": "Returns a list of calls for the given customer.", "tags": [ "Call" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of calls.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/CallManagerCall" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Make an outbound call", "description": "Creates a temporary flow and initiates a call with the specified flow.", "tags": [ "Call" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The flow to execute for this call. The flow ID returned from the POST /flows or GET /flows response. Provide either flow_id or actions. If both are supplied, flow_id takes precedence and actions is ignored.", "example": "f1a2b3c4-d5e6-7890-1234-567890abcdef" }, "actions": { "type": "array", "minItems": 1, "items": { "$ref": "#/components/schemas/FlowManagerAction" }, "description": "Inline flow actions used to build an ephemeral flow for this call. Provide either flow_id or actions. Ignored if flow_id is set." }, "source": { "$ref": "#/components/schemas/CommonAddress" }, "destinations": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" } }, "anonymous": { "type": "string", "enum": [ "yes", "no", "auto" ], "example": "auto", "description": "Controls anonymous caller ID for outbound PSTN calls. \"yes\" — always send anonymous caller ID (RFC 3323 Privacy header). \"no\" — never anonymize, always show real caller ID. \"auto\" — inherit from incoming call's Privacy header (default).\n" }, "variables": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Optional flat key-value context seeded into the new call's flow as runtime variables, readable in the flow via ${key}. String values only. Reserved keys starting with 'voipbin.' are ignored. Max 100 keys, 64KB total, 32KB per value.\n", "example": { "campaign_id": "summer-2026", "customer_name": "Jane Doe" } } } } } } }, "responses": { "200": { "description": "The details of the created call.", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "calls": { "type": "array", "items": { "$ref": "#/components/schemas/CallManagerCall" } }, "groupcalls": { "type": "array", "items": { "$ref": "#/components/schemas/CallManagerGroupcall" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/campaigncalls/{id}": { "get": { "summary": "Get campaign call details", "description": "Retrieve detailed information for a specific campaign call.", "tags": [ "Campaign" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the campaign call", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Detailed information for the specified campaign call", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerCampaigncall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a campaign call", "description": "Deletes an existing campaign call.", "tags": [ "Campaign" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the campaign call to delete", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Campaign call deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerCampaigncall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/campaigncalls": { "get": { "summary": "Get list of campaign calls", "description": "Retrieve a list of campaign calls for a given customer.", "tags": [ "Campaign" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of campaign calls", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/CampaignManagerCampaigncall" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/campaigns/{id}/actions": { "put": { "summary": "Update campaign's actions", "description": "Updates the actions of a specific campaign and return the updated campaign info.", "tags": [ "Campaign" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the campaign" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "actions": { "type": "array", "items": { "$ref": "#/components/schemas/FlowManagerAction" } } }, "required": [ "actions" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerCampaign" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/campaigns/{id}/campaigncalls": { "get": { "summary": "Update campaign's actions", "description": "Updates the actions of a specific campaign and return the updated campaign info.", "tags": [ "Campaign" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the campaign" }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of campaigns.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/CampaignManagerCampaigncall" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/campaigns/{id}/next_campaign_id": { "put": { "summary": "Update campaign's service level", "description": "Updates the sevice level of a specific campaign and return the updated campaign info.", "tags": [ "Campaign" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the campaign" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "next_campaign_id": { "type": "string", "description": "The next campaign's id." } }, "required": [ "next_campaign_id" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerCampaign" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/campaigns/{id}/resource_info": { "put": { "summary": "Update campaign's resource info", "description": "Updates the resource info of a specific campaign and return the updated campaign info.", "tags": [ "Campaign" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the campaign" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "outplan_id": { "type": "string", "description": "outplan's id." }, "outdial_id": { "type": "string", "description": "outplan's id." }, "queue_id": { "type": "string", "description": "queue's id." }, "next_campaign_id": { "type": "string", "description": "next campaign's id." } }, "required": [ "outplan_id", "outdial_id", "queue_id", "next_campaign_id" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerCampaign" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/campaigns/{id}/service_level": { "put": { "summary": "Update campaign's service level", "description": "Updates the sevice level of a specific campaign and return the updated campaign info.", "tags": [ "Campaign" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the campaign" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "service_level": { "type": "integer", "description": "The campaign's service level." } }, "required": [ "service_level" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerCampaign" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/campaigns/{id}/status": { "put": { "summary": "Update campaign status", "description": "Updates the status of a specific campaign.", "tags": [ "Campaign" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the campaign" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/CampaignManagerCampaignStatus" } }, "required": [ "status" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerCampaign" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/campaigns/{id}": { "get": { "summary": "Get campaign details", "description": "Retrieves detailed information about a specific campaign by its ID.", "tags": [ "Campaign" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the campaign" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerCampaign" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a campaign", "description": "Updates the details of an existing campaign and returns the updated campaign.", "tags": [ "Campaign" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the campaign" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Updated name of the campaign" }, "detail": { "type": "string", "description": "Updated details of the campaign" }, "type": { "$ref": "#/components/schemas/CampaignManagerCampaignType" }, "service_level": { "type": "integer", "description": "Updated service level of the campaign" }, "end_handle": { "$ref": "#/components/schemas/CampaignManagerCampaignEndHandle" } }, "required": [ "name", "detail", "type", "service_level", "end_handle" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerCampaign" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a campaign", "description": "Deletes a campaign by its ID.", "tags": [ "Campaign" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "ID of the campaign" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerCampaign" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/campaigns": { "get": { "summary": "Get a list of campaigns", "description": "Retrieves a paginated list of campaigns.", "tags": [ "Campaign" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of campaigns.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/CampaignManagerCampaign" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new campaign", "description": "Creates a new campaign with the provided details and returns the created campaign.", "tags": [ "Campaign" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the campaign" }, "detail": { "type": "string", "description": "Detailed description of the campaign" }, "type": { "$ref": "#/components/schemas/CampaignManagerCampaignType" }, "service_level": { "type": "integer", "description": "Service level of the campaign" }, "end_handle": { "$ref": "#/components/schemas/CampaignManagerCampaignEndHandle" }, "actions": { "type": "array", "description": "Actions associated with the campaign", "items": { "$ref": "#/components/schemas/FlowManagerAction" } }, "outplan_id": { "type": "string", "description": "Outplan ID for the campaign" }, "outdial_id": { "type": "string", "description": "Outdial ID for the campaign" }, "queue_id": { "type": "string", "description": "Queue ID for the campaign" }, "next_campaign_id": { "type": "string", "description": "ID of the next campaign" } }, "required": [ "name", "detail", "type", "service_level", "end_handle", "actions", "outplan_id", "outdial_id", "queue_id", "next_campaign_id" ] } } } }, "responses": { "200": { "description": "Successfully subtracted balance from the billing account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerCampaign" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conferencecalls/{id}": { "get": { "summary": "Get conference call details", "description": "Retrieve detailed information about a specific conference call using its ID.", "tags": [ "Conference" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conferencecall." } ], "responses": { "200": { "description": "Detailed information about a conference call.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConferenceManagerConferencecall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Remove a conference call", "description": "Remove a specific conference call from the system by its ID.", "tags": [ "Conference" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conferencecall to delete." } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConferenceManagerConferencecall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conferencecalls": { "get": { "summary": "Get list of conference calls", "description": "Retrieve a paginated list of conference calls for the authenticated customer.", "tags": [ "Conference" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of conference calls.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/ConferenceManagerConferencecall" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conferences/{id}/media_stream": { "get": { "summary": "Start media streaming for a conference", "description": "Start the in/out media streaming of the specified conference.", "tags": [ "Conference" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conference" }, { "name": "encapsulation", "in": "query", "required": true, "schema": { "type": "string" }, "description": "The encapsulation for media stream.", "example": "mediasocket" } ], "responses": { "200": { "description": "Media streaming started successfully." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conferences/{id}/recording_start": { "post": { "summary": "Start conference recording", "description": "Initiate recording for the specified conference.", "tags": [ "Conference" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conference" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "format": { "description": "The format of the recording.", "type": "string", "enum": [ "wav" ] }, "duration": { "description": "The maximum duration of the recording (in seconds).", "type": "integer" }, "on_end_flow_id": { "description": "The ID of the flow to be executed when the recording ends.", "type": "string" } }, "required": [ "format", "duration", "on_end_flow_id" ] } } } }, "responses": { "200": { "description": "Recording started successfully." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conferences/{id}/recording_stop": { "post": { "summary": "Stop conference recording", "description": "Stop the ongoing recording for the specified conference.", "tags": [ "Conference" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conference" } ], "responses": { "200": { "description": "Recording stopped successfully." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conferences/{id}/transcribe_start": { "post": { "summary": "Start conference transcription", "description": "Begin transcription for the specified conference.", "tags": [ "Conference" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conference" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "language": { "type": "string", "description": "The language for transcription.", "example": "en-US" } }, "required": [ "language" ] } } } }, "responses": { "200": { "description": "Transcription started successfully." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conferences/{id}/transcribe_stop": { "post": { "summary": "Stop conference transcription", "description": "Stop the ongoing transcription for the specified conference.", "tags": [ "Conference" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conference" } ], "responses": { "200": { "description": "Transcription stopped successfully." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conferences/{id}/direct-hash-regenerate": { "post": { "summary": "Regenerate direct hash for conference", "description": "Regenerates the direct hash for the specified conference. If no direct hash exists, one is created. Returns the updated conference with the new direct_hash.", "tags": [ "Conference" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the conference. Returned from the `GET /conferences` response." } ], "responses": { "200": { "description": "Direct hash regenerated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConferenceManagerConference" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conferences/{id}": { "get": { "summary": "Get conference details", "description": "Retrieve detailed information about a specific conference.", "tags": [ "Conference" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conference" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConferenceManagerConference" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update conference details", "description": "Update the details of a specific conference.", "tags": [ "Conference" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conference" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "data": { "type": "object", "description": "Custom data associated with the conference.", "additionalProperties": true }, "timeout": { "type": "integer" }, "pre_flow_id": { "type": "string" }, "post_flow_id": { "type": "string" } }, "required": [ "name", "detail", "data", "timeout", "pre_flow_id", "post_flow_id" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConferenceManagerConference" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a conference", "description": "Delete a specific conference. All participants will be removed.", "tags": [ "Conference" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conference" } ], "responses": { "200": { "description": "Conference deleted successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConferenceManagerConference" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conferences": { "get": { "summary": "Get list of conferences", "description": "Retrieve a paginated list of conferences for the customer.", "tags": [ "Conference" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of conferences.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/ConferenceManagerConference" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new conference", "description": "Create a new conference with the provided details.", "tags": [ "Conference" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/ConferenceManagerConferenceType" }, "id": { "type": "string" }, "name": { "type": "string" }, "detail": { "type": "string" }, "timeout": { "type": "integer" }, "data": { "type": "object", "description": "Custom data associated with the conference.", "additionalProperties": true }, "pre_flow_id": { "type": "string" }, "post_flow_id": { "type": "string" } }, "required": [ "type", "name", "detail", "timeout", "data", "pre_flow_id", "post_flow_id" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConferenceManagerConference" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contact_addresses": { "get": { "summary": "List contact addresses", "description": "Get a list of contact addresses. Optionally filter by contact_id and/or type.", "tags": [ "Contact" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "contact_id", "in": "query", "required": false, "description": "Filter by contact ID.", "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000001" } }, { "name": "type", "in": "query", "required": false, "description": "Filter by address type.", "schema": { "type": "string", "enum": [ "tel", "email", "web_session" ], "example": "tel" } }, { "name": "unresolved", "in": "query", "required": false, "description": "When true, list only unresolved addresses (contact_id IS NULL) for the customer — the pool of addresses not yet attached to any contact. Mutually exclusive with contact_id; if both are given, unresolved=true wins and contact_id is ignored.", "schema": { "type": "boolean", "example": true } }, { "name": "target", "in": "query", "required": false, "description": "Filter by exact address target value (E.164 for tel, email address for email).", "schema": { "type": "string", "example": "+155****4567" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/ContactManagerAddress" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a contact address", "description": "Create a new address (tel or email) for a contact. If contact_id is omitted, creates an unresolved address (not yet attached to any contact) for the authenticated customer's unresolved pool; such an address cannot be primary.", "tags": [ "Contact" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "type", "target" ], "properties": { "contact_id": { "type": "string", "format": "uuid", "description": "The ID of the contact to add the address to. Omit to create an unresolved address in the customer's unresolved pool.", "example": "5e4a0680-eba3-4001-a000-000000000001" }, "type": { "type": "string", "enum": [ "tel", "email", "web_session" ], "description": "Address type. 'tel' for phone numbers, 'email' for email addresses, 'web_session' for a webchat visitor's continuity token (temporary/internal attribution address; not exposed on the Contact.Addresses field).", "example": "tel" }, "target": { "type": "string", "description": "The address value. E.164 format for tel, email address for email.", "example": "+155****4567" }, "name": { "type": "string", "description": "Optional human-readable label for this address.", "example": "Main Office" }, "detail": { "type": "string", "description": "Optional free-form notes about this address.", "example": "Primary contact number" }, "is_primary": { "type": "boolean", "description": "Whether this is the primary address for the contact.", "example": true } } } } } }, "responses": { "201": { "description": "Address created successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerAddress" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contact_addresses/{id}": { "get": { "summary": "Get a contact address", "description": "Get a single contact address by ID.", "tags": [ "Contact" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact address.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000002" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerAddress" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a contact address", "description": "Update an existing contact address.", "tags": [ "Contact" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact address.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000002" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "target": { "type": "string", "description": "The updated address value. E.164 format for tel, email address for email.", "example": "+155****9999" }, "name": { "type": "string", "description": "Optional human-readable label for this address.", "example": "Main Office" }, "detail": { "type": "string", "description": "Optional free-form notes about this address.", "example": "Primary contact number" }, "is_primary": { "type": "boolean", "description": "Whether this is the primary address for the contact.", "example": true } } } } } }, "responses": { "200": { "description": "Address updated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerAddress" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a contact address", "description": "Delete a contact address by ID.", "tags": [ "Contact" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact address.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000002" } } ], "responses": { "200": { "description": "Address deleted successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerAddress" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contact_addresses/{id}/claim": { "post": { "summary": "Claim an unresolved contact address", "description": "Attaches a currently-unresolved contact address (contact_id is NULL) to the given contact. Idempotent if already claimed by the same contact.\nDefault behavior (force absent or false): unchanged from before — returns 409 (Conflict) if the address is already claimed by a different, still-active (non-tombstoned) contact. Existing callers are unaffected.\nforce: true (new): if the address is already claimed by a different, still-active contact, the claim overwrites that ownership instead of returning 409 — the previous owner's open ownership period is closed and a new one is opened for the requesting contact. Addresses owned by a tombstoned (soft-deleted) contact are repaired in place exactly as before, regardless of force.", "tags": [ "Contact" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact address to claim.", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "contact_id" ], "properties": { "contact_id": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000001" }, "force": { "type": "boolean", "description": "When true, overwrite ownership even if the address is currently claimed by a different, still-active contact (no 409). Defaults to false, which preserves the original claim behavior. Has no effect when the address is unresolved or already owned by the requesting contact.", "example": false, "default": false } } } } } }, "responses": { "200": { "description": "Address claimed successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerAddress" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contacts": { "get": { "summary": "List contacts", "description": "Get contacts for the customer.", "tags": [ "Contact" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/ContactManagerContact" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new contact", "description": "Create a new contact for the customer.", "tags": [ "Contact" ], "requestBody": { "description": "Request body to create a new contact.", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "first_name": { "type": "string" }, "last_name": { "type": "string" }, "display_name": { "type": "string" }, "company": { "type": "string" }, "job_title": { "type": "string" }, "source": { "type": "string", "enum": [ "manual", "import", "api", "sync" ] }, "external_id": { "type": "string" }, "notes": { "type": "string" }, "addresses": { "type": "array", "description": "List of addresses (tel or email) to associate with the contact.", "items": { "allOf": [ { "$ref": "#/components/schemas/CommonAddress" }, { "type": "object", "properties": { "is_primary": { "type": "boolean", "description": "Whether this is the primary address of its type." } } } ] } }, "tag_ids": { "type": "array", "items": { "type": "string", "format": "uuid" } } } } } } }, "responses": { "201": { "description": "Contact created successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contacts/lookup": { "get": { "summary": "Lookup contact", "description": "Find a contact by phone number or email.", "tags": [ "Contact" ], "parameters": [ { "name": "phone", "in": "query", "description": "Phone number in E.164 format to lookup.", "required": false, "schema": { "type": "string" } }, { "name": "email", "in": "query", "description": "Email address to lookup.", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Contact found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contacts/{id}": { "get": { "summary": "Get the contact", "description": "Get the contact of the given ID.", "tags": [ "Contact" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a contact", "description": "Update a contact and return updated details.", "tags": [ "Contact" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "first_name": { "type": "string" }, "last_name": { "type": "string" }, "display_name": { "type": "string" }, "company": { "type": "string" }, "job_title": { "type": "string" }, "external_id": { "type": "string" }, "notes": { "type": "string" } } } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete the contact", "description": "Delete the contact of the given ID.", "tags": [ "Contact" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contacts/{id}/addresses": { "post": { "summary": "Add address to contact", "description": "Add a new address (tel or email) to the contact.", "tags": [ "Contact" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000001" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "type", "target" ], "properties": { "type": { "type": "string", "enum": [ "tel", "email" ], "description": "Address type. 'tel' for phone numbers, 'email' for email addresses.", "example": "tel" }, "target": { "type": "string", "description": "The address value. E.164 format for tel, email address for email.", "example": "+155****4567" }, "name": { "type": "string", "description": "Optional human-readable label for this address.", "example": "Main Office" }, "detail": { "type": "string", "description": "Optional free-form notes about this address.", "example": "Primary contact number" }, "is_primary": { "type": "boolean", "description": "Whether this is the primary address for the given type.", "example": true } } } } } }, "responses": { "200": { "description": "Address added successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contacts/{id}/addresses/{address_id}": { "put": { "summary": "Update address on contact", "description": "Update an existing address on the contact.", "tags": [ "Contact" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000001" } }, { "name": "address_id", "in": "path", "description": "The ID of the address returned from POST /contacts/{id}/addresses.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000002" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "target": { "type": "string", "description": "The updated address value. E.164 format for tel, email address for email.", "example": "+155****9999" }, "name": { "type": "string", "description": "Optional human-readable label for this address.", "example": "Main Office" }, "detail": { "type": "string", "description": "Optional free-form notes about this address.", "example": "Primary contact number" }, "is_primary": { "type": "boolean", "description": "Whether this is the primary address for the given type.", "example": true } } } } } }, "responses": { "200": { "description": "Address updated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Remove address from contact", "description": "Remove an address from the contact.", "tags": [ "Contact" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000001" } }, { "name": "address_id", "in": "path", "description": "The ID of the address returned from POST /contacts/{id}/addresses.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000002" } } ], "responses": { "200": { "description": "Address removed successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contacts/{id}/tags": { "post": { "summary": "Add tag to contact", "description": "Add a tag to the contact.", "tags": [ "Contact" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "tag_id" ], "properties": { "tag_id": { "type": "string", "format": "uuid" } } } } } }, "responses": { "200": { "description": "Tag added successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contacts/{id}/tags/{tag_id}": { "delete": { "summary": "Remove tag from contact", "description": "Remove a tag from the contact.", "tags": [ "Contact" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string" } }, { "name": "tag_id", "in": "path", "description": "The ID of the tag.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Tag removed successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contact_interactions": { "get": { "summary": "List interactions", "description": "List CRM interactions for the customer. Exactly one filter is required:\npeer_type + peer_target (remote endpoint), contact_id, or address_id.\n\nThe response is the raw, unmodified peer_events shape (design doc\n2026-07-25-contact-interaction-retire-to-peer-events, §8.1/§9): rows may\ninclude internal-resource peer types (agent, ai, conference, sip legs)\nwith no CRM eligibility filtering or field reshaping applied.\n", "tags": [ "Interaction" ], "parameters": [ { "name": "peer_type", "in": "query", "description": "Remote endpoint type (e.g. \"tel\", \"email\"). Required with peer_target.", "schema": { "type": "string", "example": "tel" } }, { "name": "peer_target", "in": "query", "description": "Remote endpoint target (e.g. \"+15551234567\"). Required with peer_type.", "schema": { "type": "string", "example": "+15551234567" } }, { "name": "contact_id", "in": "query", "description": "Filter by resolved contact ID.", "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } }, { "name": "address_id", "in": "query", "description": "Filter by contact address ID.", "schema": { "type": "string", "format": "uuid", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" } }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TimelineManagerPeerEventListResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contact_peer_events": { "get": { "summary": "List peer_events (raw, unfiltered)", "description": "List raw peer_events rows for the customer, matching either a contact's\nregistered addresses (contact_id) or a single peer address\n(peer_type + peer_target). Exactly one filter is required.\n\nUnlike GET /contact_interactions, this endpoint applies NO identity\nresolution and NO CRM eligibility filtering: rows may include\ninternal-resource peer types (agent, ai, conference, sip legs) that\n/contact_interactions deliberately excludes. Clients are responsible for\nany presentation-layer filtering or grouping of this noise.\n", "tags": [ "Interaction" ], "parameters": [ { "name": "contact_id", "in": "query", "description": "Filter by all of a contact's registered addresses. Exactly one of contact_id or peer_type+peer_target is required.", "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } }, { "name": "peer_type", "in": "query", "description": "Remote endpoint type (e.g. \"tel\", \"email\"). Required with peer_target.", "schema": { "type": "string", "example": "tel" } }, { "name": "peer_target", "in": "query", "description": "Remote endpoint target (e.g. \"+155****4567\"). Required with peer_type.", "schema": { "type": "string", "example": "+155****4567" } }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TimelineManagerPeerEventListResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contact_cases": { "get": { "summary": "List cases", "description": "List cases for the customer, optionally filtered by status, owner_type,\nowner_id, contact_id, and reference_id.\n", "tags": [ "Case" ], "parameters": [ { "name": "status", "in": "query", "description": "Filter by case status.", "schema": { "type": "string", "enum": [ "open", "closed" ], "example": "open" } }, { "name": "reference_id", "in": "query", "description": "Filter to cases whose reference_id (the internal VoIPBin resource ID reference_type points at, e.g. a call ID) exactly matches this value.", "schema": { "type": "string", "example": "1fe1356f-3f7f-4ff9-9d33-08136b38f506" } }, { "name": "owner_type", "in": "query", "description": "Filter by owner type.", "schema": { "type": "string", "example": "agent" } }, { "name": "owner_id", "in": "query", "description": "Filter by owner ID.", "schema": { "type": "string", "format": "uuid", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" } }, { "name": "contact_id", "in": "query", "description": "Filter to cases attributed to this Contact.", "schema": { "type": "string", "format": "uuid", "example": "b2c3d4e5-f6a7-8901-bcde-f12345678901" } }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCaseListResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contact_cases/unresolved": { "get": { "summary": "List unresolved cases", "description": "List unresolved cases (open, contact_id IS NULL) for the authenticated\ncaller's customer.\n", "tags": [ "Case" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCaseListResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contact_cases/{id}": { "get": { "summary": "Get a case", "description": "Get the case of the given ID.", "tags": [ "Case" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the case. The ID is returned from GET /v1.0/contact_cases response.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCase" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Attach or detach a case's contact", "description": "Attaches the case to a specific existing Contact, or detaches it,\nvia a direct contact_id write (VOIP-1253). Send a non-empty\ncontact_id to attach; send an empty string to detach (mirrors\nbin-conference-manager's pre_flow_id/post_flow_id PUT convention at\nthe HTTP-layer JSON-schema level -- see §5.5.1 for the precise\nconversion point; a literal empty string is only ever accepted at\nthis outer HTTP layer, never at the internal RPC-layer uuid.UUID\nstruct). The target\ncontact_id must belong to the same customer as the case; a\ncross-tenant contact_id is rejected as not found. Every\nattach/detach is recorded as a case_contact_attributed/\ncase_contact_detached event, queryable via bin-timeline-manager's\naudit log (no separate resolution history endpoint needed).\n", "tags": [ "Case" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "contact_id" ], "properties": { "contact_id": { "type": "string", "description": "The contact to attach. Empty string detaches. Deliberately NOT format: uuid (round-6 correction) -- see §5.5.1: the hand-written internal RPC struct's uuid.UUID field cannot unmarshal a literal empty string, so the HTTP-layer oapi-codegen-generated field must stay a plain string and the \"\" -> uuid.Nil conversion happens explicitly in the PutContactCasesId handler, mirroring PutConferencesId/pre_flow_id's existing pattern exactly.", "example": "660e8400-e29b-41d4-a716-446655440001" } } } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCase" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contact_cases/{id}/close": { "post": { "summary": "Close a case", "description": "Close a case. closed_by_id is derived server-side from the\nauthenticated caller's own agent identity -- there is no request\nbody -- so the closing-agent attribution the platform treats as a\nhard invariant cannot be forged by supplying an arbitrary agent_id.\nReturns the actually-persisted state, including already_closed\nsemantics reflected via the returned closed_reason / closed_by_type /\nclosed_by_id fields when the case had already been closed by\nsomeone/something else.\n", "tags": [ "Case" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the case. The ID is returned from GET /v1.0/contact_cases response.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } } ], "responses": { "200": { "description": "Case closed successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCase" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contact_cases/{id}/continue": { "post": { "summary": "Continue a closed case", "description": "Create a new, open case that continues a previously closed case, chained\nvia previous_case_id.\n", "tags": [ "Case" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the (closed) case to continue. The ID is returned from GET /v1.0/contact_cases response.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } } ], "responses": { "200": { "description": "New case created (or existing open case reused) successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCase" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contact_cases/{id}/notes": { "get": { "summary": "List notes for a case", "description": "List all notes for the case of the given ID. Notes are an internal,\nagent-facing annotation on a Case and never appear in any\ncustomer-facing webhook or response.\n", "tags": [ "Case" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the case. The ID is returned from GET /v1.0/contact_cases response.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCaseNoteListResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a note on a case", "description": "Create a new note on the case of the given ID. Notes are an internal,\nagent-facing annotation on a Case and never appear in any\ncustomer-facing webhook or response.\n", "tags": [ "Case" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the case. The ID is returned from GET /v1.0/contact_cases response.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "author_type", "text" ], "properties": { "author_type": { "type": "string", "description": "Type of the note's author.", "enum": [ "agent", "system" ], "example": "agent" }, "author_id": { "type": "string", "format": "uuid", "description": "ID of the agent authoring this note. Nullable for system-authored notes.", "example": "2a2ec0ba-8004-11ec-aea5-439829c92a7c" }, "text": { "type": "string", "description": "The note's text content.", "example": "Called the customer back, no answer." } } } } } }, "responses": { "200": { "description": "Case note created successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCaseNote" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contact_cases/{id}/notes/{note_id}": { "delete": { "summary": "Delete a case note", "description": "Delete the note of the given note ID on the case of the given case ID.\n", "tags": [ "Case" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the case. The ID is returned from GET /v1.0/contact_cases response.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } }, { "name": "note_id", "in": "path", "description": "The ID of the note. The ID is returned from GET /v1.0/contact_cases/{id}/notes response.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "33333333-0000-0000-0000-000000000003" } } ], "responses": { "200": { "description": "Case note deleted successfully.", "content": { "application/json": { "schema": { "type": "object" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/contact_cases/{id}/messages": { "post": { "summary": "Send a message from a case", "description": "Send a message from a known, open case with an explicit source and\ndestination address (design §4.5). Validation order:\n 1. Case validation -- case belongs to the calling customer and is\n status=open (closed cases must be reopened via POST\n /v1.0/contact_cases/{id}/continue first).\n 2. Destination-to-case binding -- destination must be attributable\n to this specific case (matched Contact's addresses, or the\n case's bare peer_target when unresolved). Failure of either\n sub-check returns the same generic error, by design, to prevent\n a caller from using case_id as a bare capability token to probe\n which binding sub-case failed.\n 3. Source-ownership validation -- source must be an active, normal\n number owned by this case's customer.\nThe message is sent through the same underlying conversation-message\nsend path as POST /v1.0/service_agents/conversations/{id}/messages,\nreusing the ConversationManagerMessage response schema.\n", "tags": [ "Case" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the case. The ID is returned from GET /v1.0/contact_cases response.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "source", "destination", "text" ], "properties": { "source": { "type": "string", "description": "The business's own number to send from. Must be an active, normal number owned by this case's customer.", "example": "+15551234567" }, "destination": { "type": "string", "description": "The customer's number to send to. Must be attributable to this case (the matched Contact's address, or the case's peer_target).", "example": "+15559876543" }, "text": { "type": "string", "description": "The text content of the message.", "example": "Thanks for reaching out -- following up on your request." } } } } } }, "responses": { "200": { "description": "The details of the sent message.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conversation_accounts/{id}": { "get": { "summary": "Get details of a conversation account", "description": "Fetches details of the conversation account specified by ID.", "tags": [ "Conversation" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conversation account." } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationManagerAccount" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a conversation account", "description": "Updates the details of the conversation account specified by ID.", "tags": [ "Conversation" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conversation account." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "secret": { "type": "string" }, "token": { "type": "string" }, "provider_data": { "$ref": "#/components/schemas/ConversationManagerAccountProviderData" }, "message_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string" } } } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationManagerAccount" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a conversation account", "description": "Deletes the conversation account specified by ID.", "tags": [ "Conversation" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conversation account." } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationManagerAccount" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conversation_accounts": { "get": { "summary": "Gets a list of conversation accounts", "description": "Fetches a paginated list of conversation accounts.", "tags": [ "Conversation" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of conversation accounts.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/ConversationManagerAccount" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new conversation account", "description": "Creates a new conversation account and returns its details.", "tags": [ "Conversation" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/ConversationManagerAccountType" }, "name": { "type": "string" }, "detail": { "type": "string" }, "secret": { "type": "string" }, "token": { "type": "string" }, "provider_data": { "$ref": "#/components/schemas/ConversationManagerAccountProviderData" }, "message_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string" } }, "required": [ "type", "name", "detail", "secret", "token" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationManagerAccount" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conversations/{id}/messages": { "get": { "summary": "Gets a list of conversation messages", "description": "Gets a paginated list of messages for a specific conversation.", "tags": [ "Conversation" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conversation." } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/ConversationManagerMessage" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Send a message", "description": "Sends a message to a specific conversation and returns the sent message info.", "tags": [ "Conversation" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conversation." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "string", "description": "The message text." }, "medias": { "type": "array", "items": { "$ref": "#/components/schemas/ConversationManagerMedia" } } }, "required": [ "text", "medias" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conversations/{id}/unassign": { "post": { "summary": "Unassign the conversation", "description": "Removes the current owner from the conversation. Admin and manager callers may unassign any\nconversation. The owning agent may unassign themselves. Returns 403 if the caller is neither\nan admin/manager nor the current owner.\n", "tags": [ "Conversation" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "828e75ba-ed24-11ec-bbf2-7f0e56ac76f1" }, "description": "The unique identifier of the conversation. Returned from the `GET /conversations` response." } ], "responses": { "200": { "description": "Conversation after unassignment.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationManagerConversation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conversations/{id}": { "get": { "summary": "Returns detailed conversation info", "description": "Returns detailed information about a specific conversation by its ID.", "tags": [ "Conversation" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conversation." } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationManagerConversation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update conversation info", "description": "Updates the details of a specific conversation by its ID.", "tags": [ "Conversation" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conversation." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "owner_type": { "type": "string" }, "owner_id": { "type": "string" }, "name": { "type": "string" }, "detail": { "type": "string" } } } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationManagerConversation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/conversations": { "get": { "summary": "Gets a list of conversations", "description": "Gets a list of conversations with pagination. Filters can be provided in the request body.", "tags": [ "Conversation" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "in": "query", "name": "owner_id", "required": false, "schema": { "type": "string", "format": "uuid", "example": "eb1ac5c0-ff63-47e2-bcdb-5da9c336eb4b" }, "description": "Filter conversations by the agent currently owning (assigned to) them. When set to a\nnon-nil UUID, only conversations whose ``owner_id`` matches that UUID are returned.\nOmitting the parameter — or passing the nil UUID (``00000000-0000-0000-0000-000000000000``)\n— disables the filter and returns all conversations visible to the caller.\n\nPermission rule: an agent caller (non-admin, non-manager) MUST set ``owner_id`` to their\nown agent ID; otherwise the request is rejected with 403. Admin and manager callers may\npass any ``owner_id`` or omit the filter entirely.\n" } ], "requestBody": { "description": "Optional filters for searching conversations", "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "customer_id": { "type": "string", "format": "uuid", "description": "Filter by customer ID" }, "account_id": { "type": "string", "format": "uuid", "description": "Filter by account ID" }, "dialog_id": { "type": "string", "description": "Filter by dialog ID" }, "type": { "type": "string", "enum": [ "message", "line" ], "description": "Filter by conversation type" }, "deleted": { "type": "boolean", "description": "Include deleted conversations if true" } } }, "examples": { "filterByCustomer": { "summary": "Filter by customer", "value": { "customer_id": "64a3cbd8-e863-11ec-85de-1bcd09d3872e", "deleted": false } } } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/ConversationManagerConversation" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/customer/metadata": { "put": { "summary": "Update customer metadata", "description": "Update the metadata configuration for the authenticated customer's account.", "tags": [ "Customer" ], "requestBody": { "description": "Customer metadata update payload", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "rtp_debug": { "type": "boolean", "description": "When set to `true`, RTPEngine captures RTP traffic as PCAP files for this customer's calls.\nDefault is `false`. Enabling this increases storage usage — disable after debugging.\n", "example": true } } } } } }, "responses": { "200": { "description": "The updated customer information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomer" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/customer/billing_account_id": { "put": { "summary": "Update a customer's billing account ID", "description": "Modify the billing account ID associated with a customer.", "tags": [ "Customer" ], "requestBody": { "description": "Billing account update payload", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "billing_account_id": { "type": "string", "description": "The new billing account ID for the customer." } }, "required": [ "billing_account_id" ] } } } }, "responses": { "200": { "description": "The updated customer billing account information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomer" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/customer": { "get": { "summary": "Get customer info", "description": "Retrieve the information of the customer.", "tags": [ "Customer" ], "responses": { "200": { "description": "The customer information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomer" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a customer", "description": "Update the information of a customer and retrieve the updated details.", "tags": [ "Customer" ], "requestBody": { "description": "Customer update payload", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The new name of the customer." }, "detail": { "type": "string", "description": "Additional details about the customer." }, "email": { "type": "string", "description": "The customer's email address." }, "phone_number": { "type": "string", "description": "The customer's phone number." }, "address": { "type": "string", "description": "The customer's address." }, "webhook_method": { "$ref": "#/components/schemas/CustomerManagerCustomerWebhookMethod" }, "webhook_uri": { "type": "string", "description": "Webhook URI." } }, "required": [ "name", "detail", "email", "phone_number", "address", "webhook_method", "webhook_uri" ] } } } }, "responses": { "200": { "description": "The updated customer information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomer" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/customers/{id}/freeze": { "post": { "summary": "Schedule customer deletion (freeze account).", "description": "Marks the customer for deletion. The account enters 'frozen' state immediately.\nActive calls are terminated and new operations are blocked.\nThe customer has 30 days to recover before permanent deletion.\nAdmin-only endpoint.\n", "tags": [ "Customer" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomerAdmin" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/customers/{id}/recover": { "post": { "summary": "Cancel customer deletion (recover account).", "description": "Cancels a scheduled deletion and restores the account to active state.\nOnly works during the 30-day grace period.\nAdmin-only endpoint.\n", "tags": [ "Customer" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomerAdmin" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/customers/{id}/billing_account_id": { "put": { "summary": "Update a customer's billing account ID.", "description": "Updates the billing account ID for a specific customer.", "tags": [ "Customer" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "billing_account_id": { "type": "string" } }, "required": [ "billing_account_id" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomerAdmin" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/customers/{id}/metadata": { "put": { "summary": "Update a customer's metadata.", "description": "Updates internal configuration flags for a customer account. Requires `ProjectSuperAdmin` permission.\nRegular users cannot access this endpoint. The response returns the full admin customer object\nincluding the updated metadata.\n", "tags": [ "Customer" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The unique identifier of the customer (UUID). Obtained from the `id` field of `GET /customers`.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerMetadata" } } } }, "responses": { "200": { "description": "The updated customer object with the new metadata applied.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomerAdmin" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/customers/{id}": { "get": { "summary": "Retrieve customer details.", "description": "Fetches detailed information about a specific customer by their ID.", "tags": [ "Customer" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomerAdmin" } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a customer.", "description": "Updates the details of an existing customer and returns the updated information.", "tags": [ "Customer" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "email": { "type": "string" }, "phone_number": { "type": "string" }, "address": { "type": "string" }, "webhook_method": { "$ref": "#/components/schemas/CustomerManagerCustomerWebhookMethod" }, "webhook_uri": { "type": "string" } }, "required": [ "name", "detail", "email", "phone_number", "address", "webhook_method", "webhook_uri" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomerAdmin" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a customer.", "description": "Removes a customer by their ID.", "tags": [ "Customer" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomerAdmin" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/customers": { "get": { "summary": "Gets a list of customers.", "description": "Retrieves a paginated list of customers.", "tags": [ "Customer" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of customers.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/CustomerManagerCustomerAdmin" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new customer.", "description": "Creates a new customer with the provided details and returns the created customer.", "tags": [ "Customer" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "email": { "type": "string" }, "phone_number": { "type": "string" }, "address": { "type": "string" }, "webhook_method": { "$ref": "#/components/schemas/CustomerManagerCustomerWebhookMethod" }, "webhook_uri": { "type": "string" } }, "required": [ "name", "detail", "email", "phone_number", "address", "webhook_method", "webhook_uri" ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomerAdmin" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/emails/{id}": { "get": { "summary": "Retrieve email details", "description": "Retrieves the details of a specific email by its ID.", "tags": [ "Email" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the email." } ], "responses": { "200": { "description": "The email details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailManagerEmail" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a email", "description": "Deletes an existing email by its ID.", "tags": [ "Email" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the email." } ], "responses": { "200": { "description": "The email was successfully deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailManagerEmail" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/emails": { "get": { "summary": "Retrieve a list of emails", "description": "Retrieves a paginated list of emails accessible to the authenticated agent.", "tags": [ "Email" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of emails.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/EmailManagerEmail" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Send an email", "description": "Send an email with the provided details and returns the created email's information.", "tags": [ "Email" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "destinations": { "description": "The email addresses to send the email to.", "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" } }, "subject": { "description": "The subject of the email.", "type": "string" }, "content": { "description": "The content of the email.", "type": "string" }, "attachments": { "description": "List of attachments to include in the email.", "type": "array", "items": { "$ref": "#/components/schemas/EmailManagerEmailAttachment" } } }, "required": [ "destinations", "subject", "content", "attachments" ] } } } }, "responses": { "200": { "description": "The created email details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailManagerEmail" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/extensions/{id}": { "get": { "summary": "Get extension details", "description": "Retrieves details of a specific extension by its ID.", "tags": [ "Extension" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the extension.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The extension details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrarManagerExtension" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update an extension", "description": "Updates an existing extension and returns the updated details.", "tags": [ "Extension" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the extension.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "password": { "type": "string" } }, "required": [ "name", "detail", "password" ] } } } }, "responses": { "200": { "description": "The updated extension.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrarManagerExtension" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete an extension", "description": "Deletes an existing extension by its ID.", "tags": [ "Extension" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the extension.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrarManagerExtension" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/extensions/{id}/direct-hash-regenerate": { "post": { "summary": "Regenerate direct hash for extension", "description": "Regenerates the direct hash for the specified extension. If no direct hash exists, one is created. Returns the updated extension with the new direct_hash.", "tags": [ "Extension" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the extension. Returned from the `GET /extensions` response." } ], "responses": { "200": { "description": "Direct hash regenerated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrarManagerExtension" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/extensions": { "get": { "summary": "Get a list of extensions", "description": "Retrieves a list of extensions.", "tags": [ "Extension" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of extensions.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/RegistrarManagerExtension" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new extension", "description": "Creates a new extension and returns its details.", "tags": [ "Extension" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "extension": { "type": "string" }, "password": { "type": "string" }, "name": { "type": "string" }, "detail": { "type": "string" } }, "required": [ "extension", "password", "name", "detail" ] } } } }, "responses": { "200": { "description": "The created extension.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrarManagerExtension" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/flows/{id}/direct-hash-regenerate": { "post": { "summary": "Regenerate direct hash for flow", "description": "Regenerates the direct hash for the specified flow. If no direct hash exists, one is created. Returns the updated flow with the new direct_hash.", "tags": [ "Flow" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the flow. Returned from the `GET /flows` response." } ], "responses": { "200": { "description": "Direct hash regenerated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlowManagerFlow" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/flows/{id}": { "get": { "summary": "Retrieve flow details", "description": "Retrieves the details of a specific flow by its ID.", "tags": [ "Flow" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the flow." } ], "responses": { "200": { "description": "The flow details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlowManagerFlow" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a flow", "description": "Updates the details of an existing flow and returns the updated information.", "tags": [ "Flow" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the flow." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "description": "The updated name of the flow.", "type": "string" }, "detail": { "description": "The updated details of the flow.", "type": "string" }, "actions": { "description": "Updated list of actions associated with the flow.", "type": "array", "items": { "$ref": "#/components/schemas/FlowManagerAction" } }, "on_complete_flow_id": { "description": "ID of the flow to be executed on completion.", "type": "string" } }, "required": [ "name", "detail", "actions" ] } } } }, "responses": { "200": { "description": "The updated flow details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlowManagerFlow" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a flow", "description": "Deletes an existing flow by its ID.", "tags": [ "Flow" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the flow." } ], "responses": { "200": { "description": "The flow was successfully deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlowManagerFlow" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/flows": { "get": { "summary": "Retrieve a list of flows", "description": "Retrieves a paginated list of flows accessible to the authenticated agent.", "tags": [ "Flow" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of flows.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/FlowManagerFlow" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new flow", "description": "Creates a new flow with the provided details and returns the created flow's information.", "tags": [ "Flow" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "description": "The name of the flow.", "type": "string" }, "detail": { "description": "Detailed information about the flow.", "type": "string" }, "actions": { "description": "List of actions associated with the flow.", "type": "array", "items": { "$ref": "#/components/schemas/FlowManagerAction" } }, "on_complete_flow_id": { "description": "The ID of the flow to execute upon completion.", "type": "string" } }, "required": [ "name", "detail", "actions" ] } } } }, "responses": { "200": { "description": "The created flow details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlowManagerFlow" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/groupcalls/{id}/hangup": { "post": { "summary": "Hangup the groupcall", "description": "Ends the groupcall with the specified ID.", "tags": [ "Groupcall" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the groupcall." } ], "responses": { "200": { "description": "The updated groupcall details after hangup.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerGroupcall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/groupcalls/{id}": { "get": { "summary": "Get detailed information of a groupcall", "description": "Returns the details of the groupcall with the specified ID.", "tags": [ "Groupcall" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the groupcall." } ], "responses": { "200": { "description": "The groupcall details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerGroupcall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } }, "delete": { "summary": "Delete a groupcall", "description": "Deletes the groupcall with the specified ID.", "tags": [ "Groupcall" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the groupcall." } ], "responses": { "200": { "description": "The deleted groupcall information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerGroupcall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/groupcalls": { "get": { "summary": "Get a list of groupcalls", "description": "Retrieves a list of groupcalls based on the provided parameters.", "tags": [ "Groupcall" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of groupcalls.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/CallManagerGroupcall" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new groupcall", "description": "Creates a new groupcall with the specified information and returns the created groupcall.", "tags": [ "Groupcall" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "description": "Provide either flow_id or actions. If both are set, flow_id takes precedence and actions is ignored.", "properties": { "source": { "$ref": "#/components/schemas/CommonAddress" }, "destinations": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" } }, "flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The flow to execute for the groupcall. Provide either flow_id or actions; if both are set, flow_id takes precedence and actions is ignored. The flow ID returned from the POST /flows or GET /flows response.", "example": "c1d2e3f4-a5b6-7890-cdef-1234567890ab" }, "actions": { "type": "array", "minItems": 1, "items": { "$ref": "#/components/schemas/FlowManagerAction" }, "description": "Inline actions used to build a temporary flow when flow_id is not provided. Provide either flow_id or actions." }, "ring_method": { "$ref": "#/components/schemas/CallManagerGroupcallRingMethod" }, "answer_method": { "$ref": "#/components/schemas/CallManagerGroupcallAnswerMethod" } }, "required": [ "source", "destinations", "ring_method", "answer_method" ] } } } }, "responses": { "200": { "description": "The created groupcall details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerGroupcall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/me": { "get": { "summary": "Get the logged-in agent", "description": "Retrieves the information of the currently logged-in agent.", "tags": [ "Me" ], "responses": { "200": { "description": "The logged-in agent's details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/messages/{id}": { "get": { "summary": "Get a message by ID", "description": "Retrieves the message of the given ID.", "tags": [ "Message" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the message." } ], "responses": { "200": { "description": "The message details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a message by ID", "description": "Deletes the message with the given ID and returns the deleted message.", "tags": [ "Message" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the message to delete." } ], "responses": { "200": { "description": "The deleted message details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/messages": { "get": { "summary": "List all messages", "description": "Retrieves a list of messages for the given customer.", "tags": [ "Message" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of messages.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/MessageManagerMessage" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Send a message and return the sent message", "description": "Sends a message with the provided information and returns the sent message details.", "tags": [ "Message" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "source": { "description": "The source of the message.", "$ref": "#/components/schemas/CommonAddress" }, "destinations": { "description": "List of destinations for the message.", "type": "array", "items": { "type": "string", "$ref": "#/components/schemas/CommonAddress" } }, "text": { "description": "The content of the message.", "type": "string" } }, "required": [ "source", "destinations", "text" ] } } } }, "responses": { "200": { "description": "The sent message details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/numbers/{id}/flow_ids": { "put": { "summary": "Update the order number's flow ID", "description": "Update the flow ID of the order number identified by the provided ID.", "tags": [ "Number" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the order number to update.", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "call_flow_id": { "description": "The ID of the updated call flow.", "type": "string" }, "message_flow_id": { "description": "The ID of the updated message flow.", "type": "string" } }, "required": [ "call_flow_id", "message_flow_id" ] } } } }, "responses": { "200": { "description": "The updated order number details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NumberManagerNumber" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/numbers/{id}": { "get": { "summary": "Get order number by ID", "description": "Get the details of the order number identified by the provided ID.", "tags": [ "Number" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the order number.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The details of the order number.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NumberManagerNumber" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete order number by ID", "description": "Delete the order number identified by the provided ID.", "tags": [ "Number" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the order number to delete.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The deleted order number details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NumberManagerNumber" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update order number by ID", "description": "Update the order number's details with the provided information.", "tags": [ "Number" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the order number to update.", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "call_flow_id": { "description": "The ID of the updated call flow.", "type": "string" }, "message_flow_id": { "description": "The ID of the updated message flow.", "type": "string" }, "name": { "description": "The updated name of the number.", "type": "string" }, "detail": { "description": "Updated details for the number.", "type": "string" } }, "required": [ "call_flow_id", "message_flow_id", "name", "detail" ] } } } }, "responses": { "200": { "description": "The updated order number details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NumberManagerNumber" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/numbers/{id}/metadata": { "put": { "summary": "Update a number's metadata.", "description": "Updates configuration flags for a number. Requires `CustomerAdmin` or `CustomerManager` permission.\nThe response returns the full number object including the updated metadata.\n", "tags": [ "Number" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The unique identifier of the number (UUID). Obtained from the `id` field of `GET /numbers`.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NumberManagerMetadata" } } } }, "responses": { "200": { "description": "The updated number object with the new metadata applied.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NumberManagerNumber" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/numbers": { "get": { "summary": "List order numbers", "description": "Get a list of order numbers based on the customer's information.", "tags": [ "Number" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of order numbers.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/NumberManagerNumber" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new number", "description": "Create a new order number and return the details of the created number.", "tags": [ "Number" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "number": { "description": "The phone number.", "type": "string" }, "type": { "$ref": "#/components/schemas/NumberManagerNumberType", "description": "The type of the number (normal or virtual). Defaults to normal." }, "call_flow_id": { "description": "The ID of the call flow.", "type": "string" }, "message_flow_id": { "description": "The ID of the message flow.", "type": "string" }, "name": { "description": "The name of the number.", "type": "string" }, "detail": { "description": "Additional details about the number.", "type": "string" } }, "required": [ "number", "call_flow_id", "message_flow_id", "name", "detail" ] } } } }, "responses": { "200": { "description": "The created order number details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NumberManagerNumber" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/numbers/renew": { "post": { "summary": "Renew the numbers", "description": "Renew the specified numbers and return the updated number details.", "tags": [ "Number" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "tm_renew": { "type": "string", "description": "The timestamp for renewing the number." } }, "required": [ "tm_renew" ] } } } }, "responses": { "200": { "description": "A list of renewed order numbers.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/NumberManagerNumber" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/outdials/{id}/campaign_id": { "put": { "summary": "Update an outdial's campaign ID.", "description": "Updates the campaign ID of the specified outdial and returns the updated outdial information.", "tags": [ "Outdial" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the outdial to update." } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "campaign_id": { "type": "string" } }, "required": [ "campaign_id" ] } } } }, "responses": { "200": { "description": "The updated outdial details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutdialManagerOutdial" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/outdials/{id}/data": { "put": { "summary": "Update an outdial's data.", "description": "Updates the data of the specified outdial and returns the updated outdial details.", "tags": [ "Outdial" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the outdial to update." } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "string" } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "The updated outdial details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutdialManagerOutdial" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/outdials/{id}/targets/{target_id}": { "get": { "summary": "Retrieve an outdial target by its ID.", "description": "Gets the details of a specific outdial target using its ID.", "tags": [ "Outdial" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the outdial." }, { "name": "target_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the outdial target." } ], "responses": { "200": { "description": "The outdial target details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutdialManagerOutdialtarget" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete an outdial target.", "description": "Deletes a specific outdial target based on its ID.", "tags": [ "Outdial" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the outdial to delete the target from." }, { "name": "target_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the target to delete." } ], "responses": { "200": { "description": "The result of the delete operation.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutdialManagerOutdialtarget" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/outdials/{id}/targets": { "get": { "summary": "Retrieve a list of outdial targets.", "description": "Gets a list of outdial targets based on the specified page size and page token.", "tags": [ "Outdial" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "id", "description": "The ID of the outdial to associate with the target.", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A list of outdial targets.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/OutdialManagerOutdialtarget" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new target for an outdial.", "description": "Creates a new target for the specified outdial and returns the created target information.", "tags": [ "Outdial" ], "parameters": [ { "name": "id", "description": "The ID of the outdial to associate with the target.", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "data": { "type": "string" }, "destination_0": { "$ref": "#/components/schemas/CommonAddress" }, "destination_1": { "$ref": "#/components/schemas/CommonAddress" }, "destination_2": { "$ref": "#/components/schemas/CommonAddress" }, "destination_3": { "$ref": "#/components/schemas/CommonAddress" }, "destination_4": { "$ref": "#/components/schemas/CommonAddress" } }, "required": [ "name", "detail", "data", "destination_0", "destination_1", "destination_2", "destination_3", "destination_4" ] } } } }, "responses": { "200": { "description": "The created outdial target details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutdialManagerOutdialtarget" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/outdials/{id}": { "get": { "summary": "Retrieve an outdial by its ID.", "description": "Returns detailed information of a specific outdial based on the provided ID.", "tags": [ "Outdial" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the outdial to retrieve." } ], "responses": { "200": { "description": "The outdial details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutdialManagerOutdial" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete an existing outdial.", "description": "Deletes an outdial specified by its ID.", "tags": [ "Outdial" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the outdial to delete." } ], "responses": { "200": { "description": "The result of the delete operation.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutdialManagerOutdial" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update an outdial.", "description": "Updates the specified outdial and returns the updated information.", "tags": [ "Outdial" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the outdial to update." } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" } }, "required": [ "name", "detail" ] } } } }, "responses": { "200": { "description": "The updated outdial details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutdialManagerOutdial" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/outdials": { "get": { "summary": "Retrieve a list of outdials.", "description": "Gets a list of outdials based on the specified page size and page token.", "tags": [ "Outdial" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of outdials.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/OutdialManagerOutdial" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new outdial.", "description": "Creates a new outdial with the specified information and returns the created outdial details.", "tags": [ "Outdial" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "campaign_id": { "type": "string" }, "name": { "type": "string" }, "detail": { "type": "string" }, "data": { "type": "string" } }, "required": [ "campaign_id", "name", "detail", "data" ] } } } }, "responses": { "200": { "description": "The created outdial details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutdialManagerOutdial" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/outplans/{id}/dial_info": { "put": { "summary": "Update dial information of an existing outplan.", "description": "Updates the dial information for the outplan specified by the given ID and returns the updated outplan.", "tags": [ "Outplan" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the outplan to update.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "source": { "$ref": "#/components/schemas/CommonAddress", "description": "The new source address." }, "dial_timeout": { "type": "integer", "description": "The new dial timeout in seconds." }, "try_interval": { "type": "integer", "description": "The new interval between retry attempts." }, "max_try_count_0": { "type": "integer", "description": "The new maximum retry count for destination 0." }, "max_try_count_1": { "type": "integer", "description": "The new maximum retry count for destination 1." }, "max_try_count_2": { "type": "integer", "description": "The new maximum retry count for destination 2." }, "max_try_count_3": { "type": "integer", "description": "The new maximum retry count for destination 3." }, "max_try_count_4": { "type": "integer", "description": "The new maximum retry count for destination 4." } }, "required": [ "source", "dial_timeout", "try_interval", "max_try_count_0", "max_try_count_1", "max_try_count_2", "max_try_count_3", "max_try_count_4" ] } } } }, "responses": { "200": { "description": "The updated outplan with new dial information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerOutplan" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/outplans/{id}": { "get": { "summary": "Retrieve outplan details by ID.", "description": "Retrieves the details of the specified outplan based on the given ID.", "tags": [ "Outplan" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The unique identifier of the outplan.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The requested outplan details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerOutplan" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete an existing outplan.", "description": "Deletes the outplan specified by the given ID.", "tags": [ "Outplan" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the outplan to delete.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully deleted the outplan.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerOutplan" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update dial information of an existing outplan.", "description": "Updates the dial information for the outplan specified by the given ID and returns the updated outplan.", "tags": [ "Outplan" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the outplan to update.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The new name of the outplan." }, "detail": { "type": "string", "description": "The new detail of the outplan." } }, "required": [ "name", "detail" ] } } } }, "responses": { "200": { "description": "The updated outplan with new dial information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerOutplan" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/outplans": { "get": { "summary": "Retrieve a list of outplans.", "description": "Retrieves a paginated list of outplans based on the provided parameters.", "tags": [ "Outplan" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of outplans.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/CampaignManagerOutplan" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new outplan.", "description": "Creates a new outplan with the provided details and returns the created outplan.", "tags": [ "Outplan" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the outplan." }, "detail": { "type": "string", "description": "Additional details about the outplan." }, "source": { "$ref": "#/components/schemas/CommonAddress", "description": "The source address for the outplan." }, "dial_timeout": { "type": "integer", "description": "The dial timeout in seconds." }, "try_interval": { "type": "integer", "description": "The interval between retry attempts." }, "max_try_count_0": { "type": "integer", "description": "Maximum retry count for destination 0." }, "max_try_count_1": { "type": "integer", "description": "Maximum retry count for destination 1." }, "max_try_count_2": { "type": "integer", "description": "Maximum retry count for destination 2." }, "max_try_count_3": { "type": "integer", "description": "Maximum retry count for destination 3." }, "max_try_count_4": { "type": "integer", "description": "Maximum retry count for destination 4." } }, "required": [ "name", "detail", "source", "dial_timeout", "try_interval", "max_try_count_0", "max_try_count_1", "max_try_count_2", "max_try_count_3", "max_try_count_4" ] } } } }, "responses": { "200": { "description": "The created outplan details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignManagerOutplan" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/outbound_config": { "get": { "summary": "Get own outbound config", "description": "Returns the outbound config for the authenticated customer. The config is automatically resolved from the authenticated user's customer record via JWT.", "tags": [ "Call" ], "responses": { "200": { "description": "The outbound config for the authenticated customer.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerOutboundConfig" } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update own outbound config", "description": "Updates the outbound config for the authenticated customer. The config is automatically resolved from the authenticated user's customer record via JWT.", "tags": [ "Call" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerOutboundConfigUpdateRequest" } } } }, "responses": { "200": { "description": "Successfully updated outbound config.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerOutboundConfig" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/outbound_configs/{id}": { "get": { "summary": "Get outbound config detail", "description": "Returns detailed information about the specified outbound config.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The unique identifier of the outbound config.", "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Detailed outbound config information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerOutboundConfig" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update an outbound config", "description": "Updates the specified outbound config and returns the updated resource.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The unique identifier of the outbound config to update.", "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerOutboundConfigUpdateRequest" } } } }, "responses": { "200": { "description": "The updated outbound config.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerOutboundConfig" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete an outbound config", "description": "Deletes the specified outbound config and returns the deleted resource.", "tags": [ "Call" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The unique identifier of the outbound config to delete.", "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "The deleted outbound config.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerOutboundConfig" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/outbound_configs": { "get": { "summary": "Get list of outbound configs", "description": "Returns a list of outbound configs for the given customer.", "tags": [ "Call" ], "parameters": [ { "name": "customer_id", "in": "query", "required": false, "description": "Filter by customer ID.", "schema": { "type": "string", "format": "uuid" } }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of outbound configs.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerOutboundConfigList" } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create an outbound config", "description": "Creates a new outbound config and returns the created resource.", "tags": [ "Call" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerOutboundConfigUpdateRequest" } } } }, "responses": { "200": { "description": "The created outbound config.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerOutboundConfig" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/providers/setup": { "post": { "summary": "Set up a provider via carrier API key", "description": "Validates the carrier API key, creates a carrier-side SIP trunk, and auto-creates a VoIPBin provider record. Requires ProjectSuperAdmin permission. Currently supports carrier `telnyx` only.\n", "tags": [ "Provider" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteManagerProviderSetupRequest" } } } }, "responses": { "200": { "description": "The created provider record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteManagerProvider" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/providers/{id}": { "get": { "summary": "Get provider by ID", "description": "Retrieves the provider details for the specified ID.", "tags": [ "Provider" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the provider" } ], "responses": { "200": { "description": "The details of the provider with the specified ID.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteManagerProvider" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete provider by ID", "description": "Deletes the provider with the specified ID.", "tags": [ "Provider" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the provider to delete." } ], "responses": { "200": { "description": "A confirmation of the deletion.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteManagerProvider" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update provider information", "description": "Updates the provider details for the given ID with the provided information.", "tags": [ "Provider" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the provider to update." } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/RouteManagerProviderType" }, "hostname": { "type": "string" }, "tech_prefix": { "type": "string" }, "tech_postfix": { "type": "string" }, "tech_headers": { "type": "object" }, "name": { "type": "string" }, "detail": { "type": "string" }, "codecs": { "type": "string", "description": "Comma-separated codec list offered to this provider (e.g. \"PCMU,PCMA\"). Empty means server-default negotiation. Applied to outgoing PSTN dial attempts only; has no effect on SIP-to-SIP traffic.\n", "example": "PCMU,PCMA" } }, "required": [ "type", "hostname", "tech_prefix", "tech_postfix", "tech_headers", "name", "detail" ] } } } }, "responses": { "200": { "description": "The updated provider details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteManagerProvider" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/providers": { "get": { "summary": "List providers of the given customer", "description": "Returns a list of providers for the authenticated customer.", "tags": [ "Provider" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of providers for the given customer.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/RouteManagerProvider" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new provider", "description": "Creates a new provider with the provided details.", "tags": [ "Provider" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/RouteManagerProviderType" }, "hostname": { "type": "string" }, "tech_prefix": { "type": "string" }, "tech_postfix": { "type": "string" }, "tech_headers": { "type": "object" }, "name": { "type": "string" }, "detail": { "type": "string" }, "codecs": { "type": "string", "description": "Comma-separated codec list offered to this provider (e.g. \"PCMU,PCMA\"). Empty means server-default negotiation. Applied to outgoing PSTN dial attempts only; has no effect on SIP-to-SIP traffic.\n", "example": "PCMU,PCMA" } }, "required": [ "type", "hostname", "tech_prefix", "tech_postfix", "tech_headers", "name", "detail" ] } } } }, "responses": { "200": { "description": "The created provider details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteManagerProvider" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/providercalls/{id}": { "get": { "summary": "Get providercall by ID", "description": "Retrieves a single providercall audit record. Admin-only\n(PermissionProjectSuperAdmin).\n", "tags": [ "ProviderCall" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The providercall ID. Obtained from the `POST /providercalls` or `GET /providercalls` response.", "example": "b7d1c0f6-9a2e-4b3f-8e2a-1c7d5b8a9e0f" } ], "responses": { "200": { "description": "The providercall record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteManagerProviderCall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete providercall by ID", "description": "Soft-deletes the providercall record (sets `tm_delete`). The record is\nno longer returned by `GET /providercalls`. The underlying Call records\nare not affected. Admin-only (PermissionProjectSuperAdmin).\n", "tags": [ "ProviderCall" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The providercall ID to delete.", "example": "b7d1c0f6-9a2e-4b3f-8e2a-1c7d5b8a9e0f" } ], "responses": { "200": { "description": "The deleted providercall record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteManagerProviderCall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/providercalls": { "get": { "summary": "List providercalls", "description": "Returns a paginated list of providercall audit records. Admin-only\n(PermissionProjectSuperAdmin) — because that role is platform-level,\nthe list is cross-customer (matches GET /providercalls/{id} and\nDELETE /providercalls/{id}). Optional `provider_id` filter narrows\nto records for a single provider.\n", "tags": [ "ProviderCall" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "provider_id", "in": "query", "required": false, "description": "Optional filter — narrow to providercalls for a single provider. Obtained from the `GET /providers` response.", "schema": { "type": "string", "format": "uuid" }, "example": "4dbeabd6-f397-4375-95d2-a38411e07ed1" } ], "responses": { "200": { "description": "A list of providercalls.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/RouteManagerProviderCall" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a provider call", "description": "Admin-triggered outbound call placed through the specified provider. The\nhandler bypasses normal dialroute selection (via server-side metadata) and\npreserves the admin-supplied source number verbatim so provider carrier\nallowlists accept it. The created Call(s)/Groupcall(s) are persisted and\ntheir IDs are returned on the `ProviderCall` record. Admin-only\n(PermissionProjectSuperAdmin).\n", "tags": [ "ProviderCall" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "provider_id": { "type": "string", "format": "uuid", "description": "The provider to force the call through. Obtained from the `GET /providers` response.", "example": "4dbeabd6-f397-4375-95d2-a38411e07ed1" }, "flow_id": { "type": "string", "format": "uuid", "description": "Optional flow to execute after the destination answers. Obtained from the `GET /flows` response.", "example": "00000000-0000-0000-0000-000000000000" }, "actions": { "type": "array", "items": { "$ref": "#/components/schemas/FlowManagerAction" }, "description": "Optional inline actions. Used when no `flow_id` is supplied." }, "source": { "$ref": "#/components/schemas/CommonAddress" }, "destinations": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" }, "minItems": 1, "description": "Dial targets. One Call/Groupcall is created per destination." }, "anonymous": { "type": "string", "enum": [ "yes", "no", "auto" ], "description": "Controls the anonymous caller-ID flag. Defaults to `auto`.", "example": "auto" } }, "required": [ "provider_id", "destinations" ] } } } }, "responses": { "200": { "description": "The created providercall record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteManagerProviderCall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/queuecalls/{id}/kick": { "post": { "summary": "Kick a queue call from the queue", "description": "Removes the specified queue call from the queue.", "tags": [ "Queue" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the queue call.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully kicked the queue call.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueManagerQueuecall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/queuecalls/{id}": { "get": { "summary": "Get detailed queue call information", "description": "Returns detailed information for the specified queue call ID.", "tags": [ "Queue" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the queue call.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The queue call details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueManagerQueuecall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a queue call", "description": "Deletes the specified queue call.", "tags": [ "Queue" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the queue call to delete.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully deleted the queue call.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueManagerQueuecall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/queuecalls": { "get": { "summary": "List queue calls", "description": "Returns a list of queue calls for the given customer.", "tags": [ "Queue" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of queue calls.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/QueueManagerQueuecall" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/queuecalls/reference_id/{id}/kick": { "post": { "summary": "Kick a queue call by reference ID", "description": "Removes the queue call associated with the given reference ID from the queue.", "tags": [ "Queue" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The reference ID of the queue call.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully kicked the queue call by reference ID.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueManagerQueuecall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/queues/{id}/direct-hash-regenerate": { "post": { "summary": "Regenerate direct hash for queue", "description": "Regenerates the direct hash for the specified queue. If no direct hash exists, one is created. Returns the updated queue with the new direct_hash.", "tags": [ "Queue" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the queue. Returned from the `GET /queues` response." } ], "responses": { "200": { "description": "Direct hash regenerated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueManagerQueue" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/queues/{id}/routing_method": { "put": { "summary": "Update the queue's routing method", "description": "Updates the routing method of the specified queue.", "tags": [ "Queue" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "routing_method": { "$ref": "#/components/schemas/QueueManagerQueueRoutingMethod" } }, "required": [ "routing_method" ] } } } }, "responses": { "200": { "description": "The updated queue details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueManagerQueue" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/queues/{id}/tag_ids": { "put": { "summary": "Update the queue's tag IDs", "description": "Updates the tag IDs of the specified queue.", "tags": [ "Queue" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "tag_ids": { "type": "array", "items": { "type": "string" } } }, "required": [ "tag_ids" ] } } } }, "responses": { "200": { "description": "The updated queue details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueManagerQueue" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/queues/{id}": { "get": { "summary": "Get the queue by ID", "description": "Retrieves the details of a specific queue by its ID.", "tags": [ "Queue" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The queue details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueManagerQueue" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a queue by ID", "description": "Deletes the queue specified by the given ID.", "tags": [ "Queue" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Queue deleted successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueManagerQueue" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update the queue details", "description": "Updates the details of the queue identified by the given ID.", "tags": [ "Queue" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "routing_method": { "$ref": "#/components/schemas/QueueManagerQueueRoutingMethod" }, "tag_ids": { "type": "array", "items": { "type": "string" } }, "wait_flow_id": { "type": "string", "description": "Flow ID for the wait queue." }, "wait_timeout": { "type": "integer" }, "service_timeout": { "type": "integer" } }, "required": [ "name", "detail", "routing_method", "tag_ids", "wait_flow_id", "wait_timeout", "service_timeout" ] } } } }, "responses": { "200": { "description": "The updated queue details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueManagerQueue" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/queues": { "get": { "summary": "List queues of the customer", "description": "Retrieves a list of queues associated with the customer.", "tags": [ "Queue" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of queues.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/QueueManagerQueue" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new queue", "description": "Creates a new queue with the provided details.", "tags": [ "Queue" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "routing_method": { "$ref": "#/components/schemas/QueueManagerQueueRoutingMethod" }, "tag_ids": { "type": "array", "items": { "type": "string" } }, "wait_flow_id": { "type": "string", "description": "Flow ID for the wait queue." }, "wait_timeout": { "type": "integer" }, "service_timeout": { "type": "integer" } }, "required": [ "name", "detail", "routing_method", "tag_ids", "wait_flow_id", "wait_timeout", "service_timeout" ] } } } }, "responses": { "200": { "description": "The created queue details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueManagerQueue" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/rags/{id}/sources/{source_id}": { "delete": { "summary": "Remove a source from a rag", "description": "Removes a single source (document) and its chunks from a RAG knowledge base. Returns the updated RAG with refreshed sources list.", "tags": [ "RAG" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the rag. Returned from the `POST /rags` response." }, { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the source to remove. Returned from the `id` field of the `sources[]` array in `GET /rags/{id}` response." } ], "responses": { "200": { "description": "Successfully removed source. Returns the updated RAG.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RagManagerRag" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/rags/{id}/sources": { "post": { "summary": "Add sources to a rag", "description": "Adds additional document sources to an existing RAG knowledge base. Documents are ingested asynchronously.", "tags": [ "RAG" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the rag. Returned from the `POST /rags` response." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "storage_file_ids": { "type": "array", "items": { "type": "string", "format": "uuid" }, "description": "List of storage file IDs to ingest. Obtained from the `id` field of `POST /storage_files` response.", "example": [ "b2c3d4e5-f6a7-8901-bcde-f12345678901" ] }, "source_urls": { "type": "array", "items": { "type": "string", "format": "uri" }, "description": "List of URLs to fetch and ingest as documents.", "example": [ "https://example.com/docs/faq.html" ] } } } } } }, "responses": { "200": { "description": "Successfully added sources.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RagManagerRag" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/rags/{id}": { "get": { "summary": "Get rag details", "description": "Retrieves detailed information about a specific RAG knowledge base.", "tags": [ "RAG" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the rag. Returned from the `POST /rags` response." } ], "responses": { "200": { "description": "Rag details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RagManagerRag" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a rag", "description": "Updates the name and/or description of an existing RAG knowledge base.", "tags": [ "RAG" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the rag. Returned from the `POST /rags` response." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Updated name for the rag.", "example": "Updated Support KB" }, "description": { "type": "string", "description": "Updated description.", "example": "Updated knowledge base description" } } } } } }, "responses": { "200": { "description": "Updated rag.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RagManagerRag" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a rag", "description": "Deletes a RAG knowledge base and all associated documents and chunks.", "tags": [ "RAG" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the rag. Returned from the `POST /rags` response." } ], "responses": { "200": { "description": "Rag deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RagManagerRag" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/rags": { "get": { "summary": "Get a list of rags", "description": "Retrieves a paginated list of RAG knowledge bases for the authenticated customer.", "tags": [ "RAG" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of rags.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/RagManagerRag" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new rag", "description": "Creates a new RAG knowledge base with document sources. Documents are ingested asynchronously.", "tags": [ "RAG" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "description": "Human-readable name for the rag.", "example": "Customer Support KB" }, "description": { "type": "string", "description": "Description of what this rag contains.", "example": "Knowledge base for customer support conversations" }, "storage_file_ids": { "type": "array", "items": { "type": "string", "format": "uuid" }, "description": "List of storage file IDs to ingest. Obtained from the `id` field of `POST /storage_files` response.", "example": [ "b2c3d4e5-f6a7-8901-bcde-f12345678901" ] }, "source_urls": { "type": "array", "items": { "type": "string", "format": "uri" }, "description": "List of URLs to fetch and ingest as documents.", "example": [ "https://example.com/docs/faq.html" ] } } } } } }, "responses": { "200": { "description": "Successfully created rag.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RagManagerRag" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/recordingfiles/{id}": { "get": { "summary": "Download the recording file", "description": "Retrieves the specified recording file and redirects to the download URI.", "tags": [ "Recording" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The recording file's ID.", "schema": { "type": "string" } } ], "responses": { "307": { "description": "The recording file download URL.", "content": { "application/json": { "schema": { "type": "string" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/recordings/{id}": { "get": { "summary": "Get recording details", "description": "Retrieves detailed information about a specific recording.", "tags": [ "Recording" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The recording's ID.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The recording details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerRecording" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } }, "delete": { "summary": "Delete recording", "description": "Deletes the specified recording and returns the deleted recording information.", "tags": [ "Recording" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The recording's ID.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The deleted recording details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerRecording" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/recordings": { "get": { "summary": "List recordings", "description": "Retrieves a list of recordings for the given customer.", "tags": [ "Recording" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of recordings.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/CallManagerRecording" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/routes/{id}": { "get": { "summary": "Get a route", "description": "Returns the details of the route for the given ID.", "tags": [ "Route" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The route's ID.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The route details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteManagerRoute" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete the route", "description": "Deletes the route for the given ID.", "tags": [ "Route" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The route's ID.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The route has been deleted successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteManagerRoute" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a route", "description": "Updates a route with the provided details and returns the updated route.", "tags": [ "Route" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The route's ID.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the route." }, "detail": { "type": "string", "description": "The detail information of the route." }, "provider_id": { "type": "string", "description": "The provider ID for the route." }, "priority": { "type": "integer", "description": "The priority of the route." }, "target": { "type": "string", "description": "The target of the route." } }, "required": [ "name", "detail", "provider_id", "priority", "target" ] } } } }, "responses": { "200": { "description": "The updated route details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteManagerRoute" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/routes": { "get": { "summary": "List routes", "description": "Returns a list of routes for the given customer with pagination.", "tags": [ "Route" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "customer_id", "in": "query", "description": "target customer id", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A list of routes.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/RouteManagerRoute" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new route", "description": "Creates a new route with the provided details.", "tags": [ "Route" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "customer_id": { "type": "string", "description": "The ID of the customer for the route." }, "name": { "type": "string", "description": "The name of the route." }, "detail": { "type": "string", "description": "The detail information of the route." }, "provider_id": { "type": "string", "description": "The provider ID for the route." }, "priority": { "type": "integer", "description": "The priority of the route." }, "target": { "type": "string", "description": "The target of the route." } }, "required": [ "customer_id", "name", "detail", "provider_id", "priority", "target" ] } } } }, "responses": { "200": { "description": "The created route details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteManagerRoute" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/agents/{id}": { "get": { "summary": "Retrieve detailed information of a service agent", "description": "Fetches detailed information of a specific service agent by its ID.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the service agent.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The details of the requested service agent.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/agents": { "get": { "summary": "Retrieve a list of service agents", "description": "Fetches a list of service agents with pagination support.", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of service agents.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AgentManagerAgent" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/aicalls": { "get": { "summary": "List aicalls", "description": "Retrieves a paginated list of AI calls for the service agent's customer. Optionally filter by the origin resource (reference_type + reference_id) to find AI calls tied to a specific call, conversation, task, or contact case — e.g. to check whether an AI call is already in progress for a given contact case before starting a new one.", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "reference_type", "in": "query", "required": false, "description": "Filter by the reference type of the origin resource. Must be supplied together with reference_id; supplying only one of the two returns a 400 error.", "schema": { "$ref": "#/components/schemas/AIManagerAIcallReferenceType" }, "example": "contact_case" }, { "name": "reference_id", "in": "query", "required": false, "description": "Filter by the ID of the origin resource (e.g. a contact case ID). Must be supplied together with reference_type; supplying only one of the two returns a 400 error.", "schema": { "type": "string", "format": "uuid" }, "example": "5e4a0680-804e-11ec-8477-2fea5968d85b" }, { "name": "status", "in": "query", "required": false, "description": "Filter by AI call status. Useful together with reference_type and reference_id to check whether an AI call is currently active for a given reference (e.g. pass `status=progressing` to avoid matching a prior, already-terminated AI call for the same contact case).", "schema": { "$ref": "#/components/schemas/AIManagerAIcallStatus" }, "example": "progressing" } ], "responses": { "200": { "description": "A list of AI calls.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerAIcall" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create an aicall", "description": "Creates a new AI call for the service agent's customer and returns the created aicall's details. An activeflow is automatically created and associated with the new AI call.", "tags": [ "Service Agent" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assistance_type": { "$ref": "#/components/schemas/AIManagerAIcallAssistanceType" }, "assistance_id": { "type": "string", "format": "uuid", "description": "The unique identifier of the assistance entity (AI or Team). Returned from the `POST /ais`, `GET /ais`, `POST /teams`, or `GET /teams` response. Optional when `assistance_type=ai` and `reference_type=contact_case`: if omitted, the customer's own `type=insight` AI is resolved automatically. Required for every other combination.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "reference_type": { "$ref": "#/components/schemas/AIManagerAIcallReferenceType" }, "reference_id": { "type": "string", "format": "uuid", "description": "The ID of the reference resource for the AI call.", "example": "5e4a0680-804e-11ec-8477-2fea5968d85b" } }, "required": [ "assistance_type", "reference_type", "reference_id" ] } } } }, "responses": { "200": { "description": "The created aicall details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerAIcall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/aimessages": { "get": { "summary": "List aimessages for an aicall", "description": "Retrieves a paginated list of AI messages for the given aicall id. The aicall must belong to the service agent's own customer.", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "aicall_id", "in": "query", "required": true, "description": "The ID of the aicall whose messages should be retrieved. Returned from the `POST /service_agents/aicalls` or `GET /service_agents/aicalls` response.", "schema": { "type": "string", "format": "uuid" }, "example": "5e4a0680-804e-11ec-8477-2fea5968d85b" } ], "responses": { "200": { "description": "A list of AI messages.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerMessage" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Send an aimessage", "description": "Creates and sends a new message to the given aicall and returns the details of the created message. The aicall must belong to the service agent's own customer.", "tags": [ "Service Agent" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "aicall_id": { "type": "string", "format": "uuid", "description": "The ID of the aicall to send the message to. Returned from the `POST /service_agents/aicalls` or `GET /service_agents/aicalls` response.", "example": "5e4a0680-804e-11ec-8477-2fea5968d85b" }, "role": { "$ref": "#/components/schemas/AIManagerMessageRole" }, "content": { "type": "string", "description": "The message content.", "example": "Hello, how can I help you today?" } }, "required": [ "aicall_id", "role", "content" ] } } } }, "responses": { "200": { "description": "The created aimessage details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/calls/{id}": { "get": { "summary": "Retrieve detailed information of a specific call", "description": "Fetches detailed information about a specific call by its ID.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the call.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The details of the requested call.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallManagerCall" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/calls": { "get": { "summary": "Retrieve a list of calls for the given customer", "description": "Fetches a list of calls for the given service agent, with pagination support.", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of calls for the service agent.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/CallManagerCall" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/conversations/{id}/messages": { "get": { "summary": "Get list of conversation messages", "description": "Retrieves a paginated list of messages for a specific conversation.", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conversation." } ], "responses": { "200": { "description": "A list of messages in the conversation.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/ConversationManagerMessage" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Send a message to the conversation", "description": "Sends a message to a specific conversation and returns the details of the sent message.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conversation." } ], "requestBody": { "description": "The details of the message to be sent.", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "string", "description": "The text content of the message." }, "medias": { "type": "array", "items": { "$ref": "#/components/schemas/ConversationManagerMedia" } } }, "required": [ "text", "medias" ] } } } }, "responses": { "200": { "description": "The details of the sent message.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/conversations/{id}/unassign": { "post": { "summary": "Unassign the conversation", "description": "Removes the current owner from the conversation. Admin and manager callers may unassign any\nconversation. The owning agent may unassign themselves. Returns 403 if the caller is neither\nan admin/manager nor the current owner.\n", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "828e75ba-ed24-11ec-bbf2-7f0e56ac76f1" }, "description": "The unique identifier of the conversation. Returned from the `GET /service_agents/conversations` response." } ], "responses": { "200": { "description": "Conversation after unassignment.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationManagerConversation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/conversations/{id}": { "get": { "summary": "Get detailed conversation info", "description": "Retrieves detailed information about a specific conversation by its ID.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the conversation." } ], "responses": { "200": { "description": "The details of the conversation.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationManagerConversation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update conversation info", "description": "Updates the details of a specific conversation by its ID. Admin and manager callers only.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "828e75ba-ed24-11ec-bbf2-7f0e56ac76f1" }, "description": "The unique identifier of the conversation. Returned from the `GET /service_agents/conversations` response." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "owner_type": { "type": "string", "example": "agent" }, "owner_id": { "type": "string", "format": "uuid", "example": "d152e69e-105b-11ee-b395-eb18426de979" }, "name": { "type": "string", "example": "VIP customer" }, "detail": { "type": "string", "example": "Preferred language: Korean" } } } } } }, "responses": { "200": { "description": "The updated conversation.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationManagerConversation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/conversations": { "get": { "summary": "Get list of conversations", "description": "Retrieves a paginated list of conversations associated with the authenticated agent.", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of conversations.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/ConversationManagerConversation" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contact_cases/{id}/close": { "post": { "summary": "Close the case", "description": "Closes an open case by its ID.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the case. Returned from the `GET /service_agents/contact_cases` response." } ], "responses": { "200": { "description": "The case after closing.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCase" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contact_cases/{id}/assign": { "post": { "summary": "Assign the case to an owner agent", "description": "Assigns the case to the given owner agent. The owner agent must belong to the same customer as the case; owner_type is fixed server-side to \"agent\" and is not accepted from the client.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the case. Returned from the `GET /service_agents/contact_cases` response." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "owner_id": { "type": "string", "format": "uuid", "description": "The agent ID to assign as the case owner. The agent ID returned from the `GET /service_agents/agents` response.", "example": "2a2ec0ba-8004-11ec-aea5-439829c92a7c" } }, "required": [ "owner_id" ] } } } }, "responses": { "200": { "description": "The case after assignment.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCase" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contact_cases/{id}/notes": { "get": { "summary": "List notes for a case", "description": "List all notes for the case of the given ID. Notes are an internal,\nagent-facing annotation on a Case and never appear in any\ncustomer-facing webhook or response.\n", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the case. Returned from the `GET /service_agents/contact_cases` response." } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCaseNoteListResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a note on a case", "description": "Create a new note on the case of the given ID, authored by the\ncalling agent. The author is derived server-side from the caller's\nown agent identity -- the request only carries the note text, so an\nagent can never author a note as another agent or as the system.\nNotes are an internal, agent-facing annotation on a Case and never\nappear in any customer-facing webhook or response.\n", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the case. Returned from the `GET /service_agents/contact_cases` response." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "text" ], "properties": { "text": { "type": "string", "description": "The note's text content.", "example": "Called the customer back, no answer." } } } } } }, "responses": { "200": { "description": "Case note created successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCaseNote" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contact_cases/{id}/notes/{note_id}": { "delete": { "summary": "Delete a case note", "description": "Delete the note of the given note ID on the case of the given case\nID. An agent may only delete a note it authored itself; notes\nauthored by another agent or by the system cannot be deleted\nthrough this endpoint.\n", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the case. Returned from the `GET /service_agents/contact_cases` response." }, { "name": "note_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "33333333-0000-0000-0000-000000000003" }, "description": "The unique identifier of the note. Returned from the `GET /service_agents/contact_cases/{id}/notes` response." } ], "responses": { "200": { "description": "Case note deleted successfully.", "content": { "application/json": { "schema": { "type": "object" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contact_cases/{id}": { "get": { "summary": "Get detailed case info", "description": "Retrieves detailed information about a specific case by its ID.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the case. Returned from the `GET /service_agents/contact_cases` response." } ], "responses": { "200": { "description": "The details of the case.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCase" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Attach or detach a case's contact", "description": "Attaches the case to a specific existing Contact, or detaches it,\nvia a direct contact_id write. Send a non-empty contact_id to\nattach; send an empty string to detach. The target contact_id must\nbelong to the same customer as the case; a cross-tenant contact_id\nis rejected as not found. Every attach/detach is recorded as a\ncase_contact_attributed/case_contact_detached event, queryable via\nbin-timeline-manager's audit log.\n", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, "description": "The unique identifier of the case. Returned from the `GET /service_agents/contact_cases` response." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "contact_id" ], "properties": { "contact_id": { "type": "string", "description": "The contact to attach. Empty string detaches. Deliberately NOT format: uuid -- the internal RPC-layer uuid.UUID field cannot unmarshal a literal empty string, so this HTTP-layer field stays a plain string and the \"\" -> uuid.Nil conversion happens explicitly in the handler.", "example": "660e8400-e29b-41d4-a716-446655440001" } } } } } }, "responses": { "200": { "description": "The case after the contact attach/detach.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerCase" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contact_cases": { "get": { "summary": "Get list of contact cases", "description": "Retrieves a paginated list of cases for the authenticated agent's customer.", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of cases.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/ContactManagerCase" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/customer": { "get": { "summary": "Get customer details", "description": "Retrieves detailed information about the customer associated with the authenticated agent.", "tags": [ "Service Agent" ], "responses": { "200": { "description": "The details of the customer.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerManagerCustomer" } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/extensions/{id}": { "get": { "summary": "Get extension details", "description": "Retrieves detailed information about a specific extension by its ID.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the extension." } ], "responses": { "200": { "description": "The details of the extension.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrarManagerExtension" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/extensions": { "get": { "summary": "Get list of extensions", "description": "Retrieves a paginated list of extensions associated with the authenticated agent.", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of extensions.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/RegistrarManagerExtension" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/files/{id}": { "get": { "summary": "Get file details", "description": "Retrieves detailed information about a specific file by its ID.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the file." } ], "responses": { "200": { "description": "The details of the file.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorageManagerFile" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a file", "description": "Deletes a specific file by its ID.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the file." } ], "responses": { "200": { "description": "File successfully deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorageManagerFile" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/files/{id}/file": { "get": { "summary": "Download the service agent file", "description": "Retrieves the specified service agent file and redirects to the download URI.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The file's ID. Obtained from the `id` field of `GET /service_agents/files`.", "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } } ], "responses": { "307": { "description": "Redirect to the service agent file download URL.", "content": { "application/json": { "schema": { "type": "string", "example": "https://storage.googleapis.com/bucket/storage/550e8400-e29b-41d4-a716-446655440000?X-Goog-Signature=abc123" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/files": { "post": { "summary": "Upload a file", "description": "Uploads a file and returns the details of the uploaded file.", "tags": [ "Service Agent" ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary", "description": "The file to upload." }, "type": { "type": "string", "description": "The type/category of the file. Must be 'talk' for this endpoint.", "enum": [ "talk" ], "example": "talk" } }, "required": [ "file", "type" ] } } } }, "responses": { "200": { "description": "The details of the uploaded file.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorageManagerFile" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "get": { "summary": "Get list of files", "description": "Retrieves a paginated list of files associated with the authenticated agent.", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of files.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/StorageManagerFile" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/me/addresses": { "put": { "summary": "Update authenticated agent's addresses", "description": "Updates the address details of the authenticated agent and returns the updated information.", "tags": [ "Service Agent" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "addresses": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" }, "description": "The updated list of addresses." } }, "required": [ "addresses" ] } } } }, "responses": { "200": { "description": "The updated address information of the agent.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/me/password": { "put": { "summary": "Update authenticated agent's password", "description": "Updates the password of the authenticated agent.", "tags": [ "Service Agent" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "password": { "type": "string", "description": "The new password for the agent." } }, "required": [ "password" ] } } } }, "responses": { "200": { "description": "Password updated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/me/status": { "put": { "summary": "Update authenticated agent's status", "description": "Updates the status of the authenticated agent and returns the updated information.", "tags": [ "Service Agent" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/AgentManagerAgentStatus" } }, "required": [ "status" ] } } } }, "responses": { "200": { "description": "The updated status information of the agent.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/me": { "get": { "summary": "Get authenticated agent's details", "description": "Retrieves detailed information about the authenticated agent.", "tags": [ "Service Agent" ], "responses": { "200": { "description": "The authenticated agent's details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update authenticated agent's information", "description": "Updates the basic information of the authenticated agent and returns the updated details.", "tags": [ "Service Agent" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The updated name of the agent." }, "detail": { "type": "string", "description": "Additional details about the agent." }, "ring_method": { "$ref": "#/components/schemas/AgentManagerAgentRingMethod" } }, "required": [ "name", "detail", "ring_method" ] } } } }, "responses": { "200": { "description": "The updated agent's details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentManagerAgent" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/ws": { "get": { "summary": "Establish a WebSocket connection", "description": "Creates a new WebSocket connection for the authenticated agent.", "tags": [ "Service Agent" ], "responses": { "101": { "description": "Switching Protocols. WebSocket handshake successful." }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/talk_chats/{id}/participants/{participant_id}": { "delete": { "summary": "Remove a participant from a talk chat", "description": "Removes a specific participant from a talk chat.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The talk chat ID." }, { "name": "participant_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The participant ID." } ], "responses": { "200": { "description": "Participant removed successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TalkManagerParticipant" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/talk_chats/{id}/participants": { "get": { "summary": "Get participants of a talk chat", "description": "Returns a list of participants in a specific talk chat.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The talk chat ID." } ], "responses": { "200": { "description": "A list of participants.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TalkManagerParticipant" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Add a participant to a talk chat", "description": "Adds a new participant to a specific talk chat.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The talk chat ID." } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "owner_type": { "type": "string", "description": "Type of the owner (agent, customer, etc.)." }, "owner_id": { "type": "string", "description": "ID of the owner to add as participant." } }, "required": [ "owner_type", "owner_id" ] } } } }, "responses": { "200": { "description": "Participant added successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TalkManagerParticipant" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/talk_chats/{id}/join": { "post": { "summary": "Join a talk chat", "description": "Allows the authenticated agent to join a \"talk\" type chat (public channel).\nThis is a convenience endpoint that automatically adds the agent as a participant.\nOnly works for \"talk\" type chats - for group/direct chats, use the participants endpoint.\n", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The talk chat ID to join." } ], "responses": { "200": { "description": "Successfully joined the chat.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TalkManagerParticipant" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/talk_chats/{id}": { "get": { "summary": "Get talk chat by ID", "description": "Returns details of a specific talk chat.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The talk chat ID." } ], "responses": { "200": { "description": "Talk chat details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TalkManagerTalk" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update talk chat", "description": "Updates a specific talk chat's name and/or detail.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The talk chat ID." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The new name of the talk chat." }, "detail": { "type": "string", "description": "The new detail/description of the talk chat." } } } } } }, "responses": { "200": { "description": "Talk chat updated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TalkManagerTalk" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete talk chat", "description": "Deletes a specific talk chat (soft delete).", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The talk chat ID." } ], "responses": { "200": { "description": "Talk chat deleted successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TalkManagerTalk" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/talk_chats": { "get": { "summary": "Get list of talk chats", "description": "Returns a list of talk chats for the authenticated agent.", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of talk chats.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/TalkManagerTalk" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new talk chat", "description": "Creates a new talk chat and returns the created talk's details.\n\nParticipant requirements by type:\n- `direct`: Requires exactly 1 other participant (creator is automatically added as second participant)\n- `group`: Can start with 0 or more participants (creator is automatically added, members can be added/removed later)\n- `talk`: No additional participants required (creator is automatically added)\n\nNote: If the creator includes themselves in the participants list, they will not be added twice.\n", "tags": [ "Service Agent" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/TalkManagerTalkType" }, "name": { "type": "string", "description": "Talk name (optional)." }, "detail": { "type": "string", "description": "Talk description/detail (optional)." }, "participants": { "type": "array", "description": "List of participants to add to the chat (creator is added automatically).", "items": { "$ref": "#/components/schemas/TalkManagerParticipantInput" } } }, "required": [ "type" ] } } } }, "responses": { "200": { "description": "The created talk chat's details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TalkManagerTalk" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/talk_channels": { "get": { "summary": "Get list of public talk channels", "description": "Returns a list of all public \"talk\" type channels for the customer.\nThis endpoint is for discovering available public channels that the agent can join.\nUnlike /service_agents/talk_chats which returns only joined chats, this returns all public channels regardless of participation.\n", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of public talk channels.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/TalkManagerTalk" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/talk_messages/{id}/reactions": { "post": { "summary": "Add a reaction to a talk message", "description": "Adds an emoji reaction to a specific talk message.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The talk message ID." } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "emoji": { "type": "string", "description": "Emoji character for the reaction." } }, "required": [ "emoji" ] } } } }, "responses": { "200": { "description": "Reaction added successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TalkManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/talk_messages/{id}": { "get": { "summary": "Get talk message by ID", "description": "Returns details of a specific talk message.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The talk message ID." } ], "responses": { "200": { "description": "Talk message details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TalkManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete talk message", "description": "Deletes a specific talk message (soft delete).", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The talk message ID." } ], "responses": { "200": { "description": "Talk message deleted successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TalkManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/talk_messages": { "get": { "summary": "Get list of talk messages for a specific chat", "description": "Returns a list of talk messages for a specific chat.", "tags": [ "Service Agent" ], "parameters": [ { "name": "chat_id", "in": "query", "required": true, "description": "Chat ID to filter messages", "schema": { "type": "string" } }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of talk messages for the specified chat.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/TalkManagerMessage" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new talk message", "description": "Creates a new talk message and returns the created message's details.", "tags": [ "Service Agent" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "chat_id": { "type": "string", "description": "Talk chat ID." }, "parent_id": { "type": "string", "description": "Parent message ID for threading (optional)." }, "type": { "$ref": "#/components/schemas/TalkManagerMessageType" }, "text": { "type": "string", "description": "Message text content." }, "medias": { "type": "array", "description": "Media attachments (optional).", "items": { "$ref": "#/components/schemas/TalkManagerMedia" } } }, "required": [ "chat_id", "type", "text" ] } } } }, "responses": { "200": { "description": "The created talk message's details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TalkManagerMessage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contact_addresses": { "get": { "summary": "List contact addresses (service agent)", "description": "Get a list of contact addresses. Optionally filter by contact_id and/or type.", "tags": [ "ServiceAgent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "contact_id", "in": "query", "required": false, "description": "Filter by contact ID.", "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000001" } }, { "name": "type", "in": "query", "required": false, "description": "Filter by address type.", "schema": { "type": "string", "enum": [ "tel", "email" ], "example": "tel" } }, { "name": "unresolved", "in": "query", "required": false, "description": "When true, list only unresolved addresses (contact_id IS NULL) for the customer — the pool of addresses not yet attached to any contact. Mutually exclusive with contact_id; if both are given, unresolved=true wins and contact_id is ignored.", "schema": { "type": "boolean", "example": true } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/ContactManagerAddress" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a contact address (service agent)", "description": "Create a new address (tel or email) for a contact as a service agent. If contact_id is omitted, creates an unresolved address (not yet attached to any contact) for the customer's unresolved pool; such an address cannot be primary.", "tags": [ "ServiceAgent" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "type", "target" ], "properties": { "contact_id": { "type": "string", "format": "uuid", "description": "The ID of the contact to add the address to. Omit to create an unresolved address in the customer's unresolved pool.", "example": "5e4a0680-eba3-4001-a000-000000000001" }, "type": { "type": "string", "enum": [ "tel", "email" ], "description": "Address type. 'tel' for phone numbers, 'email' for email addresses.", "example": "tel" }, "target": { "type": "string", "description": "The address value. E.164 format for tel, email address for email.", "example": "+155****4567" }, "name": { "type": "string", "description": "Optional human-readable label for this address.", "example": "Main Office" }, "detail": { "type": "string", "description": "Optional free-form notes about this address.", "example": "Primary contact number" }, "is_primary": { "type": "boolean", "description": "Whether this is the primary address for the contact.", "example": true } } } } } }, "responses": { "201": { "description": "Address created successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerAddress" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contact_addresses/{id}": { "get": { "summary": "Get a contact address (service agent)", "description": "Get a single contact address by ID as a service agent.", "tags": [ "ServiceAgent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact address.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000002" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerAddress" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a contact address (service agent)", "description": "Update an existing contact address as a service agent.", "tags": [ "ServiceAgent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact address.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000002" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "target": { "type": "string", "description": "The updated address value. E.164 format for tel, email address for email.", "example": "+155****9999" }, "name": { "type": "string", "description": "Optional human-readable label for this address.", "example": "Main Office" }, "detail": { "type": "string", "description": "Optional free-form notes about this address.", "example": "Primary contact number" }, "is_primary": { "type": "boolean", "description": "Whether this is the primary address for the contact.", "example": true } } } } } }, "responses": { "200": { "description": "Address updated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerAddress" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a contact address (service agent)", "description": "Delete a contact address by ID as a service agent.", "tags": [ "ServiceAgent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact address.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000002" } } ], "responses": { "200": { "description": "Address deleted successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerAddress" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contact_addresses/{id}/claim": { "post": { "summary": "Claim an unresolved contact address (service agent)", "description": "Attaches a currently-unresolved contact address (contact_id is NULL) to the given contact, as a service agent. Idempotent if already claimed by the same contact; returns 409 if claimed by a different contact.", "tags": [ "ServiceAgent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact address to claim.", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "contact_id" ], "properties": { "contact_id": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000001" } } } } } }, "responses": { "200": { "description": "Address claimed successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerAddress" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contacts/{id}/addresses": { "post": { "summary": "Add address to contact (service agent)", "description": "Add a new address (tel or email) to the contact as a service agent.", "tags": [ "ServiceAgent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000001" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "type", "target" ], "properties": { "type": { "type": "string", "enum": [ "tel", "email" ], "description": "Address type.", "example": "tel" }, "target": { "type": "string", "description": "The address value. E.164 format for tel, email address for email.", "example": "+155****4567" }, "name": { "type": "string", "description": "Optional human-readable label for this address.", "example": "Main Office" }, "detail": { "type": "string", "description": "Optional free-form notes about this address.", "example": "Primary contact number" }, "is_primary": { "type": "boolean", "description": "Whether this is the primary address for the given type.", "example": true } } } } } }, "responses": { "200": { "description": "Address added successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contacts/{id}/addresses/{address_id}": { "put": { "summary": "Update address on contact (service agent)", "description": "Update an existing address on the contact as a service agent.", "tags": [ "ServiceAgent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000001" } }, { "name": "address_id", "in": "path", "description": "The ID of the address returned from POST /service_agents/contacts/{id}/addresses.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000002" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "target": { "type": "string", "description": "The updated address value.", "example": "+155****9999" }, "name": { "type": "string", "description": "Optional human-readable label for this address.", "example": "Main Office" }, "detail": { "type": "string", "description": "Optional free-form notes about this address.", "example": "Primary contact number" }, "is_primary": { "type": "boolean", "description": "Whether this is the primary address for the given type.", "example": true } } } } } }, "responses": { "200": { "description": "Address updated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Remove address from contact (service agent)", "description": "Remove an address from the contact as a service agent.", "tags": [ "ServiceAgent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000001" } }, { "name": "address_id", "in": "path", "description": "The ID of the address returned from POST /service_agents/contacts/{id}/addresses.", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5e4a0680-eba3-4001-a000-000000000002" } } ], "responses": { "200": { "description": "Address removed successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contacts/{id}/tags/{tag_id}": { "delete": { "summary": "Remove tag from contact", "description": "Remove a tag from the contact.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string" } }, { "name": "tag_id", "in": "path", "description": "The ID of the tag.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Tag removed successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contacts/{id}/tags": { "post": { "summary": "Add tag to contact", "description": "Add a tag to the contact.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "tag_id" ], "properties": { "tag_id": { "type": "string", "format": "uuid" } } } } } }, "responses": { "200": { "description": "Tag added successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contacts/{id}": { "get": { "summary": "Get the contact", "description": "Get the contact of the given ID.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a contact", "description": "Update a contact and return updated details.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "first_name": { "type": "string" }, "last_name": { "type": "string" }, "display_name": { "type": "string" }, "company": { "type": "string" }, "job_title": { "type": "string" }, "external_id": { "type": "string" }, "notes": { "type": "string" } } } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete the contact", "description": "Delete the contact of the given ID.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the contact.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contacts/lookup": { "get": { "summary": "Lookup contact", "description": "Find a contact by phone number or email.", "tags": [ "Service Agent" ], "parameters": [ { "name": "phone", "in": "query", "description": "Phone number in E.164 format to lookup.", "required": false, "schema": { "type": "string" } }, { "name": "email", "in": "query", "description": "Email address to lookup.", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Contact found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contacts": { "get": { "summary": "List contacts", "description": "Get contacts for the service agent's customer.", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/ContactManagerContact" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new contact", "description": "Create a new contact for the service agent's customer.", "tags": [ "Service Agent" ], "requestBody": { "description": "Request body to create a new contact.", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "first_name": { "type": "string" }, "last_name": { "type": "string" }, "display_name": { "type": "string" }, "company": { "type": "string" }, "job_title": { "type": "string" }, "source": { "type": "string", "enum": [ "manual", "import", "api", "sync" ] }, "external_id": { "type": "string" }, "notes": { "type": "string" }, "addresses": { "type": "array", "description": "List of addresses (tel or email) to associate with the contact.", "items": { "allOf": [ { "$ref": "#/components/schemas/CommonAddress" }, { "type": "object", "properties": { "is_primary": { "type": "boolean", "description": "Whether this is the primary address of its type." } } } ] } }, "tag_ids": { "type": "array", "items": { "type": "string", "format": "uuid" } } } } } } }, "responses": { "201": { "description": "Contact created successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactManagerContact" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/tags/{id}": { "get": { "summary": "Retrieve detailed information of a tag", "description": "Fetches detailed information of a specific tag by its ID.", "tags": [ "Service Agent" ], "parameters": [ { "name": "id", "in": "path", "description": "The ID of the tag.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The details of the requested tag.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagManagerTag" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/tags": { "get": { "summary": "Retrieve a list of tags", "description": "Fetches a list of tags with pagination support.", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of tags.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/TagManagerTag" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contact_interactions": { "get": { "summary": "List interactions", "description": "List CRM interactions for the service agent's customer. At most one filter may be\nprovided: peer_type + peer_target (remote endpoint), contact_id, or address_id.\nIf no filter is provided, the full customer interaction history is returned,\nscoped to the \"since\" lookback window (default \"30d\", maximum \"180d\").\n\nThe response is the raw, unmodified peer_events shape (design doc\n2026-07-25-contact-interaction-retire-to-peer-events, §8.1/§9): rows may\ninclude internal-resource peer types (agent, ai, conference, sip legs)\nwith no CRM eligibility filtering or field reshaping applied.\n", "tags": [ "Service Agent" ], "parameters": [ { "name": "peer_type", "in": "query", "description": "Remote endpoint type (e.g. \"tel\", \"email\"). Required with peer_target.", "schema": { "type": "string", "example": "tel" } }, { "name": "peer_target", "in": "query", "description": "Remote endpoint target (e.g. \"+155****4567\"). Required with peer_type.", "schema": { "type": "string", "example": "+155****4567" } }, { "name": "contact_id", "in": "query", "description": "Filter by resolved contact ID.", "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } }, { "name": "address_id", "in": "query", "description": "Filter by contact address ID.", "schema": { "type": "string", "format": "uuid", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" } }, { "name": "since", "in": "query", "description": "Lookback window in days (e.g. \"7d\", \"30d\"), used only when no filter\n(peer_type+peer_target, contact_id, address_id) is provided. Default \"30d\", max \"180d\".\nIgnored when a filter is provided.\n", "schema": { "type": "string", "example": "30d" } }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TimelineManagerPeerEventListResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/contact_peer_events": { "get": { "summary": "List peer_events (raw, unfiltered)", "description": "List raw peer_events rows for the service agent's customer, matching\neither a contact's registered addresses (contact_id) or a single peer\naddress (peer_type + peer_target). Exactly one filter is required.\n\nUnlike GET /service_agents/contact_interactions, this endpoint applies NO\nidentity resolution and NO CRM eligibility filtering: rows may include\ninternal-resource peer types (agent, ai, conference, sip legs) that\n/service_agents/contact_interactions deliberately excludes. Clients are\nresponsible for any presentation-layer filtering or grouping of this\nnoise.\n", "tags": [ "Service Agent" ], "parameters": [ { "name": "contact_id", "in": "query", "description": "Filter by all of a contact's registered addresses. Exactly one of contact_id or peer_type+peer_target is required.", "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } }, { "name": "peer_type", "in": "query", "description": "Remote endpoint type (e.g. \"tel\", \"email\"). Required with peer_target.", "schema": { "type": "string", "example": "tel" } }, { "name": "peer_target", "in": "query", "description": "Remote endpoint target (e.g. \"+155****4567\"). Required with peer_type.", "schema": { "type": "string", "example": "+155****4567" } }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TimelineManagerPeerEventListResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/transcribes": { "get": { "summary": "List transcribes", "description": "Retrieves a paginated list of transcriptions for the service agent's customer. Optionally filter by the origin resource (reference_type + reference_id) to find all transcribes tied to a specific call, conference, or recording. Note a single reference can have multiple transcribes (e.g. one per language, or multiple start/stop sessions), so this always returns a list, not a single item.", "tags": [ "Service Agent" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "reference_type", "in": "query", "required": false, "description": "Filter by the reference type of the origin resource. Must be supplied together with reference_id; supplying only one of the two returns a 400 error.", "schema": { "$ref": "#/components/schemas/TranscribeManagerTranscribeReferenceType" }, "example": "call" }, { "name": "reference_id", "in": "query", "required": false, "description": "Filter by the ID of the origin resource (e.g. a call ID returned from `GET /service_agents/calls`). Must be supplied together with reference_type; supplying only one of the two returns a 400 error.", "schema": { "type": "string", "format": "uuid" }, "example": "5e4a0680-804e-11ec-8477-2fea5968d85b" } ], "responses": { "200": { "description": "A list of transcriptions.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/TranscribeManagerTranscribe" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Start a transcribe", "description": "Starts a transcription of the given reference (call, conference, or recording) for the service agent's customer and returns the result. Duplicate behavior differs by reference type: for a recording that already has a transcribe in the requested language, the existing transcribe is returned (200); for a call/confbridge that already has a progressing live transcribe in the requested language, the request is rejected with 409. Stop the existing transcribe first, or start with a different language.", "tags": [ "Service Agent" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "reference_type": { "$ref": "#/components/schemas/TranscribeManagerTranscribeReferenceType" }, "reference_id": { "type": "string", "description": "The ID of the reference for the transcription." }, "language": { "type": "string", "description": "The language of the transcription." }, "direction": { "allOf": [ { "$ref": "#/components/schemas/TranscribeManagerTranscribeDirection" } ], "description": "Which audio legs to transcribe. If omitted, defaults to \"both\"." }, "provider": { "$ref": "#/components/schemas/TranscribeManagerTranscribeProvider" }, "on_end_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The flow to execute when the transcription ends. The flow ID returned from the POST /flows or GET /flows response. If omitted, no follow-up flow is executed.", "example": "d4e5f6a7-b8c9-0123-4567-890abcdef012" } }, "required": [ "reference_type", "reference_id", "language" ] } } } }, "responses": { "200": { "description": "The created transcribe details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranscribeManagerTranscribe" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/service_agents/transcripts": { "get": { "summary": "List transcript lines", "description": "Retrieves the individual spoken/written lines (transcript entries) for one transcribe session, scoped to the service agent's own customer. Ownership is authorized against the target transcribe's own customer_id (fetched by transcribe_id), not a re-derived parent resource.", "tags": [ "Service Agent" ], "parameters": [ { "name": "transcribe_id", "in": "query", "required": true, "description": "The transcribe session ID returned from `GET /service_agents/transcribes` or `POST /service_agents/transcribes`.", "schema": { "type": "string", "format": "uuid" }, "example": "550e8400-e29b-41d4-a716-446655440000" }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of transcript lines, in creation order.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/TranscribeManagerTranscript" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/speakings": { "get": { "summary": "List speaking sessions", "description": "Returns a list of speaking sessions for the authenticated customer.", "tags": [ "Speaking" ], "parameters": [ { "name": "page_size", "in": "query", "schema": { "type": "integer" } }, { "name": "page_token", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "A list of speaking sessions.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TtsManagerSpeaking" } } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a speaking session", "description": "Creates a new streaming TTS session on a call or conference.", "tags": [ "Speaking" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "reference_type", "reference_id" ], "properties": { "reference_type": { "type": "string", "description": "Type of the referenced entity (call, confbridge)" }, "reference_id": { "type": "string", "description": "ID of the referenced entity" }, "language": { "type": "string", "description": "TTS language (e.g. en-US)" }, "provider": { "type": "string", "description": "TTS provider. Defaults to elevenlabs." }, "voice_id": { "type": "string", "description": "Provider-specific voice ID. If empty, uses default for language." }, "direction": { "type": "string", "description": "Audio injection direction (in, out, both). Defaults to none." } } } } } }, "responses": { "201": { "description": "The created speaking session.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TtsManagerSpeaking" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/speakings/{id}": { "get": { "summary": "Get a speaking session", "description": "Returns details of a speaking session.", "tags": [ "Speaking" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The speaking session.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TtsManagerSpeaking" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a speaking session", "description": "Soft-deletes a speaking session. Stops the session if still active.", "tags": [ "Speaking" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The deleted speaking session.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TtsManagerSpeaking" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/speakings/{id}/say": { "post": { "summary": "Send text to a speaking session", "description": "Adds text to the speech queue. Can be called multiple times.", "tags": [ "Speaking" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "text" ], "properties": { "text": { "type": "string", "description": "Text to be spoken." } } } } } }, "responses": { "200": { "description": "The speaking session.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TtsManagerSpeaking" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/speakings/{id}/flush": { "post": { "summary": "Flush a speaking session", "description": "Cancels current speech and clears all queued messages. Session stays open.", "tags": [ "Speaking" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The speaking session.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TtsManagerSpeaking" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/speakings/{id}/stop": { "post": { "summary": "Stop a speaking session", "description": "Terminates the session. Closes AudioSocket and ElevenLabs connections.", "tags": [ "Speaking" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The stopped speaking session.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TtsManagerSpeaking" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/storage_account": { "get": { "summary": "Get details of a given account's storage account", "description": "Retrieves the details of a given account's storage account.", "tags": [ "Storage" ], "responses": { "200": { "description": "The requested storage account details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorageManagerAccount" } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/storage_accounts/{id}": { "get": { "summary": "Get details of a specific storage account", "description": "Retrieves the details of a specific storage account by its ID.", "tags": [ "Storage" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the storage account.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The requested storage account details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorageManagerAccount" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a specific storage account", "description": "Deletes a specific storage account by its ID and returns the details of the deleted account.", "tags": [ "Storage" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the storage account.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The deleted storage account details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorageManagerAccount" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/storage_accounts": { "get": { "summary": "Get a list of storage accounts", "description": "Retrieves a list of storage accounts with the provided pagination details.", "tags": [ "Storage" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of storage accounts with pagination information.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/StorageManagerAccount" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new storage account", "description": "Creates a new storage account with the provided information and returns the created account details.", "tags": [ "Storage" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "customer_id": { "type": "string" } }, "required": [ "customer_id" ] } } } }, "responses": { "200": { "description": "The created storage account details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorageManagerAccount" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/storage_files/{id}": { "get": { "summary": "Get file details by ID", "description": "Retrieves detailed information for a specific file by ID.", "tags": [ "Storage" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The file details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorageManagerFile" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a file", "description": "Deletes a file by ID.", "tags": [ "Storage" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The deletion result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorageManagerFile" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/storage_files/{id}/file": { "get": { "summary": "Download the storage file", "description": "Retrieves the specified storage file and redirects to the download URI.", "tags": [ "Storage" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The storage file's ID. Obtained from the `id` field of `GET /storage_files`.", "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } } ], "responses": { "307": { "description": "Redirect to the storage file download URL.", "content": { "application/json": { "schema": { "type": "string", "example": "https://storage.googleapis.com/bucket/storage/550e8400-e29b-41d4-a716-446655440000?X-Goog-Signature=abc123" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/storage_files": { "get": { "summary": "Get a list of files", "description": "Retrieves a paginated list of files.", "tags": [ "Storage" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of files.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/StorageManagerFile" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Upload a file and create a call with it", "description": "Creates a temporary file and initiates a call with the temporary file.", "tags": [ "Storage" ], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary" }, "type": { "type": "string", "description": "The type/category of the file. Must be 'rag' for this endpoint.", "enum": [ "rag" ], "example": "rag" } }, "required": [ "file", "type" ] } } } }, "responses": { "200": { "description": "The created call details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorageManagerFile" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/tags/{id}": { "get": { "summary": "Get the tag", "description": "Retrieves the tag details by its ID.", "tags": [ "Tag" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the tag.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The tag details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagManagerTag" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete the tag", "description": "Deletes the tag identified by the given ID.", "tags": [ "Tag" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the tag to be deleted.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The result of the deletion.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagManagerTag" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update the tag info", "description": "Updates the tag's name and detail information.", "tags": [ "Tag" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The ID of the tag.", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" } }, "required": [ "name", "detail" ] } } } }, "responses": { "200": { "description": "The updated tag details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagManagerTag" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/tags": { "post": { "summary": "Create a new tag.", "description": "Creates a new tag with the specified information.", "tags": [ "Tag" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" } }, "required": [ "name", "detail" ] } } } }, "responses": { "200": { "description": "The created tag details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagManagerTag" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "get": { "summary": "List tags", "description": "Retrieves a list of tags for the customer.", "tags": [ "Tag" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of tags.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/TagManagerTag" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/transcribes/{id}/stop": { "post": { "summary": "Stop an ongoing transcription", "description": "Stops an ongoing transcription for the specified ID and returns the result.", "tags": [ "Transcribe" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The stopped transcription details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranscribeManagerTranscribe" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/transcribes/{id}": { "get": { "summary": "Get detailed transcribe info", "description": "Retrieves detailed information about a specific transcription by ID.", "tags": [ "Transcribe" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The detailed transcription information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranscribeManagerTranscribe" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a transcribe", "description": "Deletes a transcription by ID.", "tags": [ "Transcribe" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The deleted transcription details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranscribeManagerTranscribe" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/transcribes": { "get": { "summary": "Get list of transcribes", "description": "Retrieves a paginated list of transcriptions for the authenticated customer. Optionally filter by the origin resource (reference_type + reference_id) to find all transcribes tied to a specific call, conference, or recording. Note a single reference can have multiple transcribes (e.g. one per language, or multiple start/stop sessions), so this always returns a list, not a single item.", "tags": [ "Transcribe" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "reference_type", "in": "query", "required": false, "description": "Filter by the reference type of the origin resource. Must be supplied together with reference_id; supplying only one of the two returns a 400 error.", "schema": { "$ref": "#/components/schemas/TranscribeManagerTranscribeReferenceType" }, "example": "call" }, { "name": "reference_id", "in": "query", "required": false, "description": "Filter by the ID of the origin resource (e.g. a call ID returned from `GET /calls`). Must be supplied together with reference_type; supplying only one of the two returns a 400 error.", "schema": { "type": "string", "format": "uuid" }, "example": "5e4a0680-804e-11ec-8477-2fea5968d85b" } ], "responses": { "200": { "description": "A list of transcriptions.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/TranscribeManagerTranscribe" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a transcribe", "description": "Starts a transcription of the given reference (call, confbridge, or recording) and returns the result. Duplicate behavior differs by reference type: for a recording that already has a transcribe in the requested language, the existing transcribe is returned (200); for a call/confbridge that already has a progressing live transcribe in the requested language, the request is rejected with 409. Stop the existing transcribe first, or start with a different language.", "tags": [ "Transcribe" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "reference_type": { "$ref": "#/components/schemas/TranscribeManagerTranscribeReferenceType" }, "reference_id": { "type": "string", "description": "The ID of the reference for the transcription." }, "language": { "type": "string", "description": "The language of the transcription." }, "direction": { "allOf": [ { "$ref": "#/components/schemas/TranscribeManagerTranscribeDirection" } ], "description": "Which audio legs to transcribe. If omitted, defaults to \"both\"." }, "provider": { "$ref": "#/components/schemas/TranscribeManagerTranscribeProvider" }, "on_end_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The flow to execute when the transcription ends. The flow ID returned from the POST /flows or GET /flows response. If omitted, no follow-up flow is executed.", "example": "d4e5f6a7-b8c9-0123-4567-890abcdef012" } }, "required": [ "reference_type", "reference_id", "language" ] } } } }, "responses": { "200": { "description": "The created transcribe details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranscribeManagerTranscribe" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/transcripts": { "get": { "summary": "Retrieve a list of transcripts", "description": "Fetch a list of transcripts associated with the customer.", "tags": [ "Transcribe" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "transcribe_id", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A list of transcripts.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/TranscribeManagerTranscript" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/transfers": { "post": { "summary": "Start a transfer", "description": "Initiates a call transfer and returns the result.", "tags": [ "Transfer" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "transfer_type": { "$ref": "#/components/schemas/TransferManagerTransferType" }, "transferer_call_id": { "type": "string", "description": "Call ID of the transfer initiator." }, "transferee_addresses": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" }, "description": "Addresses of the transfer recipients." } }, "required": [ "transfer_type", "transferer_call_id", "transferee_addresses" ] } } } }, "responses": { "200": { "description": "The transfer details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransferManagerTransfer" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "500": { "$ref": "#/components/responses/InternalError" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/trunks/{id}": { "get": { "summary": "Retrieve trunk details.", "description": "Retrieves the details of a specific trunk by its ID.", "tags": [ "Trunk" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The trunk details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrarManagerTrunk" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "put": { "summary": "Update a trunk.", "description": "Updates the details of an existing trunk and returns the updated trunk's information.", "tags": [ "Trunk" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "auth_types": { "type": "array", "items": { "$ref": "#/components/schemas/RegistrarManagerAuthType" } }, "username": { "type": "string" }, "password": { "type": "string" }, "allowed_ips": { "type": "array", "items": { "type": "string" } } }, "required": [ "name", "detail", "auth_types", "username", "password", "allowed_ips" ] } } } }, "responses": { "200": { "description": "The updated trunk details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrarManagerTrunk" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a trunk.", "description": "Deletes an existing trunk by its ID.", "tags": [ "Trunk" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Trunk deleted successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrarManagerTrunk" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/trunks": { "get": { "summary": "Retrieve a list of trunks.", "description": "Retrieves a paginated list of trunks.", "tags": [ "Trunk" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of trunks.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/RegistrarManagerTrunk" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Create a new trunk.", "description": "Creates a new trunk with the provided details and returns the created trunk's information.", "tags": [ "Trunk" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "detail": { "type": "string" }, "domain_name": { "type": "string" }, "auth_types": { "type": "array", "items": { "$ref": "#/components/schemas/RegistrarManagerAuthType" } }, "username": { "type": "string" }, "password": { "type": "string" }, "allowed_ips": { "type": "array", "items": { "type": "string" } } }, "required": [ "name", "detail", "domain_name", "auth_types", "username", "password", "allowed_ips" ] } } } }, "responses": { "200": { "description": "The created trunk details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrarManagerTrunk" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/timelines/{resource_type}/{resource_id}/events": { "get": { "summary": "Get timeline events for a resource", "description": "Returns timeline events for the specified resource in WebhookMessage format.", "tags": [ "Timeline" ], "parameters": [ { "name": "resource_type", "in": "path", "required": true, "description": "The type of resource (calls, conferences, flows, activeflows)", "schema": { "type": "string", "enum": [ "calls", "conferences", "flows", "activeflows" ] } }, { "name": "resource_id", "in": "path", "required": true, "description": "The UUID of the resource", "schema": { "type": "string", "format": "uuid" } }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of timeline events.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/TimelineManagerEvent" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/timelines/calls/{call_id}/sip-analysis": { "get": { "summary": "Get SIP analysis for a call", "description": "Returns SIP messages and RTCP quality stats for the specified call from Homer SIP capture.\nInternal-to-internal messages (where both src and dst IPs are RFC 1918 private addresses) are filtered out.\nRTCP stats are extracted from X-RTP-Stat headers in BYE messages before filtering.\n", "tags": [ "Timeline" ], "parameters": [ { "name": "call_id", "in": "path", "required": true, "description": "The UUID of the call", "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "SIP analysis for the call.", "content": { "application/json": { "schema": { "type": "object", "required": [ "sip_messages" ], "properties": { "sip_messages": { "type": "array", "items": { "type": "object", "properties": { "timestamp": { "type": "string", "format": "date-time" }, "method": { "type": "string" }, "src_ip": { "type": "string" }, "src_port": { "type": "integer" }, "dst_ip": { "type": "string" }, "dst_port": { "type": "integer" }, "raw": { "type": "string" } } } }, "rtcp_stats": { "type": "object", "description": "RTCP quality metrics parsed from X-RTP-Stat header in BYE messages. Null if no RTCP stats available.", "nullable": true, "required": [ "mos", "jitter", "packet_loss_pct", "rtt", "rtp_bytes", "rtp_packets", "rtp_errors", "rtcp_bytes", "rtcp_packets", "rtcp_errors" ], "properties": { "mos": { "type": "number", "format": "double", "description": "Mean Opinion Score (1.0-5.0)" }, "jitter": { "type": "integer", "description": "Jitter in milliseconds" }, "packet_loss_pct": { "type": "number", "format": "double", "description": "Packet loss percentage" }, "rtt": { "type": "integer", "description": "Round-trip time in microseconds as reported by RTPEngine (divide by 1000 for milliseconds)" }, "rtp_bytes": { "type": "integer", "description": "Total RTP bytes transferred" }, "rtp_packets": { "type": "integer", "description": "Total RTP packets transferred" }, "rtp_errors": { "type": "integer", "description": "Total RTP errors" }, "rtcp_bytes": { "type": "integer", "description": "Total RTCP bytes transferred" }, "rtcp_packets": { "type": "integer", "description": "Total RTCP packets transferred" }, "rtcp_errors": { "type": "integer", "description": "Total RTCP errors" } } } } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/timelines/calls/{call_id}/pcap": { "get": { "summary": "Get PCAP download for a call", "description": "Returns PCAP file containing SIP messages for the specified call.\nInternal-to-internal packets (where both src and dst IPs are RFC 1918 private addresses) are filtered out.\n", "tags": [ "Timeline" ], "parameters": [ { "name": "call_id", "in": "path", "required": true, "description": "The UUID of the call", "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "PCAP download information.", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/timeline-analyses": { "get": { "summary": "Get a list of timeline analyses.", "description": "Retrieves a paginated list of activeflow AI analyses for the authenticated customer.", "tags": [ "Timeline" ], "parameters": [ { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" }, { "name": "activeflow_id", "in": "query", "schema": { "type": "string", "format": "uuid", "x-go-type": "string" }, "description": "Filter by the analyzed activeflow ID." }, { "name": "status", "in": "query", "schema": { "$ref": "#/components/schemas/TimelineManagerAnalysisStatus" }, "description": "Filter by analysis status." } ], "responses": { "200": { "description": "A list of timeline analyses.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/TimelineManagerAnalysis" } } } } ] } } } }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "post": { "summary": "Trigger an AI analysis of an ended activeflow.", "description": "Analyzes a completed (ended) activeflow asynchronously, producing a structured verdict. Returns the progressing record on a fresh trigger, or the existing record when one is already present (idempotent unless `reanalyze` is set). Requires CustomerAdmin or CustomerManager permission. The analysis is scoped to the authenticated customer; the activeflow must belong to that customer and must be in the ended state.\n", "tags": [ "Timeline" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "activeflow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The ID of the ended activeflow to analyze. Returned from the `GET /activeflows` response.", "example": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" }, "reanalyze": { "type": "boolean", "description": "When true, discards the existing completed/failed verdict and runs a fresh analysis (subject to a short cooldown). When false or omitted, an existing record is returned unchanged.\n", "example": false } }, "required": [ "activeflow_id" ] } } } }, "responses": { "200": { "description": "The progressing or existing analysis record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TimelineManagerAnalysis" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/timeline-analyses/{id}": { "get": { "summary": "Get a timeline analysis by ID.", "description": "Returns a single activeflow AI analysis record owned by the authenticated customer.", "tags": [ "Timeline" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "x-go-type": "string" }, "description": "The analysis ID." } ], "responses": { "200": { "description": "The analysis record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TimelineManagerAnalysis" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } }, "delete": { "summary": "Delete a timeline analysis.", "description": "Permanently deletes (hard delete) an analysis record. The analyzed activeflow and its events are not affected, and the activeflow can be analyzed again afterward. Requires CustomerAdmin or CustomerManager permission.", "tags": [ "Timeline" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "x-go-type": "string" }, "description": "The analysis ID." } ], "responses": { "200": { "description": "The deleted analysis record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TimelineManagerAnalysis" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "403": { "$ref": "#/components/responses/PermissionDenied" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/aggregated-events": { "get": { "summary": "Get aggregated timeline events", "description": "Returns all timeline events associated with a single activeflow execution.\nQuery by activeflow_id directly, or by call_id (which resolves to the call's activeflow).\nExactly one of activeflow_id or call_id must be provided.\n", "tags": [ "Timeline" ], "parameters": [ { "name": "activeflow_id", "in": "query", "required": false, "description": "The UUID of the activeflow. Obtained from the `id` field of `GET /activeflows` or from the `activeflow_id` field of a call.", "schema": { "type": "string", "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" } }, { "name": "call_id", "in": "query", "required": false, "description": "The UUID of the call. Obtained from the `id` field of `GET /calls`. The call's activeflow_id will be used to query events.", "schema": { "type": "string", "format": "uuid", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" } }, { "$ref": "#/components/parameters/PageSize" }, { "$ref": "#/components/parameters/PageToken" } ], "responses": { "200": { "description": "A list of aggregated timeline events sorted by timestamp descending.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CommonPagination" }, { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/TimelineManagerEvent" } } } } ] } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthenticated" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" } } } }, "/ws": { "get": { "summary": "Create a new websocket connection.", "description": "Establishes a new websocket connection for real-time communication.", "tags": [ "Websocket" ], "responses": { "401": { "$ref": "#/components/responses/Unauthenticated" }, "500": { "$ref": "#/components/responses/InternalError" } } } } }, "components": { "parameters": { "PageSize": { "name": "page_size", "in": "query", "description": "Number of results to return per page.", "required": false, "schema": { "type": "integer", "example": 25 } }, "PageToken": { "name": "page_token", "in": "query", "description": "Cursor token for pagination. Use the `next_page_token` value from the previous response.", "required": false, "schema": { "type": "string" } } }, "schemas": { "AgentManagerAgentPermission": { "type": "integer", "format": "uint64", "description": "Permission type", "example": 64, "enum": [ 0, 65535, 1, 15, 16, 32, 64, 240 ], "x-enum-varnames": [ "AgentManagerPermissionNone", "AgentManagerPermissionAll", "AgentManagerPermissionProjectSuperAdmin", "AgentManagerPermissionProjectAll", "AgentManagerPermissionCustomerAgent", "AgentManagerPermissionCustomerAdmin", "AgentManagerPermissionCustomerManager", "AgentManagerPermissionCustomerAll" ] }, "AgentManagerAgentRingMethod": { "type": "string", "description": "Method used to ring the agent for incoming calls.", "example": "ringall", "enum": [ "ringall", "linear" ], "x-enum-varnames": [ "AgentManagerAgentRingMethodRingAll", "AgentManagerAgentRingMethodLinear" ] }, "AgentManagerAgentStatus": { "type": "string", "description": "Current availability status of the agent.", "example": "available", "enum": [ "", "available", "away", "busy", "offline", "ringing" ], "x-enum-varnames": [ "AgentManagerAgentStatusNone", "AgentManagerAgentStatusAvailable", "AgentManagerAgentStatusAway", "AgentManagerAgentStatusBusy", "AgentManagerAgentStatusOffline", "AgentManagerAgentStatusRinging" ] }, "AgentManagerAgent": { "type": "object", "description": "Represents an agent resource.", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the agent.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this agent. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "username": { "type": "string", "description": "Agent's login username, typically an email address.", "example": "agent@example.com" }, "name": { "type": "string", "description": "Display name of the agent.", "example": "John Smith" }, "detail": { "type": "string", "description": "Additional detail or notes about the agent.", "example": "Senior support agent" }, "ring_method": { "$ref": "#/components/schemas/AgentManagerAgentRingMethod", "description": "Method used to ring the agent for incoming calls.", "example": "ringall" }, "status": { "$ref": "#/components/schemas/AgentManagerAgentStatus", "description": "Current availability status of the agent.", "example": "available" }, "permission": { "$ref": "#/components/schemas/AgentManagerAgentPermission", "description": "Permission level assigned to the agent.", "example": 64 }, "tag_ids": { "type": "array", "items": { "type": "string", "format": "uuid", "x-go-type": "string" }, "description": "List of tag IDs assigned to this agent. Returned from the `POST /tags` or `GET /tags` response.", "example": [ "b1a2c3d4-e5f6-7890-abcd-ef1234567890" ] }, "addresses": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" }, "description": "Agent's endpoint addresses for receiving calls." }, "direct_hash": { "type": "string", "description": "Hash for direct access via SIP URI sip:direct.@sip.voipbin.net. Returned from the resource's `direct_hash` field.", "example": "a8f3b2c1d4e5" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the agent was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the agent was last updated.", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the agent was deleted.", "example": "2026-01-17T10:00:00.000000Z" } } }, "BillingManagerAccountPaymentMethod": { "type": "string", "description": "The method of payment used for the account.", "example": "credit card", "enum": [ "", "credit card" ], "x-enum-varnames": [ "BillingManagerAccountPaymentMethodNone", "BillingManagerAccountPaymentMethodCreditCard" ] }, "BillingManagerAccountPaymentType": { "type": "string", "description": "The type of payment associated with the account.", "example": "prepaid", "enum": [ "", "prepaid" ], "x-enum-varnames": [ "BillingManagerAccountPaymentTypeNone", "BillingManagerAccountPaymentTypePrepaid" ] }, "BillingManagerAccountPlanType": { "type": "string", "description": "The plan tier of the billing account. Determines resource creation limits.", "example": "basic", "enum": [ "free", "basic", "professional", "unlimited" ], "x-enum-varnames": [ "BillingManagerAccountPlanTypeFree", "BillingManagerAccountPlanTypeBasic", "BillingManagerAccountPlanTypeProfessional", "BillingManagerAccountPlanTypeUnlimited" ] }, "BillingManagerAccountPlanStatus": { "type": "string", "description": "The subscription plan status of the billing account. Indicates whether the plan is actively running or scheduled for cancellation.", "example": "active", "enum": [ "active", "canceling" ], "x-enum-varnames": [ "BillingManagerAccountPlanStatusActive", "BillingManagerAccountPlanStatusCanceling" ] }, "BillingManagerAccount": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the account.", "example": "b8c9d0e1-f2a3-4567-8901-23456789abcd" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the associated customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "name": { "type": "string", "description": "The display name of the billing account.", "example": "Production Account" }, "detail": { "type": "string", "description": "A human-readable note describing the purpose of this account.", "example": "Main billing account for production services" }, "plan_type": { "description": "The plan tier of the billing account.", "example": "basic", "$ref": "#/components/schemas/BillingManagerAccountPlanType" }, "plan_status": { "description": "The subscription plan status.", "example": "active", "$ref": "#/components/schemas/BillingManagerAccountPlanStatus" }, "balance_credit": { "type": "integer", "format": "int64", "description": "The credit balance of the account in micros (1 USD = 1,000,000).", "example": 1500000 }, "balance_token": { "type": "integer", "format": "int64", "description": "The token balance of the account.", "example": 500 }, "payment_type": { "description": "The type of payment associated with the account.", "example": "prepaid", "$ref": "#/components/schemas/BillingManagerAccountPaymentType" }, "payment_method": { "description": "The method of payment used for the account.", "example": "credit card", "$ref": "#/components/schemas/BillingManagerAccountPaymentMethod" }, "paddle_subscription_id": { "type": "string", "description": "The Paddle subscription identifier for this billing account. Populated automatically when a Paddle subscription is created via Paddle webhook processing. Read-only — not settable via API. Present only when the account has an active Paddle subscription.", "example": "sub_01h8bxq9f3e4t5a6g7h8j9k0" }, "paddle_customer_id": { "type": "string", "description": "The Paddle customer identifier for this billing account. Populated automatically when a Paddle customer record is created via Paddle webhook processing. Read-only — not settable via API. Present only when the account has a linked Paddle customer.", "example": "ctm_01h8bxq9f3e4t5a6g7h8j9k0" }, "tm_last_topup": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp of the last token top-up.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_next_topup": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp of the next scheduled token top-up.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp when the account was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp when the account was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp when the account was deleted, if applicable.", "example": "2026-01-15T09:30:00.000000Z" } } }, "BillingManagerAccountStatus": { "type": "string", "description": "The status of the billing account.", "example": "active", "enum": [ "active", "frozen", "deleted" ], "x-enum-varnames": [ "BillingManagerAccountStatusActive", "BillingManagerAccountStatusFrozen", "BillingManagerAccountStatusDeleted" ] }, "BillingManagerAccountAdmin": { "type": "object", "description": "Internal billing account representation for project admins. Includes all fields including status.", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the account.", "example": "b8c9d0e1-f2a3-4567-8901-23456789abcd" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the associated customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "status": { "description": "The status of the billing account.", "example": "active", "$ref": "#/components/schemas/BillingManagerAccountStatus" }, "name": { "type": "string", "description": "The display name of the billing account.", "example": "Production Account" }, "detail": { "type": "string", "description": "A human-readable note describing the purpose of this account.", "example": "Main billing account for production services" }, "plan_type": { "description": "The plan tier of the billing account.", "example": "basic", "$ref": "#/components/schemas/BillingManagerAccountPlanType" }, "plan_status": { "description": "The subscription plan status.", "example": "active", "$ref": "#/components/schemas/BillingManagerAccountPlanStatus" }, "balance_credit": { "type": "integer", "format": "int64", "description": "The credit balance of the account in micros (1 USD = 1,000,000).", "example": 1500000 }, "balance_token": { "type": "integer", "format": "int64", "description": "The token balance of the account.", "example": 500 }, "payment_type": { "description": "The type of payment associated with the account.", "example": "prepaid", "$ref": "#/components/schemas/BillingManagerAccountPaymentType" }, "payment_method": { "description": "The method of payment used for the account.", "example": "credit card", "$ref": "#/components/schemas/BillingManagerAccountPaymentMethod" }, "paddle_subscription_id": { "type": "string", "description": "The Paddle subscription identifier for this billing account.", "example": "sub_01h8bxq9f3e4t5a6g7h8j9k0" }, "paddle_customer_id": { "type": "string", "description": "The Paddle customer identifier for this billing account.", "example": "ctm_01h8bxq9f3e4t5a6g7h8j9k0" }, "tm_last_topup": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp of the last token top-up.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_next_topup": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp of the next scheduled token top-up.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp when the account was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp when the account was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp when the account was deleted, if applicable.", "example": "2026-01-15T09:30:00.000000Z" } } }, "BillingManagerBillingreferenceType": { "type": "string", "description": "The type of reference associated with this billing.", "example": "call", "enum": [ "", "call", "call_extension", "sms", "email", "number", "number_renew", "credit_free_tier", "monthly_allowance", "credit_adjustment", "token_adjustment", "speaking", "recording" ], "x-enum-varnames": [ "BillingManagerBillingreferenceTypeNone", "BillingManagerBillingreferenceTypeCall", "BillingManagerBillingreferenceTypeCallExtension", "BillingManagerBillingreferenceTypeSMS", "BillingManagerBillingreferenceTypeEmail", "BillingManagerBillingreferenceTypeNumber", "BillingManagerBillingreferenceTypeNumberRenew", "BillingManagerBillingreferenceTypeCreditFreeTier", "BillingManagerBillingreferenceTypeMonthlyAllowance", "BillingManagerBillingreferenceTypeCreditAdjustment", "BillingManagerBillingreferenceTypeTokenAdjustment", "BillingManagerBillingreferenceTypeSpeaking", "BillingManagerBillingreferenceTypeRecording" ] }, "BillingManagerBillingCostType": { "type": "string", "description": "The classification of the billing cost.", "example": "call_pstn_outgoing", "enum": [ "", "call_pstn_outgoing", "call_pstn_incoming", "call_vn", "call_extension", "call_direct_ext", "sms", "email", "number", "number_renew", "tts", "recording" ], "x-enum-varnames": [ "BillingManagerBillingCostTypeNone", "BillingManagerBillingCostTypeCallPSTNOutgoing", "BillingManagerBillingCostTypeCallPSTNIncoming", "BillingManagerBillingCostTypeCallVN", "BillingManagerBillingCostTypeCallExtension", "BillingManagerBillingCostTypeCallDirectExt", "BillingManagerBillingCostTypeSMS", "BillingManagerBillingCostTypeEmail", "BillingManagerBillingCostTypeNumber", "BillingManagerBillingCostTypeNumberRenew", "BillingManagerBillingCostTypeTTS", "BillingManagerBillingCostTypeRecording" ] }, "BillingManagerBillingStatus": { "type": "string", "description": "Status of the billing.", "example": "progressing", "enum": [ "progressing", "end", "pending", "finished" ], "x-enum-varnames": [ "BillingManagerBillingStatusProgressing", "BillingManagerBillingStatusEnd", "BillingManagerBillingStatusPending", "BillingManagerBillingStatusFinished" ] }, "BillingManagerBillingTransactionType": { "type": "string", "description": "The nature of the ledger entry.", "example": "usage", "enum": [ "usage", "top_up", "adjustment", "refund" ], "x-enum-varnames": [ "BillingManagerBillingTransactionTypeUsage", "BillingManagerBillingTransactionTypeTopUp", "BillingManagerBillingTransactionTypeAdjustment", "BillingManagerBillingTransactionTypeRefund" ] }, "BillingManagerBilling": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the billing.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The customer's unique identifier. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "account_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The billing account ID. Returned from the `GET /billing_accounts/{id}` response.", "example": "b8c9d0e1-f2a3-4567-8901-23456789abcd" }, "transaction_type": { "description": "The nature of the ledger entry.", "example": "usage", "$ref": "#/components/schemas/BillingManagerBillingTransactionType" }, "status": { "description": "Status of the billing.", "example": "progressing", "$ref": "#/components/schemas/BillingManagerBillingStatus" }, "reference_type": { "description": "The type of reference associated with this billing.", "example": "call", "$ref": "#/components/schemas/BillingManagerBillingreferenceType" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource. The actual resource type is determined by reference_type. Returned from the corresponding resource endpoint.", "example": "f6a7b8c9-d0e1-2345-6789-0abcdef01234" }, "cost_type": { "description": "The classification of the billing cost.", "example": "call_pstn_outgoing", "$ref": "#/components/schemas/BillingManagerBillingCostType" }, "usage_duration": { "type": "integer", "description": "The actual usage duration in seconds.", "example": 125 }, "billable_units": { "type": "integer", "description": "The number of billable units (e.g. minutes, rounded up).", "example": 3 }, "rate_token_per_unit": { "type": "integer", "format": "int64", "description": "The token rate per billable unit.", "example": 10 }, "rate_credit_per_unit": { "type": "integer", "format": "int64", "description": "The credit rate per billable unit in micros.", "example": 50000 }, "amount_token": { "type": "integer", "format": "int64", "description": "The token delta for this transaction (negative for usage, positive for top-up).", "example": -30 }, "amount_credit": { "type": "integer", "format": "int64", "description": "The credit delta for this transaction in micros (negative for usage, positive for top-up).", "example": -150000 }, "balance_token_snapshot": { "type": "integer", "format": "int64", "description": "The token balance after this transaction.", "example": 470 }, "balance_credit_snapshot": { "type": "integer", "format": "int64", "description": "The credit balance after this transaction in micros.", "example": 1350000 }, "idempotency_key": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "A unique key to prevent duplicate transactions.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "tm_billing_start": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The start timestamp of the billing period.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_billing_end": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The end timestamp of the billing period.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The last update timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The deletion timestamp, if applicable.", "example": "2026-01-15T09:30:00.000000Z" } } }, "CallManagerCallDirection": { "type": "string", "description": "Call direction", "example": "outgoing", "enum": [ "incoming", "outgoing" ], "x-enum-varnames": [ "CallManagerCallDirectionIncoming", "CallManagerCallDirectionOutgoing" ] }, "CallManagerCallHangupBy": { "type": "string", "description": "Indicates who hung up the call", "example": "remote", "enum": [ "", "remote", "local" ], "x-enum-varnames": [ "CallManagerCallHangupByNone", "CallManagerCallHangupByRemote", "CallManagerCallHangupByLocal" ] }, "CallManagerCallHangupReason": { "type": "string", "description": "Reason for call hangup", "example": "normal", "enum": [ "", "normal", "failed", "busy", "cancel", "timeout", "noanswer", "dialout", "amd" ], "x-enum-varnames": [ "CallManagerCallHangupReasonNone", "CallManagerCallHangupReasonNormal", "CallManagerCallHangupReasonFailed", "CallManagerCallHangupReasonBusy", "CallManagerCallHangupReasonCancel", "CallManagerCallHangupReasonTimeout", "CallManagerCallHangupReasonNoanswer", "CallManagerCallHangupReasonDialout", "CallManagerCallHangupReasonAMD" ] }, "CallManagerCallMuteDirection": { "type": "string", "description": "Possible mute directions for the call", "example": "both", "enum": [ "", "both", "out", "in" ], "x-enum-varnames": [ "CallManagerCallMuteDirectionNone", "CallManagerCallMuteDirectionBoth", "CallManagerCallMuteDirectionOut", "CallManagerCallMuteDirectionIn" ] }, "CallManagerCallStatus": { "type": "string", "description": "Call status", "example": "progressing", "enum": [ "dialing", "ringing", "progressing", "terminating", "canceling", "hangup" ], "x-enum-varnames": [ "CallManagerCallStatusDialing", "CallManagerCallStatusRinging", "CallManagerCallStatusProgressing", "CallManagerCallStatusTerminating", "CallManagerCallStatusCanceling", "CallManagerCallStatusHangup" ] }, "CallManagerCallType": { "type": "string", "description": "Call type", "example": "flow", "enum": [ "", "flow", "conference", "sip-service" ], "x-enum-varnames": [ "CallManagerCallTypeNone", "CallManagerCallTypeFlow", "CallManagerCallTypeConference", "CallManagerCallTypeSIPService" ] }, "CallManagerCall": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the call.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The customer ID that owns this call. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "owner_type": { "type": "string", "description": "Type of the resource owner (e.g., agent, queue).", "example": "agent" }, "owner_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the resource owner. Returned from the corresponding owner resource endpoint (e.g., `GET /agents`, `GET /queues`).", "example": "c2d3e4f5-a6b7-8901-2cde-f01234567890" }, "flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The flow ID associated with this call. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "activeflow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The activeflow ID associated with this call. Returned from the `POST /activeflows` or `GET /activeflows` response.", "example": "d4e5f6a7-b8c9-0123-4567-890abcdef012" }, "type": { "description": "The type of this call.", "example": "flow", "$ref": "#/components/schemas/CallManagerCallType" }, "master_call_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the master call that initiated this call. Returned from the `POST /calls` or `GET /calls` response.", "example": "4d5e6f7a-8b9c-0123-def0-123456789012" }, "chained_call_ids": { "type": "array", "items": { "type": "string", "format": "uuid", "x-go-type": "string" }, "description": "Chained call IDs. Each ID is returned from the `POST /calls` or `GET /calls` response.", "example": [ "550e8400-e29b-41d4-a716-446655440000" ] }, "recording_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The current recording ID. Returned from the `GET /recordings` response.", "example": "e5f6a7b8-c9d0-1234-5678-90abcdef0123" }, "recording_ids": { "type": "array", "items": { "type": "string", "format": "uuid", "x-go-type": "string" }, "description": "Recording IDs associated with this call. Each ID is returned from the `GET /recordings` response.", "example": [ "e5f6a7b8-c9d0-1234-5678-90abcdef0123" ] }, "groupcall_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Group call ID. Returned from the `POST /groupcalls` or `GET /groupcalls` response. Indicates this call is part of a group call.", "example": "5e6f7a8b-9c0d-1234-ef01-234567890123" }, "source": { "description": "Source address of the call.", "$ref": "#/components/schemas/CommonAddress" }, "destination": { "description": "Destination address of the call.", "$ref": "#/components/schemas/CommonAddress" }, "status": { "description": "Current status of the call.", "example": "progressing", "$ref": "#/components/schemas/CallManagerCallStatus" }, "action": { "description": "The current action being executed on this call.", "$ref": "#/components/schemas/FlowManagerAction" }, "direction": { "description": "Direction of the call.", "example": "outgoing", "$ref": "#/components/schemas/CallManagerCallDirection" }, "mute_direction": { "description": "Current mute direction of the call.", "example": "both", "$ref": "#/components/schemas/CallManagerCallMuteDirection" }, "hangup_by": { "description": "Indicates who hung up the call.", "example": "remote", "$ref": "#/components/schemas/CallManagerCallHangupBy" }, "hangup_reason": { "description": "Reason the call was hung up.", "example": "normal", "$ref": "#/components/schemas/CallManagerCallHangupReason" }, "metadata": { "type": "object", "additionalProperties": true, "nullable": true, "description": "Internal metadata for the call. Contains key-value pairs set by the system.\nCurrently supported keys:\n- `rtp_debug` (boolean): When `true`, RTPEngine is capturing RTP traffic for this call.\n", "example": { "rtp_debug": true } }, "tm_progressing": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp for call progressing.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_ringing": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp for call ringing.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_hangup": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp for call hangup.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The last update timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The deletion timestamp, if applicable.", "example": "2026-01-15T09:30:00.000000Z" } } }, "CallManagerGroupcallAnswerMethod": { "type": "string", "description": "Method to handle answered calls", "example": "hangup_others", "enum": [ "", "hangup_others" ], "x-enum-varnames": [ "CallManagerGroupcallAnswerMethodNone", "CallManagerGroupcallAnswerMethodHangupOthers" ] }, "CallManagerGroupcallRingMethod": { "type": "string", "description": "Method used for dialing", "example": "ring_all", "enum": [ "", "ring_all", "linear" ], "x-enum-varnames": [ "CallManagerGroupcallRingMethodNone", "CallManagerGroupcallRingMethodRingAll", "CallManagerGroupcallRingMethodLinear" ] }, "CallManagerGroupcallStatus": { "type": "string", "description": "Current status of the call or group call", "example": "progressing", "enum": [ "progressing", "hangingup", "hangup" ], "x-enum-varnames": [ "CallManagerGroupcallStatusProgressing", "CallManagerGroupcallStatusHangingup", "CallManagerGroupcallStatusHangup" ] }, "CallManagerGroupcall": { "type": "object", "description": "Call or group call information", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the group call.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The customer ID that owns this group call. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "owner_type": { "type": "string", "description": "Type of the resource owner (e.g., agent, queue).", "example": "agent" }, "owner_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the resource owner. Returned from the corresponding owner resource endpoint (e.g., `GET /agents`, `GET /queues`).", "example": "c2d3e4f5-a6b7-8901-2cde-f01234567890" }, "status": { "description": "Current status of the group call.", "example": "progressing", "$ref": "#/components/schemas/CallManagerGroupcallStatus" }, "flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The flow ID associated with this group call. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "source": { "$ref": "#/components/schemas/CommonAddress", "nullable": true, "description": "Source address of the group call." }, "destinations": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" }, "minItems": 1, "description": "List of target addresses. Must contain at least one destination." }, "master_call_id": { "type": "string", "format": "uuid", "x-go-type": "string", "nullable": true, "description": "The unique identifier of the master call that initiated this group call. Returned from the `POST /calls` or `GET /calls` response.", "example": "4d5e6f7a-8b9c-0123-def0-123456789012" }, "master_groupcall_id": { "type": "string", "format": "uuid", "x-go-type": "string", "nullable": true, "description": "The unique identifier of the master group call, if applicable. Returned from the `POST /groupcalls` or `GET /groupcalls` response.", "example": "5e6f7a8b-9c0d-1234-ef01-234567890123" }, "ring_method": { "description": "The method used for dialing destinations.", "example": "ring_all", "$ref": "#/components/schemas/CallManagerGroupcallRingMethod" }, "answer_method": { "description": "The method to handle answered calls.", "example": "hangup_others", "$ref": "#/components/schemas/CallManagerGroupcallAnswerMethod" }, "answer_call_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the answered call. Returned from the `POST /calls` or `GET /calls` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "call_ids": { "type": "array", "items": { "type": "string", "format": "uuid", "x-go-type": "string" }, "description": "List of associated call IDs. Each ID is returned from the `POST /calls` or `GET /calls` response.", "example": [ "550e8400-e29b-41d4-a716-446655440000" ] }, "answer_groupcall_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the answered group call. Returned from the `POST /groupcalls` or `GET /groupcalls` response.", "example": "5e6f7a8b-9c0d-1234-ef01-234567890123" }, "groupcall_ids": { "type": "array", "items": { "type": "string", "format": "uuid", "x-go-type": "string" }, "description": "List of associated group call IDs. Each ID is returned from the `POST /groupcalls` or `GET /groupcalls` response.", "example": [ "5e6f7a8b-9c0d-1234-ef01-234567890123" ] }, "call_count": { "type": "integer", "description": "Number of remaining calls in the current dial.", "example": 2 }, "groupcall_count": { "type": "integer", "description": "Number of remaining group calls in the current dial.", "example": 1 }, "dial_index": { "type": "integer", "nullable": true, "description": "Current dial index, valid only when the ring method is \"ring_all\".", "example": 0 }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The last update timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "nullable": true, "description": "The deletion timestamp, if applicable.", "example": "2026-01-15T09:30:00.000000Z" } } }, "CallManagerRecordingFormat": { "type": "string", "description": "The format of the recording.", "example": "wav", "enum": [ "wav" ], "x-enum-varnames": [ "CallManagerRecordingFormatWAV" ] }, "CallManagerRecordingReferenceType": { "type": "string", "description": "Type of reference for the recording.", "example": "call", "enum": [ "call", "confbridge" ], "x-enum-varnames": [ "CallManagerRecordingReferenceTypeCall", "CallManagerRecordingReferenceTypeConfbridge" ] }, "CallManagerRecordingStatus": { "type": "string", "description": "The status of the recording.", "example": "recording", "enum": [ "initiating", "recording", "stopping", "ended" ], "x-enum-varnames": [ "CallManagerRecordingStatusInitiating", "CallManagerRecordingStatusRecording", "CallManagerRecordingStatusStopping", "CallManagerRecordingStatusEnded" ] }, "CallManagerRecording": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the recording.", "example": "e5f6a7b8-c9d0-1234-5678-90abcdef0123" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The customer ID that owns this recording. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "owner_type": { "type": "string", "description": "Type of the resource owner (e.g., call, confbridge).", "example": "call" }, "owner_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the resource owner. Returned from the corresponding owner resource endpoint (e.g., `GET /calls`, `GET /conferences`).", "example": "c2d3e4f5-a6b7-8901-2cde-f01234567890" }, "reference_type": { "description": "The type of reference, either a \"call\" or a \"confbridge\".", "example": "call", "$ref": "#/components/schemas/CallManagerRecordingReferenceType" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource. The actual resource type is determined by reference_type. Returned from the corresponding resource endpoint.", "example": "f6a7b8c9-d0e1-2345-6789-0abcdef01234" }, "status": { "description": "The status of the recording.", "example": "recording", "$ref": "#/components/schemas/CallManagerRecordingStatus" }, "format": { "description": "The format of the recording file (e.g., WAV).", "example": "wav", "$ref": "#/components/schemas/CallManagerRecordingFormat" }, "activeflow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The activeflow ID associated with this recording. Returned from the `POST /activeflows` or `GET /activeflows` response.", "example": "d4e5f6a7-b8c9-0123-4567-890abcdef012" }, "on_end_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Flow ID to execute when recording ends. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "tm_start": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The start timestamp of the recording.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_end": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The end timestamp of the recording.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The last update timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The deletion timestamp, if applicable.", "example": "2026-01-15T09:30:00.000000Z" } } }, "CallManagerExternalMedia": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the external media resource.", "example": "a1b2c3d4-e5f6-7890-abcd-ef0123456789" }, "asterisk_id": { "type": "string", "description": "The Asterisk instance handling this external media.", "example": "asterisk-01" }, "channel_id": { "type": "string", "description": "The external media channel ID in Asterisk.", "example": "1643723400.42" }, "bridge_id": { "type": "string", "description": "The bridge ID connecting the snoop channel and external media channel.", "example": "bridge-ext-media-001" }, "reference_type": { "type": "string", "description": "The type of resource this external media is associated with.", "enum": [ "call", "confbridge" ], "x-enum-varnames": [ "CallManagerExternalMediaReferenceTypeCall", "CallManagerExternalMediaReferenceTypeConfbridge" ], "example": "call" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource. The actual resource type is determined by reference_type. Returned from the corresponding resource endpoint (e.g., `GET /calls` or `GET /conferences`).", "example": "b2c3d4e5-f6a7-8901-bcde-f01234567890" }, "status": { "type": "string", "description": "The current status of the external media.", "enum": [ "running", "terminating", "terminated" ], "x-enum-varnames": [ "CallManagerExternalMediaStatusRunning", "CallManagerExternalMediaStatusTerminating", "CallManagerExternalMediaStatusTerminated" ], "example": "running" }, "local_ip": { "type": "string", "description": "The local IP address assigned for external media streaming.", "example": "10.0.1.5" }, "local_port": { "type": "integer", "description": "The local port assigned for external media streaming.", "example": 20000 }, "external_host": { "type": "string", "description": "The external host address for media streaming.", "example": "media.example.com:10000" }, "encapsulation": { "type": "string", "description": "Payload encapsulation protocol.", "enum": [ "rtp", "audiosocket", "none" ], "x-enum-varnames": [ "CallManagerExternalMediaEncapsulationRTP", "CallManagerExternalMediaEncapsulationAudioSocket", "CallManagerExternalMediaEncapsulationNone" ], "example": "rtp" }, "transport": { "type": "string", "description": "Transport protocol for media streaming.", "enum": [ "udp", "tcp", "websocket" ], "x-enum-varnames": [ "CallManagerExternalMediaTransportUDP", "CallManagerExternalMediaTransportTCP", "CallManagerExternalMediaTransportWebsocket" ], "example": "udp" }, "transport_data": { "type": "string", "description": "Transport-specific data. For websocket transport, this is appended to the dialstring.", "example": "" }, "media_uri": { "type": "string", "description": "WebSocket media URI for connecting to Asterisk. Present only when transport is websocket.", "example": "ws://10.0.1.5:8088/media/abc123" }, "connection_type": { "type": "string", "description": "Connection type for media streaming.", "example": "client" }, "format": { "type": "string", "description": "Audio format for the media stream.", "example": "ulaw" }, "direction_listen": { "type": "string", "description": "The listen direction of the external media channel.", "enum": [ "", "both", "in", "out" ], "x-enum-varnames": [ "CallManagerExternalMediaDirectionNone", "CallManagerExternalMediaDirectionBoth", "CallManagerExternalMediaDirectionIn", "CallManagerExternalMediaDirectionOut" ], "example": "both" }, "direction_speak": { "type": "string", "description": "The speak direction of the external media channel.", "enum": [ "", "both", "in", "out" ], "x-enum-varnames": [ "CallManagerExternalMediaDirectionSpeakNone", "CallManagerExternalMediaDirectionSpeakBoth", "CallManagerExternalMediaDirectionSpeakIn", "CallManagerExternalMediaDirectionSpeakOut" ], "example": "both" } } }, "CallManagerOutboundConfig": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "example": "00000000-0000-0000-0000-000000000001", "description": "The unique identifier of the outbound config." }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "example": "00000000-0000-0000-0000-000000000001", "description": "The customer ID that owns this outbound config. Returned from the `GET /customers` response." }, "name": { "type": "string", "example": "production outbound config", "description": "Human-readable name for this outbound config." }, "detail": { "type": "string", "example": "allows US and UK PSTN calls", "description": "Free-text description of this outbound config." }, "destination_whitelist": { "type": "array", "items": { "type": "string" }, "description": "ISO 3166 alpha-2 country codes (lowercase). Empty array = deny all PSTN calls.", "example": [ "us", "gb", "kr" ] }, "codecs": { "type": "string", "description": "Comma-separated codec preference list (e.g. PCMU,PCMA,G729). Empty = server default.", "example": "PCMU,PCMA" }, "default_outgoing_source_number_id": { "type": "string", "format": "uuid", "x-go-type": "string", "nullable": true, "description": "UUID of the customer's default outgoing source number, used as the caller ID\nwhen an outgoing tel call has no valid caller-supplied source.\nSet to `00000000-0000-0000-0000-000000000000` to clear the default.\nThe number must belong to the customer, be of type `normal`, and be active.\nValidated at update time and re-validated at call time.\nObtained from the `id` field of the `GET /numbers` response.\n", "example": "00000000-0000-0000-0000-000000000001" }, "tm_create": { "type": "string", "format": "date-time", "nullable": true, "description": "Timestamp when the outbound config was created." }, "tm_update": { "type": "string", "format": "date-time", "nullable": true, "description": "Timestamp when the outbound config was last updated." }, "tm_delete": { "type": "string", "format": "date-time", "nullable": true, "description": "Timestamp when the outbound config was deleted (soft-delete)." } } }, "CallManagerOutboundConfigUpdateRequest": { "type": "object", "properties": { "name": { "type": "string", "description": "Human-readable name for this outbound config.", "example": "production outbound config" }, "detail": { "type": "string", "description": "Free-text description of this outbound config.", "example": "allows US and UK PSTN calls" }, "destination_whitelist": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "ISO 3166 alpha-2 country codes (lowercase). Send null or omit to leave unchanged. Send [] to deny all PSTN calls.", "example": [ "us", "gb", "kr" ] }, "codecs": { "type": "string", "nullable": true, "description": "Comma-separated codec preference list. Send null or omit to leave unchanged. Send empty string to use server default.", "example": "PCMU,PCMA" }, "default_outgoing_source_number_id": { "type": "string", "format": "uuid", "description": "UUID of the customer's default outgoing source number to set.\nSend `00000000-0000-0000-0000-000000000000` to clear the default.\nOmit this field (or send `null`) to leave the current value unchanged.\nThe number must belong to the customer, be of type `normal`, and be active.\n", "example": "00000000-0000-0000-0000-000000000001" } } }, "CallManagerOutboundConfigList": { "type": "object", "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/CallManagerOutboundConfig" } }, "next_page_token": { "type": "string", "description": "Cursor token for the next page of results. Pass this value as the page_token parameter in the next request." } } }, "CampaignManagerCampaignEndHandle": { "type": "string", "description": "Behavior of the campaign after outdial has no more targets.", "example": "stop", "enum": [ "stop", "continue" ], "x-enum-varnames": [ "CampaignManagerCampaignEndHandleStop", "CampaignManagerCampaignEndHandleContinue" ] }, "CampaignManagerCampaignExecute": { "type": "string", "description": "Execution action for the campaign.", "example": "run", "enum": [ "run", "stop" ], "x-enum-varnames": [ "CampaignManagerCampaignExecuteRun", "CampaignManagerCampaignExecuteStop" ] }, "CampaignManagerCampaignStatus": { "type": "string", "description": "Status of the campaign.", "example": "run", "enum": [ "stop", "stopping", "run" ], "x-enum-varnames": [ "CampaignManagerCampaignStatusStop", "CampaignManagerCampaignStatusStopping", "CampaignManagerCampaignStatusRun" ] }, "CampaignManagerCampaignType": { "type": "string", "description": "Type of campaign.", "example": "call", "enum": [ "call", "flow" ], "x-enum-varnames": [ "CampaignManagerCampaignTypeCall", "CampaignManagerCampaignTypeFlow" ] }, "CampaignManagerCampaign": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the campaign.", "example": "c3d4e5f6-a7b8-9012-3456-7890abcdef01" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "type": { "$ref": "#/components/schemas/CampaignManagerCampaignType", "description": "The type of campaign.", "example": "call" }, "name": { "type": "string", "description": "Display name of the campaign.", "example": "Q1 Outbound Campaign" }, "detail": { "type": "string", "description": "Additional details about the campaign.", "example": "Quarterly customer outreach campaign" }, "status": { "$ref": "#/components/schemas/CampaignManagerCampaignStatus", "description": "Current status of the campaign.", "example": "run" }, "service_level": { "type": "integer", "description": "Target service level percentage.", "example": 80 }, "end_handle": { "$ref": "#/components/schemas/CampaignManagerCampaignEndHandle", "description": "Behavior when outdial has no more targets.", "example": "stop" }, "actions": { "type": "array", "items": { "$ref": "#/components/schemas/FlowManagerAction" }, "description": "Ordered list of actions to execute for each campaign call." }, "outplan_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the outplan. Returned from the `POST /outplans` or `GET /outplans` response.", "example": "2b3c4d5e-6f7a-8901-bcde-f12345678901" }, "outdial_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the outdial. Returned from the `POST /outdials` or `GET /outdials` response.", "example": "3c4d5e6f-7a8b-9012-cdef-012345678901" }, "queue_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the queue. Returned from the `POST /queues` or `GET /queues` response.", "example": "1a2b3c4d-5e6f-7890-abcd-ef1234567890" }, "next_campaign_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the next campaign to execute after this one completes. Returned from the `POST /campaigns` or `GET /campaigns` response.", "example": "c3d4e5f6-a7b8-9012-3456-7890abcdef01" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the campaign was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the campaign was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the campaign was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "CampaignManagerCampaigncallReferenceType": { "type": "string", "description": "Type of reference for the campaign call.", "example": "call", "enum": [ "none", "call", "flow" ], "x-enum-varnames": [ "CampaignManagerCampaigncallReferenceTypeNone", "CampaignManagerCampaigncallReferenceTypeCall", "CampaignManagerCampaigncallReferenceTypeFlow" ] }, "CampaignManagerCampaigncallResult": { "type": "string", "description": "Result of the campaign call attempt.", "example": "success", "enum": [ "", "success", "fail" ], "x-enum-varnames": [ "CampaignManagerCampaigncallResultNone", "CampaignManagerCampaigncallResultSuccess", "CampaignManagerCampaigncallResultFail" ] }, "CampaignManagerCampaigncallStatus": { "type": "string", "description": "Status of the campaign call.", "example": "progressing", "enum": [ "dialing", "progressing", "done" ], "x-enum-varnames": [ "CampaignManagerCampaigncallStatusDialing", "CampaignManagerCampaigncallStatusProgressing", "CampaignManagerCampaigncallStatusDone" ] }, "CampaignManagerCampaigncall": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the campaign call.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "campaign_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the campaign. Returned from the `POST /campaigns` or `GET /campaigns` response.", "example": "c3d4e5f6-a7b8-9012-3456-7890abcdef01" }, "outplan_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the outbound plan. Returned from the `POST /outplans` or `GET /outplans` response.", "example": "2b3c4d5e-6f7a-8901-bcde-f12345678901" }, "outdial_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the outbound dial. Returned from the `POST /outdials` or `GET /outdials` response.", "example": "3c4d5e6f-7a8b-9012-cdef-012345678901" }, "outdial_target_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the outbound dial target. Returned from the `GET /outdials/{id}/targets` response.", "example": "3c4d5e6f-7a8b-9012-cdef-012345678901" }, "queue_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the queue. Returned from the `POST /queues` or `GET /queues` response.", "example": "1a2b3c4d-5e6f-7890-abcd-ef1234567890" }, "activeflow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the activeflow. Returned from the `GET /activeflows` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow. Returned from the `POST /flows` or `GET /flows` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "reference_type": { "$ref": "#/components/schemas/CampaignManagerCampaigncallReferenceType", "description": "Type of reference for the campaign call.", "example": "call" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource. The actual resource type is determined by reference_type. Returned from the corresponding resource endpoint.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "status": { "$ref": "#/components/schemas/CampaignManagerCampaigncallStatus", "description": "Status of the campaign call.", "example": "progressing" }, "result": { "$ref": "#/components/schemas/CampaignManagerCampaigncallResult", "description": "Result of the campaign call attempt.", "example": "success" }, "source": { "$ref": "#/components/schemas/CommonAddress", "description": "Source address of the campaign call." }, "destination": { "$ref": "#/components/schemas/CommonAddress", "description": "Destination address of the campaign call." }, "destination_index": { "type": "integer", "description": "Index of the current destination being dialed.", "example": 0 }, "try_count": { "type": "integer", "description": "Number of dialing attempts made.", "example": 2 }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the campaign call was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the campaign call was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the campaign call was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "CampaignManagerOutplan": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the outplan.", "example": "2b3c4d5e-6f7a-8901-bcde-f12345678901" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "name": { "type": "string", "description": "Name of the outplan.", "example": "Standard Outbound Plan" }, "detail": { "type": "string", "description": "Detailed information about the outplan.", "example": "Default outbound dialing plan for campaigns" }, "source": { "$ref": "#/components/schemas/CommonAddress", "description": "Source address for outbound calls." }, "dial_timeout": { "type": "integer", "description": "Dial timeout in milliseconds.", "example": 30000 }, "try_interval": { "type": "integer", "description": "Interval between dialing attempts in milliseconds.", "example": 60000 }, "max_try_count_0": { "type": "integer", "description": "Maximum number of tries for level 0.", "example": 3 }, "max_try_count_1": { "type": "integer", "description": "Maximum number of tries for level 1.", "example": 2 }, "max_try_count_2": { "type": "integer", "description": "Maximum number of tries for level 2.", "example": 1 }, "max_try_count_3": { "type": "integer", "description": "Maximum number of tries for level 3.", "example": 1 }, "max_try_count_4": { "type": "integer", "description": "Maximum number of tries for level 4.", "example": 1 }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the outplan was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the outplan was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the outplan was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "AIManagerAIEngineModel": { "type": "string", "description": "Model of the AI engine. Uses target.model format (e.g., openai.gpt-5). The target prefix identifies the provider, and the model name follows after the dot.", "example": "openai.gpt-5", "enum": [ "gemini.gemini-2.5-flash", "gemini.gemini-2.5-pro", "gemini.gemini-2.0-flash", "gemini.gemini-pro-latest", "openai.gpt-5.2", "openai.gpt-5.1", "openai.gpt-5", "openai.gpt-5-mini", "openai.gpt-5-nano", "grok.grok-3", "grok.grok-3-mini" ], "x-enum-varnames": [ "AIManagerAIEngineModelGeminiGemini2Dot5Flash", "AIManagerAIEngineModelGeminiGemini2Dot5Pro", "AIManagerAIEngineModelGeminiGemini2Dot0Flash", "AIManagerAIEngineModelGeminiGeminiProLatest", "AIManagerAIEngineModelOpenaiGPT5Dot2", "AIManagerAIEngineModelOpenaiGPT5Dot1", "AIManagerAIEngineModelOpenaiGPT5", "AIManagerAIEngineModelOpenaiGPT5Mini", "AIManagerAIEngineModelOpenaiGPT5Nano", "AIManagerAIEngineModelGrok3", "AIManagerAIEngineModelGrok3Mini" ] }, "AIManagerVADConfig": { "type": "object", "description": "Voice Activity Detection configuration. Omitted fields use Pipecat defaults (confidence=0.7, start_secs=0.2, stop_secs=0.2, min_volume=0.6).", "properties": { "confidence": { "type": "number", "format": "double", "description": "Minimum confidence threshold to detect voice. Range 0.0–1.0. Omitted fields use Pipecat default.", "minimum": 0, "maximum": 1, "default": 0.7, "example": 0.7 }, "start_secs": { "type": "number", "format": "double", "description": "Duration in seconds of continuous speech needed to confirm speaking started. Range 0.0–30.0. Omitted fields use Pipecat default.", "minimum": 0, "maximum": 30, "default": 0.2, "example": 0.2 }, "stop_secs": { "type": "number", "format": "double", "description": "Duration in seconds of silence needed to confirm speaking stopped. Range 0.0–30.0. Omitted fields use Pipecat default.", "minimum": 0, "maximum": 30, "default": 0.2, "example": 0.5 }, "min_volume": { "type": "number", "format": "double", "description": "Minimum audio volume for voice detection. Range 0.0–1.0. Omitted fields use Pipecat default.", "minimum": 0, "maximum": 1, "default": 0.6, "example": 0.6 } } }, "AIManagerAIPromptHistory": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the prompt history entry.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the associated customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "ai_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The ID of the AI this history entry belongs to. Returned from the `GET /ais` response.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "prompt": { "type": "string", "description": "The init_prompt value at this point in time.", "example": "You are a helpful customer support assistant." }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The time this history entry was recorded.", "example": "2026-05-22T10:00:00.000000Z" } } }, "AIManagerPromptSnapshot": { "type": "object", "properties": { "ai_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The ID of the AI this snapshot belongs to.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "prompt_history_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "UUID of the prompt history entry. Zero UUID means no history entry exists yet.", "example": "00000000-0000-0000-0000-000000000000" }, "prompt": { "type": "string", "description": "Variable-substituted init_prompt as sent to the LLM.", "example": "You are a helpful customer support assistant." }, "member_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Zero UUID for single-AI calls; team member UUID for team calls.", "example": "00000000-0000-0000-0000-000000000000" } } }, "AIManagerAI": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the AI.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the associated customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "name": { "type": "string", "description": "Name of the AI.", "example": "Customer Support Bot" }, "detail": { "type": "string", "description": "Detailed information about the AI.", "example": "AI assistant for handling customer inquiries" }, "type": { "type": "string", "enum": [ "normal", "insight" ], "description": "AI type. `normal` (default) is a general-purpose AI. `insight` restricts the AI to the Insight tool set and uses a dedicated system prompt for analyzing existing contact/conversation data.", "example": "normal" }, "is_insight_active": { "type": "boolean", "description": "Whether this is the customer's active Insight AI, i.e. the one the Case Insight Assistant panel auto-attaches to a case. Only meaningful when `type` is `insight`. A customer may hold any number of Insight AIs but at most one may be active. Newly created AIs are always inactive; use `POST /ais/{id}/activate_insight` to activate one. When no Insight AI is active, the most recently created one is used.", "example": false }, "engine_model": { "$ref": "#/components/schemas/AIManagerAIEngineModel", "description": "Model of the AI engine.", "example": "gemini.gemini-pro-latest" }, "parameter": { "type": "object", "additionalProperties": true, "description": "Custom key-value configuration data specific to the AI engine type." }, "engine_key": { "type": "string", "description": "API key or authentication key for the AI engine. Write-only; not returned in responses.", "example": "sk-...redacted..." }, "rag_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The knowledge base ID for the search_knowledge tool. Returned from the `id` field of the `GET /rags` response. When set, the AI assistant can search this knowledge base during voice calls.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "init_prompt": { "type": "string", "description": "Initial prompt to configure the AI's behavior.", "example": "You are a helpful customer support assistant." }, "current_prompt_history_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "UUID of the most-recent prompt history entry. Zero UUID means no versioned history has been recorded yet.\n", "example": "00000000-0000-0000-0000-000000000000" }, "tts_type": { "$ref": "#/components/schemas/AIManagerAITTSType", "description": "Text-to-speech provider type.", "example": "google" }, "tts_voice_id": { "type": "string", "description": "Text-to-speech voice identifier.", "example": "en-US-Neural2-F" }, "stt_type": { "$ref": "#/components/schemas/AIManagerAISTTType", "description": "Speech-to-text provider type.", "example": "deepgram" }, "stt_language": { "type": "string", "description": "STT language in BCP-47 format (e.g., ko-KR, en-US). Empty for auto-detect.", "example": "en-US" }, "vad_config": { "$ref": "#/components/schemas/AIManagerVADConfig" }, "smart_turn_enabled": { "type": "boolean", "description": "Enable smart turn detection using Pipecat's LocalSmartTurnAnalyzerV3. When enabled, forces VAD stop_secs to 0.2 for optimal turn-taking.", "example": false }, "auto_aicall_audit_enabled": { "type": "boolean", "description": "When true, any finished AICall involving this AI is audited automatically.", "example": false }, "tool_names": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerToolName" }, "description": "List of tool names enabled for this AI. Use `[\"all\"]` to enable all available tools. See the Tool Functions documentation for detailed descriptions of each tool.", "example": [ "all" ] }, "direct_hash": { "type": "string", "description": "Hash for direct access via SIP URI sip:direct.@sip.voipbin.net. Returned from the resource's `direct_hash` field.", "example": "a8f3b2c1d4e5" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the AI was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the AI was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the AI was deleted.", "example": "2026-01-15T09:30:00.000000Z" } }, "required": [ "is_insight_active" ] }, "AIManagerTeam": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the team.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the associated customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "name": { "type": "string", "description": "Name of the team.", "example": "Customer Support Team" }, "detail": { "type": "string", "description": "Detailed description of the team.", "example": "Multi-agent team for handling customer inquiries" }, "start_member_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The member ID that starts the conversation. Must reference one of the members in the members array.", "example": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" }, "members": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerTeamMember" }, "description": "List of team members forming the graph nodes." }, "parameter": { "type": "object", "additionalProperties": true, "description": "Custom key-value parameter data for the team. Supports flow variable substitution at runtime.", "example": { "language": "en-US", "department": "support" } }, "direct_hash": { "type": "string", "description": "Hash for direct access via SIP URI sip:direct.@sip.voipbin.net. Returned from the resource's `direct_hash` field.", "example": "a8f3b2c1d4e5" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the team was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the team was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the team was deleted.", "example": "2026-01-15T09:30:00.000000Z" } }, "required": [ "id", "customer_id", "name", "detail", "start_member_id", "members" ] }, "AIManagerTeamMember": { "type": "object", "description": "A member node in the team graph, backed by an existing AI configuration.", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of this member within the team.", "example": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" }, "name": { "type": "string", "description": "Display name for this member.", "example": "Greeter" }, "ai_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The AI configuration backing this member. Returned from the `POST /ais` or `GET /ais` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "transitions": { "type": "array", "items": { "$ref": "#/components/schemas/AIManagerTeamTransition" }, "description": "List of transitions (edges) from this member to other members." } }, "required": [ "id", "name", "ai_id" ] }, "AIManagerTeamTransition": { "type": "object", "description": "A transition edge that triggers a switch from one member to another via LLM function calling.", "properties": { "function_name": { "type": "string", "description": "The function name that the LLM calls to trigger this transition. Must not collide with reserved tool names.", "example": "transfer_to_specialist" }, "description": { "type": "string", "description": "Human-readable description of when this transition should be triggered. Used as the function description in LLM tool definitions.", "example": "Transfer to the specialist when the customer needs technical help" }, "next_member_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The member ID to transition to. Must reference an existing member in the team.", "example": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" } }, "required": [ "function_name", "description", "next_member_id" ] }, "WebchatManagerWidgetStatus": { "type": "string", "description": "The status of the widget.", "enum": [ "active", "inactive" ], "x-enum-varnames": [ "WebchatManagerWidgetStatusActive", "WebchatManagerWidgetStatusInactive" ], "example": "active" }, "WebchatManagerWidgetPosition": { "type": "string", "description": "Where the floating bubble/panel renders on the customer's page.", "enum": [ "bottom_right", "bottom_left" ], "x-enum-varnames": [ "WebchatManagerWidgetPositionBottomRight", "WebchatManagerWidgetPositionBottomLeft" ], "example": "bottom_right" }, "WebchatManagerWidgetThemeMode": { "type": "string", "description": "Controls light/dark/auto rendering of the widget panel.", "enum": [ "light", "dark", "auto" ], "x-enum-varnames": [ "WebchatManagerWidgetThemeModeLight", "WebchatManagerWidgetThemeModeDark", "WebchatManagerWidgetThemeModeAuto" ], "example": "light" }, "WebchatManagerWidgetThemeConfig": { "type": "object", "description": "Cosmetic, customer-editable widget appearance settings. All fields are optional; omitted fields fall back to the platform default (blue bubble, no logo, bottom-right, light mode). An explicit color field always wins over the theme_mode-resolved default.", "properties": { "primary_color": { "type": "string", "description": "Hex color code for the widget's primary color.", "pattern": "^#[0-9a-fA-F]{6}$", "example": "#1a73e8" }, "secondary_color": { "type": "string", "description": "Hex color code for the widget's accent/text-contrast color.", "pattern": "^#[0-9a-fA-F]{6}$", "example": "#f5f5f5" }, "header_background_color": { "type": "string", "description": "Hex color code for the widget header bar's background. Falls back to primary_color (light mode) or a dark surface color (dark mode) when unset.", "pattern": "^#[0-9a-fA-F]{6}$", "example": "#1a73e8" }, "header_text_color": { "type": "string", "description": "Hex color code for the widget header bar's text.", "pattern": "^#[0-9a-fA-F]{6}$", "example": "#ffffff" }, "logo_url": { "type": "string", "format": "uri", "description": "HTTPS URL of the logo image displayed in the widget header.", "example": "https://cdn.example.com/logo.png" }, "position": { "$ref": "#/components/schemas/WebchatManagerWidgetPosition", "description": "Where the floating bubble/panel renders on the customer's page.", "example": "bottom_right" }, "theme_mode": { "$ref": "#/components/schemas/WebchatManagerWidgetThemeMode", "description": "Light/dark/auto rendering of the widget panel.", "example": "light" }, "header_title": { "type": "string", "maxLength": 100, "description": "Widget header text. Defaults to \"Chat with us\" when unset.", "example": "Support" }, "header_subtitle": { "type": "string", "maxLength": 200, "description": "Widget header subtext, shown below header_title. No subtitle row rendered when unset.", "example": "We usually reply in a few minutes" }, "connecting_indicator_enabled": { "type": "boolean", "nullable": true, "description": "Whether to show a system message in the panel while the visitor's session is being created. Unset/null falls back to enabled (true); an existing widget's default is preserved by omitting this key rather than sending false.", "example": true }, "connecting_indicator_text": { "type": "string", "maxLength": 100, "description": "Text shown while the visitor's session is being created. Defaults to \"Connecting…\" when unset.", "example": "Connecting…" }, "typing_indicator_enabled": { "type": "boolean", "nullable": true, "description": "Whether to show the three-dot \"waiting for response\" animation after the visitor sends a message. Unset/null falls back to enabled (true). No text-label variant is supported.", "example": true }, "border_radius": { "type": "string", "enum": [ "sharp", "rounded", "pill" ], "x-enum-varnames": [ "WebchatManagerWidgetBorderRadiusSharp", "WebchatManagerWidgetBorderRadiusRounded", "WebchatManagerWidgetBorderRadiusPill" ], "description": "Corner rounding applied to the bubble, panel, message bubbles, input field, and send button as a coordinated set. Defaults to rounded when unset.", "example": "rounded" }, "font_size": { "type": "string", "enum": [ "compact", "default", "large" ], "x-enum-varnames": [ "WebchatManagerWidgetFontSizeCompact", "WebchatManagerWidgetFontSizeDefault", "WebchatManagerWidgetFontSizeLarge" ], "description": "Base font-size scale applied to the widget's header text and message text. Defaults to default when unset.", "example": "default" } } }, "WebchatManagerWidget": { "type": "object", "description": "A customer's webchat widget configuration. Also issues a direct hash for anonymous visitor authentication.", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the widget. Returned from the `POST /widgets` or `GET /widgets` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the associated customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "name": { "type": "string", "description": "Name of the widget.", "example": "Support Widget" }, "status": { "$ref": "#/components/schemas/WebchatManagerWidgetStatus", "description": "The status of the widget.", "example": "active" }, "session_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Fires once per Session, at session creation/start (POST /webchat_sessions) -- bin-conversation-manager owns Create+Execute for this Flow's activeflow. Returned from the `POST /flows` or `GET /flows` response.", "example": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" }, "message_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Optional. When set, fires an independent, stateless activeflow on EVERY inbound message (mirrors bin-conversation-manager's Account.MessageFlowID/Number.MessageFlowID pattern for LINE/WhatsApp/SMS). Returned from the `POST /flows` or `GET /flows` response.", "example": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" }, "session_idle_timeout": { "type": "integer", "description": "Session idle timeout in seconds before the session is automatically ended.", "example": 1800 }, "theme_config": { "$ref": "#/components/schemas/WebchatManagerWidgetThemeConfig" }, "direct_hash": { "type": "string", "description": "Hash used by the embed script (data-hash attribute) to authenticate anonymous visitors via POST /auth/boot. Returned on every response (GET, List, Create, Update, direct_hash_regenerate) -- this value is embedded directly in the customer's public website HTML by design, so it is not a traditional secret; hiding it from GET responses would only make it harder for the customer's own admins to retrieve it.", "example": "a8f3b2c1d4e5" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the widget was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the widget was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the widget was deleted.", "example": "2026-01-15T09:30:00.000000Z" } }, "required": [ "id", "customer_id", "name", "status", "session_flow_id", "session_idle_timeout" ] }, "WebchatManagerSessionStatus": { "type": "string", "description": "The status of the session.", "enum": [ "active", "ended" ], "x-enum-varnames": [ "WebchatManagerSessionStatusActive", "WebchatManagerSessionStatusEnded" ], "example": "active" }, "WebchatManagerSession": { "type": "object", "description": "A webchat visitor session. Session.id doubles as the visitor's continuity token.", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the session, and the visitor's continuity token. Returned from the `POST /sessions` or `GET /sessions` response.", "example": "7a1bcb1a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the associated customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "widget_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The widget this session belongs to. Returned from the `POST /widgets` or `GET /widgets` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "status": { "$ref": "#/components/schemas/WebchatManagerSessionStatus", "description": "The status of the session.", "example": "active" }, "page_url": { "type": "string", "maxLength": 2048, "description": "The URL of the page the widget was embedded on when this session was created. Captured client-side from window.location.href at session-creation time; not re-captured on subsequent navigation within the same session.", "example": "https://example.com/pricing" }, "referrer": { "type": "string", "maxLength": 2048, "description": "document.referrer at session-creation time -- the page the visitor was on immediately before arriving at the page that embeds the widget. Distinct from page_url (the page the widget is currently embedded on). Captured client-side; not re-captured on subsequent navigation within the same session.", "example": "https://example.com/blog/some-article" }, "peer": { "$ref": "#/components/schemas/CommonAddress", "description": "The visitor's own address for this session. type is always \"web_session\", target is this session's own id." }, "local": { "$ref": "#/components/schemas/CommonAddress", "description": "The widget-channel address this session belongs to. type is always \"webchat\", target is the session's widget_id." }, "tm_last_activity": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp of the last activity on this session.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the session was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the session was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_end": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the session ended.", "example": "2026-01-15T09:30:00.000000Z" } }, "required": [ "id", "customer_id", "widget_id", "status" ] }, "WebchatManagerMessageDirection": { "type": "string", "description": "The direction of the message.", "enum": [ "inbound", "outbound" ], "x-enum-varnames": [ "WebchatManagerMessageDirectionInbound", "WebchatManagerMessageDirectionOutbound" ], "example": "inbound" }, "WebchatManagerMessageStatus": { "type": "string", "description": "The status of the message.", "enum": [ "sent", "delivered", "failed" ], "x-enum-varnames": [ "WebchatManagerMessageStatusSent", "WebchatManagerMessageStatusDelivered", "WebchatManagerMessageStatusFailed" ], "example": "sent" }, "WebchatManagerMessage": { "type": "object", "description": "A single chat message within a webchat session.", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the message. Returned from the `POST /messages` or `GET /messages` response.", "example": "5e9c2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the associated customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "widget_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The widget this message belongs to (denormalized from the session). Returned from the `POST /widgets` or `GET /widgets` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "session_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The session this message belongs to. Returned from the `POST /sessions` or `GET /sessions` response.", "example": "7a1bcb1a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "direction": { "$ref": "#/components/schemas/WebchatManagerMessageDirection", "description": "The direction of the message.", "example": "inbound" }, "status": { "$ref": "#/components/schemas/WebchatManagerMessageStatus", "description": "The status of the message.", "example": "sent" }, "sender_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The agent ID for an agent-typed outbound reply; empty for flow/AI-originated or inbound messages.", "example": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90" }, "text": { "type": "string", "description": "The text content of the message.", "example": "Hi, I have a question about pricing" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the message was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the message was deleted.", "example": "2026-01-15T09:30:00.000000Z" } }, "required": [ "id", "customer_id", "widget_id", "session_id", "direction", "status", "text" ] }, "AIManagerAIcallAssistanceType": { "type": "string", "description": "Type of assistance entity associated with the AI call.", "example": "ai", "enum": [ "", "ai", "team" ], "x-enum-varnames": [ "AIManagerAIcallAssistanceTypeNone", "AIManagerAIcallAssistanceTypeAI", "AIManagerAIcallAssistanceTypeTeam" ] }, "AIManagerAIcallReferenceType": { "type": "string", "description": "Type of reference associated with the ai call.", "example": "call", "enum": [ "", "call", "conversation", "task", "contact_case" ], "x-enum-varnames": [ "AIManagerAIcallReferenceTypeNone", "AIManagerAIcallReferenceTypeCall", "AIManagerAIcallReferenceTypeConversation", "AIManagerAIcallReferenceTypeTask", "AIManagerAIcallReferenceTypeContactCase" ] }, "AIManagerAIcallStatus": { "type": "string", "description": "Status of the ai call.", "example": "progressing", "enum": [ "initiating", "progressing", "pausing", "resuming", "terminating", "terminated" ], "x-enum-varnames": [ "AIManagerAIcallStatusInitiating", "AIManagerAIcallStatusProgressing", "AIManagerAIcallStatusPausing", "AIManagerAIcallStatusResuming", "AIManagerAIcallStatusTerminating", "AIManagerAIcallStatusTerminated" ] }, "AIManagerAITTSType": { "type": "string", "description": "Text-to-speech provider type.", "example": "elevenlabs", "enum": [ "", "async", "aws", "azure", "cartesia", "deepgram", "elevenlabs", "fish", "google", "groq", "hume", "inworld", "lmnt", "minimax", "neuphonic", "nvidia-riva", "openai", "piper", "playht", "rime", "sarvam", "xtts" ], "x-enum-varnames": [ "AIManagerAITTSTypeNone", "AIManagerAITTSTypeAsync", "AIManagerAITTSTypeAWS", "AIManagerAITTSTypeAzure", "AIManagerAITTSTypeCartesia", "AIManagerAITTSTypeDeepgram", "AIManagerAITTSTypeElevenLabs", "AIManagerAITTSTypeFish", "AIManagerAITTSTypeGoogle", "AIManagerAITTSTypeGroq", "AIManagerAITTSTypeHume", "AIManagerAITTSTypeInworld", "AIManagerAITTSTypeLMNT", "AIManagerAITTSTypeMiniMax", "AIManagerAITTSTypeNeuphonic", "AIManagerAITTSTypeNvidiaRiva", "AIManagerAITTSTypeOpenAI", "AIManagerAITTSTypePiper", "AIManagerAITTSTypePlayHT", "AIManagerAITTSTypeRime", "AIManagerAITTSTypeSarvam", "AIManagerAITTSTypeXTTS" ] }, "AIManagerAISTTType": { "type": "string", "description": "Speech-to-text provider type.", "example": "deepgram", "enum": [ "", "cartesia", "deepgram", "elevenlabs" ], "x-enum-varnames": [ "AIManagerAISTTTypeNone", "AIManagerAISTTTypeCartesia", "AIManagerAISTTTypeDeepgram", "AIManagerAISTTTypeElevenLabs" ] }, "AIManagerToolName": { "type": "string", "description": "Name of an AI tool function. Use `all` to enable every available tool.", "example": "connect_call", "enum": [ "all", "connect_call", "get_aicall_messages", "get_variables", "search_knowledge", "send_email", "send_message", "set_variables", "stop_flow", "stop_media", "stop_service" ], "x-enum-varnames": [ "AIManagerToolNameAll", "AIManagerToolNameConnectCall", "AIManagerToolNameGetAicallMessages", "AIManagerToolNameGetVariables", "AIManagerToolNameSearchKnowledge", "AIManagerToolNameSendEmail", "AIManagerToolNameSendMessage", "AIManagerToolNameSetVariables", "AIManagerToolNameStopFlow", "AIManagerToolNameStopMedia", "AIManagerToolNameStopService" ] }, "AIManagerAIcall": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the AI call.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the associated customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "assistance_type": { "$ref": "#/components/schemas/AIManagerAIcallAssistanceType", "description": "Type of assistance entity associated with the AI call.", "example": "ai" }, "assistance_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the assistance entity (AI or Team). Returned from the `POST /ais`, `GET /ais`, `POST /teams`, or `GET /teams` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "ai_engine_model": { "$ref": "#/components/schemas/AIManagerAIEngineModel", "description": "Model of the AI engine used for this call.", "example": "gemini.gemini-pro-latest" }, "ai_tts_type": { "$ref": "#/components/schemas/AIManagerAITTSType", "description": "Text-to-speech provider type used for this call.", "example": "elevenlabs" }, "ai_tts_voice_id": { "type": "string", "description": "Text-to-speech voice identifier used for this call.", "example": "21m00Tcm4TlvDq8ikWAM" }, "ai_stt_type": { "$ref": "#/components/schemas/AIManagerAISTTType", "description": "Speech-to-text provider type used for this call.", "example": "deepgram" }, "ai_vad_config": { "$ref": "#/components/schemas/AIManagerVADConfig" }, "ai_smart_turn_enabled": { "type": "boolean", "description": "Smart turn detection setting frozen from the AI configuration at call start.", "example": false }, "parameter": { "type": "object", "additionalProperties": true, "description": "Merged key-value parameter data from AI and team configuration.", "example": { "language": "en-US", "department": "support" } }, "activeflow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the activeflow. Returned from the `GET /activeflows` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "reference_type": { "$ref": "#/components/schemas/AIManagerAIcallReferenceType", "description": "Type of reference associated with the AI call.", "example": "call" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource. The actual resource type is determined by reference_type. Returned from the corresponding resource endpoint.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "confbridge_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the conference bridge. Returned from the `GET /conferences` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "current_member_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the currently active team member. Only set when assistance_type is 'team'. Updated when the AI agent transitions to a different team member.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "status": { "$ref": "#/components/schemas/AIManagerAIcallStatus", "description": "Status of the AI call.", "example": "progressing" }, "stt_language": { "type": "string", "description": "STT language copied from AI config at creation time.", "example": "en-US" }, "metadata": { "type": "object", "additionalProperties": true, "description": "Generic key-value store. Contains prompt_snapshots (array of PromptSnapshot) at call start time.\n" }, "tm_end": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the AI call ended.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the AI call was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the AI call was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the AI call was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "AIManagerMessageDirection": { "type": "string", "description": "Direction of the message.", "example": "incoming", "enum": [ "", "incoming", "outgoing" ], "x-enum-varnames": [ "AIManagerMessageDirectionNone", "AIManagerMessageDirectionIncoming", "AIManagerMessageDirectionOutgoing" ] }, "AIManagerMessageRole": { "type": "string", "description": "Role of the entity in the conversation.", "example": "assistant", "enum": [ "", "system", "user", "assistant", "function", "tool", "notification" ], "x-enum-varnames": [ "AIManagerMessageRoleNone", "AIManagerMessageRoleSystem", "AIManagerMessageRoleUser", "AIManagerMessageRoleAssistant", "AIManagerMessageRoleFunction", "AIManagerMessageRoleTool", "AIManagerMessageRoleNotification" ] }, "AIManagerParticipant": { "type": "object", "properties": { "ai_id": { "type": "string", "format": "uuid", "description": "The unique identifier of the AI agent. Returned from the `GET /ais` response.", "example": "22222222-2222-2222-2222-222222222222" }, "aicall_id": { "type": "string", "format": "uuid", "description": "The unique identifier of the AI call. Returned from the `GET /aicalls` response.", "example": "11111111-1111-1111-1111-111111111111" }, "tm_create": { "type": "string", "format": "date-time", "description": "The timestamp when the participation was recorded.", "example": "2026-05-22T10:00:00.000000Z" } } }, "AIManagerMessage": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the message.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the associated customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "aicall_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the associated AI call. Returned from the `GET /aicalls` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "activeflow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the activeflow. Returned from the `GET /activeflows` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "active_ai_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the AI configuration that was active when this message was created. Returned from the `GET /ais` response.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "role": { "$ref": "#/components/schemas/AIManagerMessageRole", "description": "Role of the entity in the conversation.", "example": "assistant" }, "content": { "type": "string", "description": "Content of the message.", "example": "Hello, how can I help you today?" }, "direction": { "$ref": "#/components/schemas/AIManagerMessageDirection", "description": "Direction of the message.", "example": "incoming" }, "tool_calls": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the tool call.", "example": "call_abc123" }, "type": { "type": "string", "description": "The type of tool call.", "example": "function" }, "function": { "type": "object", "description": "The function call details.", "properties": { "name": { "type": "string", "description": "The name of the function to call.", "example": "get_weather" }, "arguments": { "type": "string", "description": "The arguments to pass to the function as a JSON string.", "example": "{\"location\": \"San Francisco\"}" } } } } }, "description": "List of tool calls made during the message." }, "tool_call_id": { "type": "string", "description": "The tool call ID this message is responding to.", "example": "call_abc123" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the message was created.", "example": "2026-01-15T09:30:00.000000Z" } } }, "AIManagerSummaryReferenceType": { "type": "string", "description": "Type of reference for the AI summary.", "example": "call", "enum": [ "", "call", "conference", "transcribe", "recording" ], "x-enum-varnames": [ "AIManagerSummaryReferenceTypeNone", "AIManagerSummaryReferenceTypeCall", "AIManagerSummaryReferenceTypeConference", "AIManagerSummaryReferenceTypeTranscribe", "AIManagerSummaryReferenceTypeRecording" ] }, "AIManagerSummaryStatus": { "type": "string", "description": "Status of the AI summary generation.", "example": "progressing", "enum": [ "", "progressing", "done" ], "x-enum-varnames": [ "AIManagerSummaryStatusNone", "AIManagerSummaryStatusProgressing", "AIManagerSummaryStatusDone" ] }, "AIManagerSummary": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the summary.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the associated customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "activeflow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the activeflow. Returned from the `GET /activeflows` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "on_end_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to execute when the summary completes. Returned from the `POST /flows` or `GET /flows` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "reference_type": { "$ref": "#/components/schemas/AIManagerSummaryReferenceType", "description": "Type of reference for the AI summary.", "example": "call" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource. The actual resource type is determined by reference_type. Returned from the corresponding resource endpoint.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "status": { "$ref": "#/components/schemas/AIManagerSummaryStatus", "description": "Status of the AI summary generation.", "example": "progressing" }, "language": { "type": "string", "description": "Language used for the AI summary.", "example": "en-US" }, "content": { "type": "string", "description": "Content of the summary.", "example": "The customer called to inquire about their account balance and was assisted by the support agent." }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the summary was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the summary was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the summary was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "AIManagerAIAuditStatus": { "type": "string", "description": "Status of the AI audit.", "example": "progressing", "enum": [ "progressing", "completed", "failed" ], "x-enum-varnames": [ "AIManagerAIAuditStatusProgressing", "AIManagerAIAuditStatusCompleted", "AIManagerAIAuditStatusFailed" ] }, "AIManagerAIAudit": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the audit.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The customer who owns this audit.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "aicall_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The AI call that was audited. Returned from the `GET /aicalls` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "ai_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The AI participant that was evaluated. Returned from the `GET /ais` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "prompt_history_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The prompt version active during the call.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "status": { "$ref": "#/components/schemas/AIManagerAIAuditStatus" }, "overall_score": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5, "description": "Overall score (1-5) independently assessed by the LLM. Null until completed.", "example": 4 }, "evaluation": { "type": "object", "nullable": true, "additionalProperties": true, "description": "Full structured evaluation output. Null until completed.", "example": { "overall_score": 4, "dimensions": { "helpfulness": { "score": 4, "reason": "Provided clear and helpful answers." }, "accuracy": { "score": 4, "reason": "Responses were factually correct." }, "tone": { "score": 5, "reason": "Maintained professional and empathetic tone." }, "goal_completion": { "score": 4, "reason": "Successfully resolved the customer's issue." }, "tool_usage": null }, "summary": "The AI assistant performed well overall." } }, "message_ids": { "type": "array", "nullable": true, "items": { "type": "string", "format": "uuid", "x-go-type": "string" }, "description": "Ordered list of message IDs (newest-first) that were evaluated by Gemini. Null while progressing, on failure, or for audits completed before this feature. Present and non-empty on successful completion for calls with messages.\n", "example": [ "550e8400-e29b-41d4-a716-446655440001", "550e8400-e29b-41d4-a716-446655440002" ] }, "language": { "type": "string", "description": "BCP47 language code used for audit output.", "example": "en-US" }, "error": { "type": "string", "description": "Failure reason if status is failed.", "example": "LLM API quota exceeded" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the audit was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "nullable": true, "description": "Timestamp when the audit was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "nullable": true, "description": "Timestamp when the audit was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "AIManagerAIPromptProposalStatus": { "type": "string", "description": "Status of the AI prompt proposal.", "example": "progressing", "enum": [ "progressing", "completed", "failed", "accepted", "rejected", "expired" ], "x-enum-varnames": [ "AIManagerAIPromptProposalStatusProgressing", "AIManagerAIPromptProposalStatusCompleted", "AIManagerAIPromptProposalStatusFailed", "AIManagerAIPromptProposalStatusAccepted", "AIManagerAIPromptProposalStatusRejected", "AIManagerAIPromptProposalStatusExpired" ] }, "AIManagerAIPromptProposal": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the prompt proposal.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The customer who owns this proposal.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "ai_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The AI participant whose prompt is being improved. Returned from the `GET /ais` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "audit_ids": { "type": "array", "items": { "type": "string", "format": "uuid", "x-go-type": "string" }, "description": "Ordered list of AI audit IDs the proposal was derived from. Returned from the `GET /aiaudits` response.", "example": [ "550e8400-e29b-41d4-a716-446655440001", "550e8400-e29b-41d4-a716-446655440002" ] }, "basis_prompt_history_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The prompt history snapshot the proposal was generated against.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "original_prompt": { "type": "string", "description": "The basis prompt text captured at proposal time.", "example": "You are a helpful support assistant." }, "proposed_prompt": { "type": "string", "description": "The Gemini-generated improved prompt. Empty until status is completed.", "example": "You are a helpful and empathetic support assistant. Always confirm the customer's issue before proposing a fix." }, "rationale": { "type": "string", "description": "Gemini's explanation for the proposed prompt change. Empty until status is completed.", "example": "The audits showed the assistant moved to solutions before fully acknowledging the customer's concern." }, "status": { "$ref": "#/components/schemas/AIManagerAIPromptProposalStatus" }, "error": { "type": "string", "description": "Canonicalized failure reason if status is failed or expired.", "example": "evaluator_unavailable" }, "applied_prompt_history_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The prompt history ID created when this proposal was accepted. Empty until accepted.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the proposal was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "nullable": true, "description": "Timestamp when the proposal was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "nullable": true, "description": "Timestamp when the proposal was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "CommonAddress": { "type": "object", "description": "Contains source or destination detail info.", "properties": { "type": { "type": "string", "description": "Type of address.", "example": "tel", "enum": [ "", "agent", "conference", "email", "extension", "line", "sip", "tel", "web_session" ], "x-enum-varnames": [ "CommonAddressTypeNone", "CommonAddressTypeAgent", "CommonAddressTypeConference", "CommonAddressTypeEmail", "CommonAddressTypeExtension", "CommonAddressTypeLine", "CommonAddressTypeSIP", "CommonAddressTypeTel", "CommonAddressTypeWebSession" ] }, "target": { "type": "string", "description": "The address endpoint. Format depends on type: phone number for tel (e.g. +14155551234), UUID for agent/conference/extension, email for email, SIP URI for sip.", "example": "+14155551234" }, "target_name": { "type": "string", "description": "Address's name.", "example": "John Smith" }, "name": { "type": "string", "description": "Optional label for this address.", "example": "Main Office" }, "detail": { "type": "string", "description": "Additional notes about this address.", "example": "Primary contact number" } } }, "CommonPagination": { "type": "object", "properties": { "next_page_token": { "type": "string", "description": "Cursor token for the next page of results. Pass this value as the page_token parameter in the next request." } } }, "ConferenceManagerConferenceStatus": { "type": "string", "description": "Status of the conference.", "example": "progressing", "enum": [ "starting", "progressing", "terminating", "terminated" ], "x-enum-varnames": [ "ConferenceManagerConferenceStatusStarting", "ConferenceManagerConferenceStatusProgressing", "ConferenceManagerConferenceStatusTerminating", "ConferenceManagerConferenceStatusTerminated" ] }, "ConferenceManagerConferenceType": { "type": "string", "description": "Types of conferences.", "example": "conference", "enum": [ "", "conference", "connect", "queue" ], "x-enum-varnames": [ "ConferenceManagerConferenceTypeNone", "ConferenceManagerConferenceTypeConference", "ConferenceManagerConferenceTypeConnect", "ConferenceManagerConferenceTypeQueue" ] }, "ConferenceManagerConference": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Unique identifier for the conference.", "example": "8b9c0d1e-2f3a-4567-0123-456789abcdef" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Unique identifier of the associated customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "type": { "$ref": "#/components/schemas/ConferenceManagerConferenceType", "description": "The type of conference.", "example": "conference" }, "status": { "$ref": "#/components/schemas/ConferenceManagerConferenceStatus", "description": "Current status of the conference.", "example": "progressing" }, "name": { "type": "string", "description": "Name of the conference.", "example": "Team Standup" }, "detail": { "type": "string", "description": "Detailed information about the conference.", "example": "Daily team standup meeting" }, "data": { "type": "object", "description": "Custom key-value data associated with the conference.", "additionalProperties": true }, "timeout": { "type": "integer", "description": "Timeout for the conference in seconds.", "format": "int32", "example": 3600 }, "pre_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to execute before the conference starts. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "post_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to execute after the conference ends. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "conferencecall_ids": { "type": "array", "description": "List of associated conference call IDs. Each ID is returned from the `GET /conferencecalls` response.", "example": [ "550e8400-e29b-41d4-a716-446655440000" ], "items": { "type": "string", "format": "uuid", "x-go-type": "string" } }, "recording_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "ID of the main recording associated with the conference. Returned from the `GET /recordings` response.", "example": "e5f6a7b8-c9d0-1234-5678-90abcdef0123" }, "recording_ids": { "type": "array", "description": "List of associated recording IDs. Each ID is returned from the `GET /recordings` response.", "example": [ "e5f6a7b8-c9d0-1234-5678-90abcdef0123" ], "items": { "type": "string", "format": "uuid", "x-go-type": "string" } }, "transcribe_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "ID of the main transcription associated with the conference. Returned from the `GET /transcribes` response.", "example": "9c0d1e2f-3a4b-5678-1234-567890abcdef" }, "transcribe_ids": { "type": "array", "description": "List of associated transcription IDs. Each ID is returned from the `GET /transcribes` response.", "example": [ "9c0d1e2f-3a4b-5678-1234-567890abcdef" ], "items": { "type": "string", "format": "uuid", "x-go-type": "string" } }, "direct_hash": { "type": "string", "description": "Hash for direct access via SIP URI sip:direct.@sip.voipbin.net. Returned from the resource's `direct_hash` field.", "example": "a8f3b2c1d4e5" }, "tm_end": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the conference ended.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the conference was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the conference was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the conference was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "ConferenceManagerConferencecallReferenceType": { "type": "string", "description": "Type of the reference associated with the conference call.", "example": "call", "enum": [ "call" ], "x-enum-varnames": [ "ConferenceManagerConferencecallReferenceTypeCall" ] }, "ConferenceManagerConferencecallStatus": { "type": "string", "description": "Status of the conference call.", "example": "joined", "enum": [ "joining", "joined", "leaving", "leaved" ], "x-enum-varnames": [ "ConferenceManagerConferencecallStatusJoining", "ConferenceManagerConferencecallStatusJoined", "ConferenceManagerConferencecallStatusLeaving", "ConferenceManagerConferencecallStatusLeaved" ] }, "ConferenceManagerConferencecall": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Unique identifier for the conference call.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Unique identifier of the associated customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "activeflow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Activeflow ID associated with this conference call. Returned from the `POST /activeflows` or `GET /activeflows` response.", "example": "d4e5f6a7-b8c9-0123-4567-890abcdef012" }, "conference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Unique identifier of the associated conference. Returned from the `GET /conferences` response.", "example": "8b9c0d1e-2f3a-4567-0123-456789abcdef" }, "reference_type": { "$ref": "#/components/schemas/ConferenceManagerConferencecallReferenceType", "description": "Type of the reference associated with the conference call.", "example": "call" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource. The actual resource type is determined by reference_type. Returned from the corresponding resource endpoint.", "example": "f6a7b8c9-d0e1-2345-6789-0abcdef01234" }, "status": { "$ref": "#/components/schemas/ConferenceManagerConferencecallStatus", "description": "Current status of the conference call.", "example": "joined" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the conference call was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the conference call was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the conference call was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "ContactManagerCase": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier for the case.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "description": "Unique identifier of the associated customer.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "peer": { "allOf": [ { "$ref": "#/components/schemas/CommonAddress" } ], "description": "Remote party this case is scoped to." }, "local": { "allOf": [ { "$ref": "#/components/schemas/CommonAddress" } ], "description": "The customer's own endpoint (number/channel/account) this case's interactions arrived on or were placed from. Always present as an object; individual fields (type, target, etc.) are empty/absent when no local endpoint was known at case creation time (see design §4.1's note on Go's omitempty semantics for this field)." }, "reference_type": { "type": "string", "description": "Origin channel type (e.g. \"call\", \"conversation_message\").", "example": "call" }, "reference_id": { "type": "string", "description": "The internal VoIPBin resource ID that reference_type points at (the call ID when reference_type is \"call\", the conversation ID when reference_type is \"conversation_message\"), set automatically at case creation time. Never a customer- or agent-supplied value. Empty when no such internal resource ID applies.", "example": "1fe1356f-3f7f-4ff9-9d33-08136b38f506" }, "contact_id": { "type": "string", "format": "uuid", "description": "The resolved contact this case is attributed to. Nullable until resolved.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "owner_type": { "type": "string", "description": "Type of the case owner.", "example": "agent" }, "owner_id": { "type": "string", "format": "uuid", "description": "ID of the case owner.", "example": "2a2ec0ba-8004-11ec-aea5-439829c92a7c" }, "status": { "type": "string", "description": "Case lifecycle status.", "enum": [ "open", "closed" ], "example": "open" }, "opened_at": { "type": "string", "format": "date-time", "description": "Timestamp when the case was opened. Nullable.", "example": "2026-06-01T09:30:00.000000Z" }, "closed_at": { "type": "string", "format": "date-time", "description": "Timestamp when the case was closed. Nullable.", "example": "2026-06-02T09:30:00.000000Z" }, "closed_reason": { "type": "string", "description": "Reason the case was closed (e.g. \"agent_closed\", \"timeout\").", "example": "agent_closed" }, "closed_by_type": { "type": "string", "description": "Type of the actor that closed the case (e.g. \"agent\", \"system\").", "example": "agent" }, "closed_by_id": { "type": "string", "format": "uuid", "description": "ID of the actor that closed the case. Nullable.", "example": "2a2ec0ba-8004-11ec-aea5-439829c92a7c" }, "name": { "type": "string", "description": "Optional freeform case name/title, settable only at creation time.", "example": "Billing dispute follow-up" }, "detail": { "type": "string", "description": "Optional freeform case detail, settable only at creation time.", "example": "Customer disputes March invoice charges." }, "previous_case_id": { "type": "string", "format": "uuid", "description": "ID of the prior (now-closed) case this case continues from, if any.", "example": "11111111-0000-0000-0000-000000000001" }, "tm_create": { "type": "string", "format": "date-time", "description": "Timestamp when this case was created.", "example": "2026-06-01T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "description": "Timestamp when this case was last updated.", "example": "2026-06-01T09:30:00.000000Z" } } }, "ContactManagerCaseListResponse": { "type": "object", "properties": { "result": { "type": "array", "description": "List of cases.", "items": { "$ref": "#/components/schemas/ContactManagerCase" } }, "next_page_token": { "type": "string", "description": "Pagination token for the next page. Empty when no further pages exist.", "example": "2026-06-01T09:30:01.000000Z" } } }, "ContactManagerCaseNote": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier for the case note.", "example": "33333333-0000-0000-0000-000000000003" }, "customer_id": { "type": "string", "format": "uuid", "description": "Unique identifier of the associated customer.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "case_id": { "type": "string", "format": "uuid", "description": "The case this note belongs to. The ID is returned from GET /v1.0/contact_cases response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "author_type": { "type": "string", "description": "Type of the note's author.", "enum": [ "agent", "system" ], "example": "agent" }, "author_id": { "type": "string", "format": "uuid", "description": "ID of the agent authoring this note. Nullable for system-authored notes.", "example": "2a2ec0ba-8004-11ec-aea5-439829c92a7c" }, "text": { "type": "string", "description": "The note's text content.", "example": "Called the customer back, no answer." }, "tm_create": { "type": "string", "format": "date-time", "description": "Timestamp when this note was created.", "example": "2026-06-01T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "description": "Timestamp when this note was last updated.", "example": "2026-06-01T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "description": "Timestamp when this note was soft-deleted. Null if active.", "example": "2026-06-02T08:00:00.000000Z" } } }, "ContactManagerCaseNoteListResponse": { "type": "object", "properties": { "result": { "type": "array", "description": "List of case notes.", "items": { "$ref": "#/components/schemas/ContactManagerCaseNote" } }, "next_page_token": { "type": "string", "description": "Pagination token for the next page. Empty when no further pages exist.", "example": "2026-06-01T09:30:01.000000Z" } } }, "ContactManagerContact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier for the contact.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "description": "Unique identifier of the associated customer.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "first_name": { "type": "string", "description": "First name of the contact.", "example": "John" }, "last_name": { "type": "string", "description": "Last name of the contact.", "example": "Smith" }, "display_name": { "type": "string", "description": "Display name of the contact.", "example": "John Smith" }, "company": { "type": "string", "description": "Company name associated with the contact.", "example": "Acme Corporation" }, "job_title": { "type": "string", "description": "Job title of the contact.", "example": "Software Engineer" }, "source": { "$ref": "#/components/schemas/ContactManagerContactSource", "description": "Source of the contact.", "example": "manual" }, "external_id": { "type": "string", "description": "External identifier for the contact.", "example": "CRM-12345" }, "notes": { "type": "string", "description": "Free-form notes about the contact. May include call summaries, preferences, or special instructions.", "example": "Prefers morning calls. VIP account - escalate to senior support immediately." }, "addresses": { "type": "array", "description": "List of addresses (tel or email) associated with the contact.", "items": { "$ref": "#/components/schemas/ContactManagerAddress" } }, "tag_ids": { "type": "array", "description": "List of tag IDs associated with the contact.", "example": [ "b1a2c3d4-e5f6-7890-abcd-ef1234567890" ], "items": { "type": "string", "format": "uuid" } }, "tm_create": { "type": "string", "format": "date-time", "description": "Timestamp when the contact was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "description": "Timestamp when the contact was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "description": "Timestamp when the contact was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "ContactManagerContactSource": { "type": "string", "description": "Source of the contact.", "example": "manual", "enum": [ "manual", "import", "api", "sync" ], "x-enum-varnames": [ "ContactManagerContactSourceManual", "ContactManagerContactSourceImport", "ContactManagerContactSourceAPI", "ContactManagerContactSourceSync" ] }, "ContactManagerAddress": { "allOf": [ { "$ref": "#/components/schemas/CommonAddress" }, { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier for the address.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "contact_id": { "type": "string", "format": "uuid", "description": "Unique identifier of the contact this address belongs to.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "customer_id": { "type": "string", "format": "uuid", "description": "Unique identifier of the customer this address belongs to.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "is_primary": { "type": "boolean", "description": "Indicates if this is the primary address for the given type.", "example": true }, "tm_create": { "type": "string", "format": "date-time", "description": "Timestamp when the address was created.", "example": "2026-01-15T09:30:00.000000Z" } } } ] }, "ConversationManagerAccountType": { "type": "string", "description": "Type of the account.", "example": "sms", "enum": [ "line", "sms", "whatsapp" ], "x-enum-varnames": [ "ConversationManagerAccountTypeLine", "ConversationManagerAccountTypeSMS", "ConversationManagerAccountTypeWhatsApp" ] }, "ConversationManagerAccount": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the conversation account.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "type": { "$ref": "#/components/schemas/ConversationManagerAccountType", "description": "Type of messaging platform.", "example": "sms" }, "name": { "type": "string", "description": "Name of the account.", "example": "Main SMS Account" }, "detail": { "type": "string", "description": "Detailed information about the account.", "example": "Primary SMS messaging account" }, "secret": { "type": "string", "writeOnly": true, "description": "Webhook secret for signature verification. Write-only.", "example": "whsec_...redacted..." }, "token": { "type": "string", "writeOnly": true, "description": "API token for the messaging platform. Write-only.", "example": "xoxb_...redacted..." }, "provider_data": { "$ref": "#/components/schemas/ConversationManagerAccountProviderData" }, "message_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The flow ID to execute when a message is received on this account. Returned from the `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the account was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the account was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the account was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "ConversationManagerAccountProviderData": { "type": "object", "writeOnly": true, "description": "Platform-specific provider configuration. Write-only — never returned in GET responses or webhook payloads. Currently used for WhatsApp accounts only.\n", "properties": { "phone_number_id": { "type": "string", "description": "The Meta phone number ID associated with your WhatsApp Business phone number. Found in Meta Business Manager under WhatsApp → Phone numbers.\n", "example": "1234567890123456" }, "app_secret": { "type": "string", "description": "The Meta app secret for your WhatsApp Business App. Used to validate the X-Hub-Signature-256 header on inbound webhook requests from Meta.\n", "example": "abc123def456...redacted..." } } }, "ConversationManagerConversationType": { "type": "string", "description": "Type of the conversation.", "example": "message", "enum": [ "", "message", "line", "whatsapp", "email" ], "x-enum-varnames": [ "ConversationManagerConversationTypeNone", "ConversationManagerConversationTypeMessage", "ConversationManagerConversationTypeLine", "ConversationManagerConversationTypeWhatsApp", "ConversationManagerConversationTypeEmail" ] }, "ConversationManagerConversation": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the conversation.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "owner_type": { "type": "string", "description": "Type of the conversation owner.", "example": "agent" }, "owner_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the conversation owner. Returned from the corresponding owner resource endpoint (e.g., `GET /agents`).", "example": "c2d3e4f5-a6b7-8901-2cde-f01234567890" }, "account_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the conversation account. Returned from the `GET /conversation_accounts` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "name": { "type": "string", "description": "Name of the conversation.", "example": "Customer Support Chat" }, "detail": { "type": "string", "description": "Detailed information about the conversation.", "example": "Support conversation with customer" }, "type": { "$ref": "#/components/schemas/ConversationManagerConversationType", "description": "Type of the conversation (e.g., message, line).", "example": "message" }, "dialog_id": { "type": "string", "description": "The identifier of the referenced conversation transaction. For Line, this is the chatroom ID.", "example": "chatroom-abc123" }, "self": { "$ref": "#/components/schemas/CommonAddress", "description": "The self address of the conversation." }, "peer": { "$ref": "#/components/schemas/CommonAddress", "description": "The peer address of the conversation." }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the conversation was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the conversation was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the conversation was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "ConversationManagerMediaType": { "type": "string", "description": "Type of the media.", "example": "image", "enum": [ "image", "video", "audio", "file", "location", "sticker", "template", "imagemap", "flex" ], "x-enum-varnames": [ "ConversationManagerMediaTypeImage", "ConversationManagerMediaTypeVideo", "ConversationManagerMediaTypeAudio", "ConversationManagerMediaTypeFile", "ConversationManagerMediaTypeLocation", "ConversationManagerMediaTypeSticker", "ConversationManagerMediaTypeTemplate", "ConversationManagerMediaTypeImagemap", "ConversationManagerMediaTypeFlex" ] }, "ConversationManagerMedia": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the media.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "type": { "$ref": "#/components/schemas/ConversationManagerMediaType", "description": "Type of the media content.", "example": "image" }, "filename": { "type": "string", "description": "Filename of the media.", "example": "photo_2026-01-15.jpg" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the media was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the media was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the media was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "ConversationManagerMessageDirection": { "type": "string", "description": "Direction of the message (incoming or outgoing).", "example": "incoming", "enum": [ "outgoing", "incoming" ], "x-enum-varnames": [ "ConversationManagerMessageDirectionOutgoing", "ConversationManagerMessageDirectionIncoming" ] }, "ConversationManagerMessageReferenceType": { "type": "string", "description": "Source channel that produced the message.", "example": "message", "enum": [ "", "message", "line", "whatsapp", "email" ], "x-enum-varnames": [ "ConversationManagerMessageReferenceTypeNone", "ConversationManagerMessageReferenceTypeMessage", "ConversationManagerMessageReferenceTypeLine", "ConversationManagerMessageReferenceTypeWhatsApp", "ConversationManagerMessageReferenceTypeEmail" ] }, "ConversationManagerMessageStatus": { "type": "string", "description": "Delivery status of the message.", "example": "done", "enum": [ "progressing", "done", "failed" ], "x-enum-varnames": [ "ConversationManagerMessageStatusProgressing", "ConversationManagerMessageStatusDone", "ConversationManagerMessageStatusFailed" ] }, "ConversationManagerMessage": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the message.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "conversation_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the conversation. Returned from the `GET /conversations` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "direction": { "$ref": "#/components/schemas/ConversationManagerMessageDirection", "description": "Direction of the message.", "example": "incoming" }, "status": { "$ref": "#/components/schemas/ConversationManagerMessageStatus", "description": "Current delivery status of the message.", "example": "done" }, "reference_type": { "$ref": "#/components/schemas/ConversationManagerMessageReferenceType", "description": "Source channel that produced the message.", "example": "message" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource. The actual resource type is determined by reference_type. Returned from the corresponding resource endpoint.", "example": "f6a7b8c9-d0e1-2345-6789-0abcdef01234" }, "source": { "$ref": "#/components/schemas/CommonAddress", "description": "The sending party of the message (absolute origin, direction-independent). To recover the remote party: for incoming messages the remote party is the source; for outgoing messages the remote party is the destination." }, "destination": { "$ref": "#/components/schemas/CommonAddress", "description": "The receiving party of the message (absolute target, direction-independent). To recover the remote party: for outgoing messages the remote party is the destination; for incoming messages the remote party is the source." }, "text": { "type": "string", "description": "The message content.", "example": "Hello, how can I help you today?" }, "medias": { "type": "array", "items": { "$ref": "#/components/schemas/ConversationManagerMedia" }, "description": "List of media associated with the message." }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the message was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the message was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the message was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "CustomerManagerAccesskey": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the access key.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "name": { "type": "string", "description": "Name of the access key.", "example": "Production API Key" }, "detail": { "type": "string", "description": "Additional details about the access key.", "example": "API key for production environment" }, "token": { "type": "string", "description": "The access key token. Only returned once at creation time via `POST /accesskeys`. Subsequent `GET` requests will not include this field. Store it securely immediately after creation.", "example": "vb_a3Bf9xKmPq2nR7sT4wYzLp8mN5qR1xWe" }, "token_prefix": { "type": "string", "description": "A short prefix of the access key token for identification purposes. Always returned in `GET` responses.", "example": "vb_a3Bf9xKm" }, "tm_expire": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the access key expires.", "example": "2027-01-15T09:30:00.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the access key was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the access key was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the access key was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "CustomerManagerCustomerWebhookMethod": { "type": "string", "description": "The HTTP method used for webhook (e.g., POST, GET, PUT, DELETE).", "example": "POST", "enum": [ "", "POST", "GET", "PUT", "DELETE" ], "x-enum-varnames": [ "CustomerManagerCustomerWebhookMethodNone", "CustomerManagerCustomerWebhookMethodPost", "CustomerManagerCustomerWebhookMethodGet", "CustomerManagerCustomerWebhookMethodPut", "CustomerManagerCustomerWebhookMethodDelete" ] }, "CustomerManagerMetadata": { "type": "object", "description": "Configuration flags for a customer account. Controls platform behavior\nsuch as RTP packet capture for debugging audio issues.\nUpdatable by CustomerAdmin via `PUT /customer/metadata`\nor by ProjectSuperAdmin via `PUT /customers/{id}/metadata`.\n", "properties": { "rtp_debug": { "type": "boolean", "description": "When set to `true`, RTPEngine captures RTP traffic as PCAP files for this customer's calls.\nUse this to debug audio quality issues (one-way audio, codec problems, jitter).\nDefault is `false`. Enabling this increases storage usage — disable after debugging.\n", "example": true } } }, "CustomerManagerCustomerStatus": { "type": "string", "description": "Account lifecycle status.", "example": "active", "enum": [ "active", "frozen", "deleted" ], "x-enum-varnames": [ "CustomerManagerCustomerStatusActive", "CustomerManagerCustomerStatusFrozen", "CustomerManagerCustomerStatusDeleted" ] }, "CustomerManagerCustomerIdentityVerificationStatus": { "type": "string", "description": "Customer's identity verification status. Determines access to PSTN number purchases and outbound PSTN calls.", "example": "none", "enum": [ "none", "pending", "verified", "rejected" ], "x-enum-varnames": [ "CustomerManagerCustomerIdentityVerificationStatusNone", "CustomerManagerCustomerIdentityVerificationStatusPending", "CustomerManagerCustomerIdentityVerificationStatusVerified", "CustomerManagerCustomerIdentityVerificationStatusRejected" ] }, "CustomerManagerCustomer": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "name": { "type": "string", "description": "Name of the customer.", "example": "Acme Corporation" }, "detail": { "type": "string", "description": "Details about the customer.", "example": "Enterprise customer account" }, "email": { "type": "string", "format": "email", "x-go-type": "string", "description": "Email address of the customer.", "example": "admin@acme.com" }, "phone_number": { "type": "string", "description": "Customer's contact phone number in E.164 format.", "example": "+14155551234" }, "address": { "type": "string", "description": "Address of the customer.", "example": "123 Main St, San Francisco, CA 94105" }, "webhook_method": { "$ref": "#/components/schemas/CustomerManagerCustomerWebhookMethod", "description": "Webhook method used by the customer.", "example": "POST" }, "webhook_uri": { "type": "string", "description": "URI where webhook events are delivered.", "example": "https://api.acme.com/webhooks/voipbin" }, "billing_account_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer's default billing account. Returned from the `GET /billing_accounts/{id}` response.", "example": "b8c9d0e1-f2a3-4567-8901-23456789abcd" }, "metadata": { "$ref": "#/components/schemas/CustomerManagerMetadata", "description": "Customer configuration flags (e.g., RTP debug). Updatable by CustomerAdmin via `PUT /customer/metadata`." }, "email_verified": { "type": "boolean", "description": "Whether the customer's email has been verified.", "example": true }, "status": { "$ref": "#/components/schemas/CustomerManagerCustomerStatus", "description": "Account lifecycle status.", "example": "active" }, "identity_verification_status": { "$ref": "#/components/schemas/CustomerManagerCustomerIdentityVerificationStatus", "description": "Customer's identity verification status. Only 'verified' customers can purchase PSTN numbers and make outbound PSTN calls.", "example": "none" }, "tm_deletion_scheduled": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when account deletion was requested. Null if not scheduled.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the customer was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the customer was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the customer was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "CustomerManagerCustomerAdmin": { "description": "Full customer object returned by admin-only endpoints (`/customers`, `/customers/{id}`,\n`/customers/{id}/metadata`, `/customers/{id}/billing_account_id`,\n`/customers/{id}/freeze`, `/customers/{id}/recover`). Extends `CustomerManagerCustomer`\nwith internal fields that are never exposed to regular users via `/customer` (singular) endpoints.\n", "allOf": [ { "$ref": "#/components/schemas/CustomerManagerCustomer" }, { "type": "object", "properties": { "terms_agreed_version": { "type": "string", "description": "Version identifier of the Terms of Service the customer agreed to. Format: `YYYY-MM-DD` date string matching a published ToS revision.", "example": "2026-01-01" }, "terms_agreed_ip": { "type": "string", "format": "ipv4", "x-go-type": "string", "description": "IPv4 address from which the customer accepted the Terms of Service. Logged for legal compliance and audit trail.", "example": "203.0.113.42" }, "metadata": { "$ref": "#/components/schemas/CustomerManagerMetadata", "description": "Internal configuration flags managed exclusively by ProjectSuperAdmin via `PUT /customers/{id}/metadata`. Not visible to regular users." } } } ] }, "EmailManagerEmailAttachmentReferenceType": { "type": "string", "description": "Type of the action.", "example": "recording", "enum": [ "", "recording" ], "x-enum-varnames": [ "EmailManagerEmailAttachmentReferenceTypeNone", "EmailManagerEmailAttachmentReferenceTypeRecording" ] }, "EmailManagerEmailStatus": { "type": "string", "description": "Email status.", "example": "delivered", "enum": [ "", "initiated", "processed", "delivered", "open", "click", "bounce", "dropped", "deferred", "unsubscribe", "spamreport" ], "x-enum-varnames": [ "EmailManagerEmailStatusNone", "EmailManagerEmailStatusInitiated", "EmailManagerEmailStatusProcessed", "EmailManagerEmailStatusDelivered", "EmailManagerEmailStatusOpen", "EmailManagerEmailStatusClick", "EmailManagerEmailStatusBounce", "EmailManagerEmailStatusDropped", "EmailManagerEmailStatusDeferred", "EmailManagerEmailStatusUnsubscribe", "EmailManagerEmailStatusSpamreport" ] }, "EmailManagerEmailAttachment": { "type": "object", "properties": { "reference_type": { "description": "Type of the reference.", "$ref": "#/components/schemas/EmailManagerEmailAttachmentReferenceType", "example": "recording" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource (e.g., recording ID). Returned from the corresponding resource endpoint.", "example": "e5f6a7b8-c9d0-1234-5678-90abcdef0123" } }, "required": [ "reference_type", "reference_id" ] }, "EmailManagerEmail": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the email.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "source": { "$ref": "#/components/schemas/CommonAddress", "description": "The source address of the email." }, "destinations": { "type": "array", "minItems": 1, "items": { "$ref": "#/components/schemas/CommonAddress" }, "description": "List of destination addresses. Must contain at least one destination." }, "status": { "$ref": "#/components/schemas/EmailManagerEmailStatus", "description": "Current delivery status of the email.", "example": "delivered" }, "subject": { "type": "string", "description": "The subject of the email.", "example": "Your Call Recording is Ready" }, "content": { "type": "string", "description": "The content of the email.", "example": "Please find your call recording attached." }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/EmailManagerEmailAttachment" }, "description": "List of attachments" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the email was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the email was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the email was deleted.", "example": "2026-01-15T09:30:00.000000Z" } }, "required": [ "id", "customer_id", "source", "destinations", "status", "subject", "content", "attachments", "tm_create", "tm_update", "tm_delete" ] }, "FlowManagerActionType": { "type": "string", "description": "Type of the action.", "example": "talk", "enum": [ "ai_talk", "ai_summary", "amd", "answer", "beep", "branch", "call", "condition_call_digits", "condition_call_status", "condition_datetime", "condition_variable", "confbridge_join", "conference_join", "connect", "conversation_send", "digits_receive", "digits_send", "echo", "email_send", "external_media_start", "external_media_stop", "fetch", "fetch_flow", "goto", "hangup", "message_send", "mute", "play", "queue_join", "recording_start", "recording_stop", "sleep", "stop", "stream_echo", "talk", "transcribe_start", "transcribe_stop", "transcribe_recording", "variable_set", "webhook_send" ], "x-enum-varnames": [ "FlowManagerActionTypeAITalk", "FlowManagerActionTypeAISummary", "FlowManagerActionTypeAMD", "FlowManagerActionTypeAnswer", "FlowManagerActionTypeBeep", "FlowManagerActionTypeBranch", "FlowManagerActionTypeCall", "FlowManagerActionTypeConditionCallDigits", "FlowManagerActionTypeConditionCallStatus", "FlowManagerActionTypeConditionDatetime", "FlowManagerActionTypeConditionVariable", "FlowManagerActionTypeConfbridgeJoin", "FlowManagerActionTypeConferenceJoin", "FlowManagerActionTypeConnect", "FlowManagerActionTypeConversationSend", "FlowManagerActionTypeDigitsReceive", "FlowManagerActionTypeDigitsSend", "FlowManagerActionTypeEcho", "FlowManagerActionTypeEmailSend", "FlowManagerActionTypeExternalMediaStart", "FlowManagerActionTypeExternalMediaStop", "FlowManagerActionTypeFetch", "FlowManagerActionTypeFetchFlow", "FlowManagerActionTypeGoto", "FlowManagerActionTypeHangup", "FlowManagerActionTypeMessageSend", "FlowManagerActionTypeMute", "FlowManagerActionTypePlay", "FlowManagerActionTypeQueueJoin", "FlowManagerActionTypeRecordingStart", "FlowManagerActionTypeRecordingStop", "FlowManagerActionTypeSleep", "FlowManagerActionTypeStop", "FlowManagerActionTypeStreamEcho", "FlowManagerActionTypeTalk", "FlowManagerActionTypeTranscribeStart", "FlowManagerActionTypeTranscribeStop", "FlowManagerActionTypeTranscribeRecording", "FlowManagerActionTypeVariableSet", "FlowManagerActionTypeWebhookSend" ] }, "FlowManagerActionOptionAISummary": { "type": "object", "properties": { "on_end_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to execute when AI summary completes. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "reference_type": { "$ref": "#/components/schemas/AIManagerSummaryReferenceType", "example": "call" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource. Returned from the corresponding resource endpoint.", "example": "f6a7b8c9-d0e1-2345-6789-0abcdef01234" }, "language": { "type": "string", "description": "BCP47 language code for the summary.", "example": "en-US" } } }, "FlowManagerActionOptionAITalk": { "type": "object", "properties": { "ai_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Deprecated: use assistance_type+assistance_id. The unique identifier of the AI configuration to use.", "example": "6f7a8b9c-0d1e-2345-f012-345678901234" }, "assistance_type": { "$ref": "#/components/schemas/AIManagerAIcallAssistanceType", "description": "Type of assistance entity. Use \"ai\" for AI or \"team\" for Team." }, "assistance_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the assistance entity (AI or Team).", "example": "6f7a8b9c-0d1e-2345-f012-345678901234" }, "duration": { "type": "integer", "description": "Maximum duration of the AI talk session in seconds.", "example": 300 } } }, "FlowManagerActionOptionAMD": { "type": "object", "properties": { "machine_handle": { "type": "string", "enum": [ "hangup", "continue" ], "x-enum-varnames": [ "FlowManagerActionOptionAMDMachineHandleHangup", "FlowManagerActionOptionAMDMachineHandleContinue" ], "example": "hangup" }, "async": { "type": "boolean", "description": "If false, the call flow will pause until AMD is complete.", "example": false } } }, "FlowManagerActionOptionAnswer": { "type": "object", "description": "No options available for this action." }, "FlowManagerActionOptionBeep": { "type": "object", "description": "No options available for this action." }, "FlowManagerActionOptionBranch": { "type": "object", "properties": { "variable": { "type": "string", "description": "Variable name to evaluate for branching.", "example": "call_digits" }, "default_target_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Default target ID if input does not match any branch targets. References an action `id` within the same flow's `actions` array.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "target_ids": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Mapping of input values to target action IDs." } } }, "FlowManagerActionOptionCall": { "type": "object", "properties": { "source": { "$ref": "#/components/schemas/CommonAddress", "description": "Source address for the outbound call." }, "destinations": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" }, "minItems": 1, "description": "List of destination addresses. Must contain at least one destination." }, "flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to execute on the created call. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "actions": { "type": "array", "items": { "$ref": "#/components/schemas/FlowManagerAction" }, "description": "Inline actions to execute on the created call." }, "chained": { "type": "boolean", "description": "If true, created calls will hang up when the master call hangs up.", "example": true }, "early_execution": { "type": "boolean", "description": "If true, the created call executes the flow before call answer.", "example": false }, "anonymous": { "type": "string", "enum": [ "yes", "no", "auto" ], "example": "auto", "description": "Controls anonymous caller ID for outbound PSTN calls. \"yes\" — always send anonymous caller ID (RFC 3323 Privacy header). \"no\" — never anonymize, always show real caller ID. \"auto\" — inherit from incoming call's Privacy header (default). Only affects PSTN destinations (type \"tel\").\n" } } }, "FlowManagerActionOptionConfbridgeJoin": { "type": "object", "properties": { "confbridge_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the conference bridge to join. Returned from the `POST /conferences` or `GET /conferences` response.", "example": "0d1e2f3a-4b5c-6789-2345-678901abcdef" } } }, "FlowManagerActionOptionConferenceJoin": { "type": "object", "properties": { "conference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the conference to join. Returned from the `GET /conferences` response.", "example": "8b9c0d1e-2f3a-4567-0123-456789abcdef" } } }, "FlowManagerActionOptionConnect": { "type": "object", "properties": { "source": { "$ref": "#/components/schemas/CommonAddress", "description": "Source address for the outbound connection." }, "destinations": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" }, "minItems": 1, "description": "List of destination addresses. Must contain at least one destination." }, "early_media": { "type": "boolean", "description": "If true, the call will get early media from the destination.\n", "example": false }, "relay_reason": { "type": "boolean", "description": "If true, the master call will try to hang up with the same reason as the first destination call.\nValid only if the first destination call hangs up earlier than the master call.\n", "example": true }, "anonymous": { "type": "string", "enum": [ "yes", "no", "auto" ], "example": "auto", "description": "Controls anonymous caller ID for the outbound PSTN leg. \"yes\" — always send anonymous caller ID (RFC 3323 Privacy header). \"no\" — never anonymize, always show real caller ID. \"auto\" — inherit from incoming call's Privacy header (default). Only affects PSTN destinations (type \"tel\").\n" } } }, "FlowManagerActionOptionConversationSend": { "type": "object", "properties": { "conversation_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the conversation. Returned from the `GET /conversations` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "text": { "type": "string", "description": "Message text.", "example": "Your verification code is 1234." }, "sync": { "type": "boolean", "description": "Whether to wait for delivery confirmation.", "example": false } } }, "FlowManagerActionOptionDigitsReceive": { "type": "object", "properties": { "duration": { "type": "integer", "description": "DTMF receiving duration in milliseconds.", "example": 10000 }, "key": { "type": "string", "description": "If set, determines which DTMF key triggers the next step.\nThe end key is not included in the resulting variable.\nIf not set, no key will trigger the next step.\n", "example": "#" }, "length": { "type": "integer", "description": "An optional limit to the number of DTMF events that should be gathered before continuing.\n", "example": 4 } } }, "FlowManagerActionOptionDigitsSend": { "type": "object", "properties": { "digits": { "type": "string", "maxLength": 100, "pattern": "^[0-9ABCD#*]*$", "description": "Keys to send. Allowed characters: 0-9, A-D, #, *. Max 100 keys.\n", "example": "1234#" }, "duration": { "type": "integer", "minimum": 100, "maximum": 1000, "description": "Duration per DTMF tone (ms).", "example": 250 }, "interval": { "type": "integer", "minimum": 0, "maximum": 5000, "description": "Interval between keys (ms).", "example": 100 } } }, "FlowManagerActionOptionEcho": { "type": "object", "properties": { "duration": { "type": "integer", "description": "Duration of the echo in milliseconds.", "example": 30000 } } }, "FlowManagerActionOptionEmailSend": { "type": "object", "properties": { "destinations": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" }, "minItems": 1, "description": "List of email destination addresses. Must contain at least one." }, "subject": { "type": "string", "description": "Subject line of the email.", "example": "Meeting Recording" }, "content": { "type": "string", "description": "Body content of the email.", "example": "Your recording is attached." }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/EmailManagerEmailAttachment" }, "description": "List of attachments to include." } } }, "FlowManagerActionOptionExternalMediaStart": { "type": "object", "properties": { "external_host": { "type": "string", "description": "External media target host address.", "example": "media.example.com:10000" }, "encapsulation": { "type": "string", "description": "Encapsulation. Default value is rtp.", "example": "rtp" }, "transport": { "type": "string", "description": "Transport. Default value is udp.", "example": "udp" }, "connection_type": { "type": "string", "description": "Connection type. Default value is client.", "example": "client" }, "format": { "type": "string", "description": "Format. Default value is ulaw.", "example": "ulaw" }, "direction": { "type": "string", "description": "Direction. Default value is both.", "example": "both" }, "data": { "type": "string", "description": "Optional data to pass to the external media endpoint.", "example": "" }, "transport_data": { "type": "string", "description": "Transport-specific data. For websocket, this is appended to the dialstring.", "example": "" } } }, "FlowManagerActionOptionExternalMediaStop": { "type": "object", "description": "No options required." }, "FlowManagerActionOptionFetch": { "type": "object", "properties": { "event_url": { "type": "string", "description": "URL to fetch flow actions from.", "example": "https://api.example.com/webhooks/flow-event" }, "event_method": { "type": "string", "description": "HTTP method for the fetch request.", "example": "POST" } } }, "FlowManagerActionOptionFetchFlow": { "type": "object", "properties": { "flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to fetch and execute. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } } }, "FlowManagerActionOptionGoto": { "type": "object", "properties": { "target_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The action ID within the flow to jump to. References an action `id` within the same flow's `actions` array.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "loop_count": { "type": "integer", "description": "Loop count.", "example": 3 } } }, "FlowManagerActionOptionHangup": { "type": "object", "properties": { "reason": { "type": "string", "description": "Hangup reason code. See cmcall.HangupReason for details.", "example": "normal" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "If set, hangs up the call with the same reason as the referenced call ID. This will overwrite the `reason` option. Returned from the `POST /calls` or `GET /calls` response.", "example": "f6a7b8c9-d0e1-2345-6789-0abcdef01234" } } }, "FlowManagerActionOptionMessageSend": { "type": "object", "properties": { "source": { "type": "object", "$ref": "#/components/schemas/CommonAddress", "description": "Source address for the outbound message." }, "destinations": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" }, "minItems": 1, "description": "List of destination addresses. Must contain at least one." }, "text": { "type": "string", "description": "The text of the message to send.", "example": "Your verification code is 1234." } } }, "FlowManagerActionOptionPlay": { "type": "object", "properties": { "stream_urls": { "type": "array", "items": { "type": "string" }, "minItems": 1, "description": "List of stream URLs for media playback.", "example": [ "https://media.voipbin.net/audio/greeting.wav" ] } } }, "FlowManagerActionOptionQueueJoin": { "type": "object", "properties": { "queue_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the queue to join. Returned from the `POST /queues` or `GET /queues` response.", "example": "1a2b3c4d-5e6f-7890-abcd-ef1234567890" } } }, "FlowManagerActionOptionRecordingStart": { "type": "object", "properties": { "format": { "type": "string", "description": "Format to encode audio in. Supported values are wav, mp3, ogg.", "example": "wav" }, "end_of_silence": { "type": "integer", "description": "Maximum duration of silence, in seconds. 0 for no limit.", "example": 5 }, "end_of_key": { "type": "string", "description": "DTMF input to terminate recording. Supported values are none, any, *,", "example": "#" }, "duration": { "type": "integer", "description": "Maximum duration of the recording, in seconds. 0 for no limit.", "example": 300 }, "beep_start": { "type": "boolean", "description": "Play beep when recording begins.", "example": true }, "on_end_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to execute when recording ends. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } } }, "FlowManagerActionOptionRecordingStop": { "type": "object", "description": "No options for this action." }, "FlowManagerActionOptionSleep": { "type": "object", "properties": { "duration": { "type": "integer", "description": "Sleep duration in milliseconds.", "example": 5000 } } }, "FlowManagerActionOptionStreamEcho": { "type": "object", "properties": { "duration": { "type": "integer", "description": "Duration of the stream echo.", "example": 30000 } } }, "FlowManagerActionOptionTalk": { "type": "object", "properties": { "text": { "type": "string", "description": "The text to read, either in SSML format or plain text.", "example": "Welcome to VoIPBin. How can I help you?" }, "gender": { "type": "string", "description": "Gender of the voice. Supported values are male, female, neutral.", "example": "female" }, "language": { "type": "string", "description": "IETF locale name (e.g., ko-KR, en-US).", "example": "en-US" }, "digits_handle": { "description": "Defines the action when it receives digits.", "type": "string", "enum": [ "", "next" ], "x-enum-varnames": [ "FlowManagerActionOptionTalkDigitsHandleNone", "FlowManagerActionOptionTalkDigitsHandleNext" ], "example": "" }, "async": { "type": "boolean", "description": "If true, the talk action will not block the flow execution.", "example": false } } }, "FlowManagerActionOptionTranscribeStart": { "type": "object", "properties": { "language": { "type": "string", "description": "BCP47 format for the language (e.g., en-US).", "example": "en-US" }, "on_end_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to execute when transcription ends. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "provider": { "$ref": "#/components/schemas/TranscribeManagerTranscribeProvider", "description": "STT provider to use. If omitted, VoIPBIN selects the best available provider automatically.", "example": "gcp" }, "direction": { "$ref": "#/components/schemas/TranscribeManagerTranscribeDirection", "description": "Audio direction to transcribe. If omitted, defaults to both.", "example": "both" } } }, "FlowManagerActionOptionTranscribeStop": { "type": "object", "description": "No options for this action." }, "FlowManagerActionOptionTranscribeRecording": { "type": "object", "properties": { "language": { "type": "string", "description": "BCP47 format for the language (e.g., en-US).", "example": "en-US" }, "on_end_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to execute when recording transcription ends. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "provider": { "$ref": "#/components/schemas/TranscribeManagerTranscribeProvider", "description": "STT provider to use. If omitted, VoIPBIN selects the best available provider automatically.", "example": "gcp" }, "direction": { "$ref": "#/components/schemas/TranscribeManagerTranscribeDirection", "description": "Audio direction to transcribe. If omitted, defaults to both.", "example": "both" } } }, "FlowManagerActionOptionVariableSet": { "type": "object", "properties": { "key": { "type": "string", "description": "The key of the variable to set.", "example": "caller_name" }, "value": { "type": "string", "description": "The value of the variable to set.", "example": "John Smith" } } }, "FlowManagerActionOptionWebhookSend": { "type": "object", "properties": { "sync": { "type": "boolean", "description": "Indicates whether the webhook is synchronous.", "example": false }, "uri": { "type": "string", "description": "The URI to which the webhook is sent.", "example": "https://api.example.com/webhooks" }, "method": { "type": "string", "enum": [ "POST", "GET", "PUT", "DELETE" ], "x-enum-varnames": [ "FlowManagerActionOptionWebhookSendMethodPost", "FlowManagerActionOptionWebhookSendMethodGet", "FlowManagerActionOptionWebhookSendMethodPut", "FlowManagerActionOptionWebhookSendMethodDelete" ], "description": "The HTTP method to use for the webhook.", "example": "POST" }, "data_type": { "type": "string", "description": "The content type of the data being sent. Example `application/json`.", "example": "application/json" }, "data": { "type": "string", "description": "The data to send in the webhook.", "example": "{}" } } }, "FlowManagerAction": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of this action within the flow.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "next_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The identifier of the next action to execute. References an action `id` within the same flow's `actions` array. Null if this is the last action.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "type": { "description": "The type of action to execute.", "$ref": "#/components/schemas/FlowManagerActionType", "example": "talk" }, "option": { "type": "object", "additionalProperties": true, "description": "Additional options based on the `type` field.\n- For `FlowManagerActionTypeAISummary`: see `FlowManagerActionOptionAISummary`\n- For `FlowManagerActionTypeAITalk`: see `FlowManagerActionOptionAITalk`\n- For `FlowManagerActionTypeAMD`: see `FlowManagerActionOptionAMD`\n- For `FlowManagerActionTypeAnswer`: see FlowManagerActionOptionAnswer\n- For `FlowManagerActionTypeBeep`: see FlowManagerActionOptionBeep\n- For `FlowManagerActionTypeBranch`: see FlowManagerActionOptionBranch\n- For `FlowManagerActionTypeCall`: see FlowManagerActionOptionCall\n- For `FlowManagerActionTypeConfbridgeJoin`: see FlowManagerActionOptionConfbridgeJoin\n- For `FlowManagerActionTypeConferenceJoin`: see FlowManagerActionOptionConferenceJoin\n- For `FlowManagerActionTypeConnect`: see FlowManagerActionOptionConnect\n- For `FlowManagerActionTypeConversationSend`: see FlowManagerActionOptionConversationSend\n- For `FlowManagerActionTypeDigitsReceive`: see FlowManagerActionOptionDigitsReceive\n- For `FlowManagerActionTypeDigitsSend`: see FlowManagerActionOptionDigitsSend\n- For `FlowManagerActionTypeEcho`: see FlowManagerActionOptionEcho\n- For `FlowManagerActionTypeEmailSend`: see FlowManagerActionOptionEmailSend\n- For `FlowManagerActionTypeExternalMediaStart`: see FlowManagerActionOptionExternalMediaStart\n- For `FlowManagerActionTypeExternalMediaStop`: see FlowManagerActionOptionExternalMediaStop\n- For `FlowManagerActionTypeFetch`: see FlowManagerActionOptionFetch\n- For `FlowManagerActionTypeFetchFlow`: see FlowManagerActionOptionFetchFlow\n- For `FlowManagerActionTypeGoto`: see FlowManagerActionOptionGoto\n- For `FlowManagerActionTypeHangup`: see FlowManagerActionOptionHangup\n- For `FlowManagerActionTypeMessageSend`: see FlowManagerActionOptionMessageSend\n- For `FlowManagerActionTypePlay`: see FlowManagerActionOptionPlay\n- For `FlowManagerActionTypeQueueJoin`: see FlowManagerActionOptionQueueJoin\n- For `FlowManagerActionTypeRecordingStart`: see FlowManagerActionOptionRecordingStart\n- For `FlowManagerActionTypeRecordingStop`: see FlowManagerActionOptionRecordingStop\n- For `FlowManagerActionTypeSleep`: see FlowManagerActionOptionSleep\n- For `FlowManagerActionTypeStreamEcho`: see FlowManagerActionOptionStreamEcho\n- For `FlowManagerActionTypeTalk`: see FlowManagerActionOptionTalk\n- For `FlowManagerActionTypeTranscribeStart`: see FlowManagerActionOptionTranscribeStart\n- For `FlowManagerActionTypeTranscribeStop`: see FlowManagerActionOptionTranscribeStop\n- For `FlowManagerActionTypeTranscribeRecording`: see FlowManagerActionOptionTranscribeRecording\n- For `FlowManagerActionTypeVariableSet`: see FlowManagerActionOptionVariableSet\n- For `FlowManagerActionTypeWebhookSend`: see FlowManagerActionOptionWebhookSend\n- ...\n" }, "tm_execute": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when this action was executed.", "example": "2026-01-15T09:30:00.000000Z" } }, "required": [ "id", "type" ] }, "FlowManagerActiveflowStatus": { "type": "string", "description": "Status of the activeflow.", "example": "running", "enum": [ "", "running", "ended" ], "x-enum-varnames": [ "FlowManagerActiveflowStatusNone", "FlowManagerActiveflowStatusRunning", "FlowManagerActiveflowStatusEnded" ] }, "FlowManagerWebhookMethod": { "type": "string", "description": "HTTP method used to deliver the per-activeflow webhook.", "example": "POST", "enum": [ "", "POST", "GET", "PUT", "DELETE" ], "x-enum-varnames": [ "FlowManagerWebhookMethodNone", "FlowManagerWebhookMethodPost", "FlowManagerWebhookMethodGet", "FlowManagerWebhookMethodPut", "FlowManagerWebhookMethodDelete" ] }, "FlowManagerReferenceType": { "type": "string", "description": "Reference type of activeflow.", "example": "call", "enum": [ "", "ai", "api", "call", "campaign", "conversation", "transcribe", "recording" ], "x-enum-varnames": [ "FlowManagerReferenceTypeNone", "FlowManagerReferenceTypeAI", "FlowManagerReferenceTypeAPI", "FlowManagerReferenceTypeCall", "FlowManagerReferenceTypeCampaign", "FlowManagerReferenceTypeConversation", "FlowManagerReferenceTypeTranscribe", "FlowManagerReferenceTypeRecording" ] }, "FlowManagerActiveflow": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Unique identifier for the activeflow.", "example": "d4e5f6a7-b8c9-0123-4567-890abcdef012" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer associated with this activeflow. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow definition. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "status": { "$ref": "#/components/schemas/FlowManagerActiveflowStatus", "description": "Current status of the activeflow.", "example": "running" }, "reference_type": { "$ref": "#/components/schemas/FlowManagerReferenceType", "description": "The type of resource this activeflow is associated with.", "example": "call" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource. The actual resource type is determined by `reference_type`. Returned from the corresponding resource endpoint.", "example": "f6a7b8c9-d0e1-2345-6789-0abcdef01234" }, "reference_activeflow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced activeflow. Returned from the `GET /activeflows` response.", "example": "d4e5f6a7-b8c9-0123-4567-890abcdef012" }, "on_complete_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to execute on completion. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "webhook_uri": { "type": "string", "description": "Optional per-activeflow webhook destination URI. When set, activeflow webhook events are delivered additively to this URI in addition to the customer-level webhook destination.\n", "example": "https://example.com/webhooks/activeflow" }, "webhook_method": { "$ref": "#/components/schemas/FlowManagerWebhookMethod", "description": "Optional HTTP method used to deliver the per-activeflow webhook.", "example": "POST" }, "current_action": { "$ref": "#/components/schemas/FlowManagerAction", "description": "The action currently being executed." }, "forward_action_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the next action to execute. References an action `id` within the current flow's `actions` array.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "executed_actions": { "type": "array", "description": "List of actions that have been executed.", "items": { "$ref": "#/components/schemas/FlowManagerAction" } }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the flow was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the flow was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the flow was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "FlowManagerFlowType": { "type": "string", "description": "Type of the flow.", "example": "flow", "enum": [ "flow", "conference", "queue", "campaign", "transfer" ], "x-enum-varnames": [ "FlowManagerFlowTypeFlow", "FlowManagerFlowTypeConference", "FlowManagerFlowTypeQueue", "FlowManagerFlowTypeCampaign", "FlowManagerFlowTypeTransfer" ] }, "FlowManagerFlow": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Unique identifier for the flow.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this flow. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "type": { "description": "The type of the flow.", "$ref": "#/components/schemas/FlowManagerFlowType", "example": "flow" }, "name": { "type": "string", "description": "Name of the flow.", "example": "Inbound Call Handler" }, "detail": { "type": "string", "description": "Detailed description of the flow.", "example": "Main flow for handling inbound customer calls" }, "actions": { "type": "array", "description": "Ordered list of actions to execute in this flow.", "items": { "$ref": "#/components/schemas/FlowManagerAction" } }, "direct_hash": { "type": "string", "description": "Hash for direct access via SIP URI sip:direct.@sip.voipbin.net. Returned from the resource's `direct_hash` field.", "example": "a8f3b2c1d4e5" }, "on_complete_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to execute on completion. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the flow was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the flow was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the flow was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "MessageManagerMessageDirection": { "type": "string", "description": "Direction of the message.", "example": "outbound", "enum": [ "outbound", "inbound" ], "x-enum-varnames": [ "MessageManagerMessageDirectionOutbound", "MessageManagerMessageDirectionInbound" ] }, "MessageManagerMessageProviderName": { "type": "string", "description": "Name of the message provider.", "example": "telnyx", "enum": [ "telnyx", "twilio", "messagebird" ], "x-enum-varnames": [ "MessageManagerMessageProviderNameTelnyx", "MessageManagerMessageProviderNameTwilio", "MessageManagerMessageProviderNameMessagebird" ] }, "MessageManagerMessageType": { "type": "string", "description": "Type of the message.", "example": "sms", "enum": [ "sms" ], "x-enum-varnames": [ "MessageManagerMessageTypeSMS" ] }, "MessageManagerMessage": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Unique identifier for the message.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Unique identifier for the customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "type": { "$ref": "#/components/schemas/MessageManagerMessageType", "description": "The type of the message.", "example": "sms" }, "source": { "$ref": "#/components/schemas/CommonAddress", "description": "The source address of the message." }, "targets": { "type": "array", "items": { "$ref": "#/components/schemas/MessageManagerTarget" }, "description": "List of target addresses to which the message is sent." }, "text": { "type": "string", "description": "The text delivered in the body of the message.", "example": "Your appointment is confirmed for tomorrow at 2 PM." }, "direction": { "$ref": "#/components/schemas/MessageManagerMessageDirection", "description": "The direction of the message (outbound/inbound).", "example": "outbound" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the message was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the message was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the message was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "MessageManagerTargetStatus": { "type": "string", "description": "The status of the message for the target.", "example": "delivered", "enum": [ "received", "queued", "gw_timeout", "sent", "dlr_timeout", "failed", "delivered" ], "x-enum-varnames": [ "MessageManagerTargetStatusReceived", "MessageManagerTargetStatusQueued", "MessageManagerTargetStatusGWTimeout", "MessageManagerTargetStatusSent", "MessageManagerTargetStatusDLRTimeout", "MessageManagerTargetStatusFailed", "MessageManagerTargetStatusDelivered" ] }, "MessageManagerTarget": { "type": "object", "properties": { "destination": { "description": "The destination address for the message.", "$ref": "#/components/schemas/CommonAddress" }, "status": { "description": "The current status of the message for the target.", "$ref": "#/components/schemas/MessageManagerTargetStatus", "example": "delivered" }, "parts": { "type": "integer", "description": "The number of message parts (if the message is split).", "example": 1 }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the target message was last updated.", "example": "2026-01-15T09:30:00.000000Z" } } }, "NumberManagerAvailableNumber": { "type": "object", "properties": { "number": { "type": "string", "description": "The available phone number in E.164 format.", "example": "+14155551234" }, "country": { "type": "string", "description": "The country where the number is available.", "example": "US" }, "region": { "type": "string", "description": "The region within the country.", "example": "California" }, "postal_code": { "type": "string", "description": "The postal code associated with the number.", "example": "94105" }, "features": { "type": "array", "items": { "$ref": "#/components/schemas/NumberManagerAvailableNumberFeature" }, "description": "The list of features supported by the number." } } }, "NumberManagerAvailableNumberFeature": { "type": "string", "description": "A feature supported by the phone number.", "example": "voice", "enum": [ "emergency", "fax", "mms", "sms", "voice" ], "x-enum-varnames": [ "NumberManagerAvailableNumberFeatureEmergency", "NumberManagerAvailableNumberFeatureFax", "NumberManagerAvailableNumberFeatureMMS", "NumberManagerAvailableNumberFeatureSMS", "NumberManagerAvailableNumberFeatureVoice" ] }, "NumberManagerNumberType": { "type": "string", "description": "The type of the number.", "example": "normal", "enum": [ "normal", "virtual" ], "x-enum-varnames": [ "NumberManagerNumberTypeNormal", "NumberManagerNumberTypeVirtual" ] }, "NumberManagerNumberProviderName": { "type": "string", "description": "The provider name for the number.", "example": "telnyx", "enum": [ "telnyx", "twilio", "messagebird" ], "x-enum-varnames": [ "NumberManagerProviderNameTelnyx", "NumberManagerProviderNameTwilio", "NumberManagerProviderNameMessagebird" ] }, "NumberManagerNumberStatus": { "type": "string", "description": "The status of the number.", "example": "active", "enum": [ "active", "deleted" ], "x-enum-varnames": [ "NumberManagerStatusActive", "NumberManagerStatusDeleted" ] }, "NumberManagerNumber": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier for the number.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The customer ID associated with the number. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "number": { "type": "string", "description": "The phone number in E.164 format (normal) or +899 format (virtual).", "example": "+14155551234" }, "type": { "$ref": "#/components/schemas/NumberManagerNumberType", "description": "The type of the number (normal or virtual).", "example": "normal" }, "call_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to execute for incoming calls. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "message_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to execute for incoming messages. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "name": { "type": "string", "description": "The name of the number.", "example": "Main Support Line" }, "detail": { "type": "string", "description": "Additional details about the number.", "example": "Primary inbound number for customer support" }, "status": { "$ref": "#/components/schemas/NumberManagerNumberStatus", "description": "The status of the number.", "example": "active" }, "t38_enabled": { "type": "boolean", "description": "Whether T38 is enabled for the number.", "example": false }, "emergency_enabled": { "type": "boolean", "description": "Whether emergency services are enabled for the number.", "example": false }, "metadata": { "$ref": "#/components/schemas/NumberManagerMetadata" }, "tm_purchase": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp of when the number was purchased.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_renew": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp of when the number was renewed.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp of when the number was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp of when the number was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp of when the number was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "NumberManagerMetadata": { "type": "object", "description": "Configuration flags for a number. Controls platform behavior\nsuch as RTP packet capture for debugging audio issues on this specific number.\nUpdatable by CustomerAdmin or CustomerManager via `PUT /numbers/{id}/metadata`.\n", "properties": { "rtp_debug": { "type": "boolean", "description": "When set to `true`, RTPEngine captures RTP traffic as PCAP files for calls to this number.\nThis flag is OR'd with the customer-level `rtp_debug` — if either is `true`, capture is enabled.\nUse this to debug audio quality issues on a specific number without enabling capture for all customer calls.\nDefault is `false`. Enabling this increases storage usage — disable after debugging.\n", "example": false } } }, "OutdialManagerOutdial": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier for the outdial.", "example": "3c4d5e6f-7a8b-9012-cdef-012345678901" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier for the customer associated with the outdial. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "campaign_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the campaign. Returned from the `POST /campaigns` or `GET /campaigns` response.", "example": "c3d4e5f6-a7b8-9012-3456-7890abcdef01" }, "name": { "type": "string", "description": "The name of the outdial.", "example": "Q1 Target List" }, "detail": { "type": "string", "description": "The detailed description of the outdial.", "example": "Outbound dial list for Q1 campaign" }, "data": { "type": "string", "description": "The data associated with the outdial.", "example": "custom-data" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the outdial was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the outdial was last updated.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the outdial was deleted.", "example": "2026-01-15T09:30:00.000000Z" } } }, "OutdialManagerOutdialtargetStatus": { "type": "string", "description": "The status of the outdial.", "example": "idle", "enum": [ "progressing", "done", "idle" ], "x-enum-varnames": [ "OutdialManagerOutdialtargetStatusProgressing", "OutdialManagerOutdialtargetStatusDone", "OutdialManagerOutdialtargetStatusIdle" ] }, "OutdialManagerOutdialtarget": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier for the outdial target.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "outdial_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the outdial. Returned from the `POST /outdials` or `GET /outdials` response.", "example": "3c4d5e6f-7a8b-9012-cdef-012345678901" }, "name": { "type": "string", "description": "The name of the outdial target.", "example": "John Smith" }, "detail": { "type": "string", "description": "Additional details about the outdial target.", "example": "Priority customer" }, "data": { "type": "string", "description": "The data associated with the outdial target.", "example": "vip-tag" }, "status": { "$ref": "#/components/schemas/OutdialManagerOutdialtargetStatus", "description": "The status of the outdial target.", "example": "idle" }, "destination_0": { "$ref": "#/components/schemas/CommonAddress", "description": "The destination address 0." }, "destination_1": { "$ref": "#/components/schemas/CommonAddress", "description": "The destination address 1." }, "destination_2": { "$ref": "#/components/schemas/CommonAddress", "description": "The destination address 2." }, "destination_3": { "$ref": "#/components/schemas/CommonAddress", "description": "The destination address 3." }, "destination_4": { "$ref": "#/components/schemas/CommonAddress", "description": "The destination address 4." }, "try_count_0": { "type": "integer", "description": "The try count for destination 0.", "example": 0 }, "try_count_1": { "type": "integer", "description": "The try count for destination 1.", "example": 0 }, "try_count_2": { "type": "integer", "description": "The try count for destination 2.", "example": 0 }, "try_count_3": { "type": "integer", "description": "The try count for destination 3.", "example": 0 }, "try_count_4": { "type": "integer", "description": "The try count for destination 4.", "example": 0 }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The update timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The deletion timestamp.", "example": "2026-01-15T09:30:00.000000Z" } } }, "QueueManagerQueueRoutingMethod": { "type": "string", "enum": [ "", "random" ], "x-enum-varnames": [ "QueueManagerQueueRoutingMethodNone", "QueueManagerQueueRoutingMethodRandom" ], "example": "random" }, "QueueManagerQueue": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the queue. Returned from the `POST /queues` or `GET /queues` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this queue. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "name": { "type": "string", "description": "Display name of the queue.", "example": "Sales Queue" }, "detail": { "type": "string", "description": "Detailed description of the queue.", "example": "Handles incoming sales inquiries" }, "routing_method": { "$ref": "#/components/schemas/QueueManagerQueueRoutingMethod", "description": "The method used to route calls to agents.", "example": "random" }, "tag_ids": { "type": "array", "description": "List of tag IDs assigned to this queue. Returned from the `POST /tags` or `GET /tags` response.", "items": { "type": "string", "format": "uuid", "x-go-type": "string" }, "example": [ "b1a2c3d4-e5f6-7890-abcd-ef1234567890" ] }, "direct_hash": { "type": "string", "description": "Hash for direct access via SIP URI sip:direct.@sip.voipbin.net. Returned from the resource's `direct_hash` field.", "example": "a8f3b2c1d4e5" }, "wait_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The flow ID executed while callers wait in queue. Returned from the `POST /flows` or `GET /flows` response.", "example": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90" }, "wait_timeout": { "type": "integer", "description": "Wait queue timeout in milliseconds.", "example": 300000 }, "service_timeout": { "type": "integer", "description": "Service queue timeout in milliseconds.", "example": 600000 }, "wait_queuecall_ids": { "type": "array", "description": "List of queuecall IDs currently waiting. Returned from the `GET /queuecalls` response.", "items": { "type": "string", "format": "uuid", "x-go-type": "string" }, "example": [ "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ] }, "service_queuecall_ids": { "type": "array", "description": "List of queuecall IDs currently being serviced. Each ID is returned from the `GET /queuecalls` response.", "items": { "type": "string", "format": "uuid", "x-go-type": "string" }, "example": [ "c3d4e5f6-a7b8-9c0d-1e2f-3a4b5c6d7e8f" ] }, "total_incoming_count": { "type": "integer", "description": "Total incoming call count.", "example": 150 }, "total_serviced_count": { "type": "integer", "description": "Total serviced call count.", "example": 120 }, "total_abandoned_count": { "type": "integer", "description": "Total abandoned call count.", "example": 10 }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The last update timestamp.", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The deletion timestamp.", "example": "2026-01-17T18:45:00.000000Z" } } }, "QueueManagerQueuecallReferenceType": { "type": "string", "enum": [ "call" ], "x-enum-varnames": [ "QueueManagerQueuecallReferenceTypeCall" ], "example": "call" }, "QueueManagerQueuecallStatus": { "type": "string", "enum": [ "initiating", "waiting", "connecting", "kicking", "service", "done", "abandoned" ], "x-enum-varnames": [ "QueueManagerQueuecallStatusInitiating", "QueueManagerQueuecallStatusWaiting", "QueueManagerQueuecallStatusConnecting", "QueueManagerQueuecallStatusKicking", "QueueManagerQueuecallStatusService", "QueueManagerQueuecallStatusDone", "QueueManagerQueuecallStatusAbandoned" ], "example": "waiting" }, "QueueManagerQueuecall": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the queuecall. Returned from the `GET /queuecalls` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this queuecall. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "reference_type": { "$ref": "#/components/schemas/QueueManagerQueuecallReferenceType", "description": "The type of resource this queuecall references.", "example": "call" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource (e.g., a call). Returned from the corresponding resource endpoint.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "status": { "$ref": "#/components/schemas/QueueManagerQueuecallStatus", "description": "Current status of the queuecall.", "example": "waiting" }, "service_agent_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the agent handling this queuecall. Returned from the `GET /agents` response.", "example": "c3d4e5f6-a7b8-9c0d-1e2f-3a4b5c6d7e8f" }, "duration_waiting": { "type": "integer", "description": "Duration for waiting in milliseconds", "example": 45000 }, "duration_service": { "type": "integer", "description": "Duration for service in milliseconds", "example": 180000 }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_service": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the queue call started service.", "example": "2026-01-15T09:35:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The last update timestamp.", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The deletion timestamp.", "example": "2026-01-17T18:45:00.000000Z" } } }, "RagManagerRag": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique identifier of the rag. Returned from the `POST /rags` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "description": "The customer ID that owns this rag.", "example": "7d4e8f2a-1b3c-4d5e-9f6a-8b7c6d5e4f3a" }, "name": { "type": "string", "description": "Human-readable name for the rag.", "example": "Customer Support KB" }, "description": { "type": "string", "description": "Description of what this rag contains.", "example": "Knowledge base for customer support conversations" }, "tm_create": { "type": "string", "format": "date-time", "description": "Timestamp when the rag was created.", "example": "2026-03-18T10:30:00Z" }, "tm_update": { "type": "string", "format": "date-time", "description": "Timestamp when the rag was last updated.", "example": "2026-03-18T10:30:00Z" }, "status": { "$ref": "#/components/schemas/RagManagerRagDocumentStatus" }, "sources": { "type": "array", "items": { "$ref": "#/components/schemas/RagManagerRagSource" }, "description": "List of document sources in this rag with their ingestion status." } } }, "RagManagerRagDocumentStatus": { "type": "string", "description": "The document processing status. Indicates the current stage of document ingestion.", "enum": [ "pending", "processing", "ready", "error" ], "x-enum-varnames": [ "RagManagerRagDocumentStatusPending", "RagManagerRagDocumentStatusProcessing", "RagManagerRagDocumentStatusReady", "RagManagerRagDocumentStatusError" ], "x-enum-descriptions": [ "Document has been created but not yet processed.", "Document is being parsed, chunked, and embedded.", "Document processing is complete. Chunks are available for queries.", "Document processing failed. See `status_message` for details." ], "example": "ready" }, "RagManagerRagSource": { "type": "object", "description": "A source document in a RAG knowledge base.", "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique identifier of the source (document). Use this ID with `DELETE /rags/{rag-id}/sources/{source-id}` to remove the source.", "example": "c3d4e5f6-a7b8-9012-cdef-123456789012" }, "customer_id": { "type": "string", "format": "uuid", "description": "The customer ID that owns this source. Returned from the `GET /customer` response.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "storage_file_id": { "type": "string", "format": "uuid", "description": "The storage file ID if the source is an uploaded file. Returned from the `POST /storage_files` response.", "example": "b2c3d4e5-f6a7-8901-bcde-f12345678901" }, "source_url": { "type": "string", "format": "uri", "description": "The URL if the source is a web document.", "example": "https://example.com/docs/faq.html" }, "status": { "$ref": "#/components/schemas/RagManagerRagDocumentStatus" }, "status_message": { "type": "string", "description": "Additional details about the current ingestion status.", "example": "Document parsed and 42 chunks created" } } }, "RegistrarManagerAuthType": { "type": "string", "description": "Defines the authentication type. Can be 'basic' or 'ip'.", "enum": [ "basic", "ip" ], "x-enum-varnames": [ "RegistrarManagerAuthTypeBasic", "RegistrarManagerAuthTypeIP" ], "example": "basic" }, "RegistrarManagerExtension": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the extension. Returned from the `POST /extensions` or `GET /extensions` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this extension. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "name": { "type": "string", "description": "Display name of the extension.", "example": "Reception Desk" }, "detail": { "type": "string", "description": "Detailed description of the extension.", "example": "Main reception extension for building A" }, "extension": { "type": "string", "description": "The SIP extension number.", "example": "1001" }, "domain_name": { "type": "string", "description": "Domain name, same as the customer_id, used by Kamailio's INVITE validation", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "username": { "type": "string", "description": "Username, same as the Extension, used by Kamailio's INVITE validation", "example": "1001" }, "password": { "type": "string", "description": "The SIP password for authentication.", "example": "s3cur3P@ss" }, "direct_hash": { "type": "string", "description": "Hash for direct access via SIP URI sip:direct.@sip.voipbin.net. Returned from the resource's `direct_hash` field.", "example": "a8f3b2c1d4e5" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The last update timestamp.", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The deletion timestamp.", "example": "2026-01-17T18:45:00.000000Z" } } }, "RegistrarManagerTrunk": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the trunk. Returned from the `POST /trunks` or `GET /trunks` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this trunk. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "name": { "type": "string", "description": "Display name of the trunk.", "example": "Primary SIP Trunk" }, "detail": { "type": "string", "description": "Detailed description of the trunk.", "example": "Main SIP trunk for outbound calls" }, "domain_name": { "type": "string", "description": "The SIP domain for this trunk.", "example": "sip.example.com" }, "auth_types": { "type": "array", "description": "List of authentication methods for this trunk.", "items": { "$ref": "#/components/schemas/RegistrarManagerAuthType" }, "example": [ "basic" ] }, "username": { "type": "string", "description": "The SIP username for authentication.", "example": "trunk_user" }, "password": { "type": "string", "description": "The SIP password for authentication.", "example": "s3cur3P@ss" }, "allowed_ips": { "type": "array", "description": "List of IP addresses allowed for IP-based authentication.", "items": { "type": "string" }, "example": [ "203.0.113.10", "203.0.113.11" ] }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The last update timestamp.", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The deletion timestamp.", "example": "2026-01-17T18:45:00.000000Z" } } }, "RouteManagerProviderType": { "type": "string", "description": "Defines the type of the provider. Currently, only 'sip' is supported for VoIP/SIP providers.", "enum": [ "sip" ], "x-enum-varnames": [ "RouteManagerProviderTypeSIP" ], "example": "sip" }, "RouteManagerProviderSetupRequest": { "type": "object", "description": "Request body for POST /providers/setup. Submits carrier credentials so the platform can validate the key, create the carrier-side SIP trunk, and auto-create a VoIPBin provider record.", "required": [ "carrier", "name", "credentials" ], "properties": { "carrier": { "type": "string", "enum": [ "telnyx" ], "x-enum-varnames": [ "RouteManagerProviderSetupCarrierTelnyx" ], "description": "The carrier to set up. Currently only 'telnyx' is supported.", "example": "telnyx" }, "name": { "type": "string", "description": "A human-readable name for the created provider.", "example": "My Telnyx Trunk" }, "detail": { "type": "string", "description": "Optional description of the provider.", "example": "Primary outbound Telnyx SIP trunk" }, "credentials": { "type": "object", "required": [ "api_key" ], "properties": { "api_key": { "type": "string", "description": "The carrier API key used to validate access and create the SIP trunk.", "example": "KEY_01234567890abcdef" } } } } }, "RouteManagerProvider": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the provider. Returned from the `POST /providers` or `GET /providers` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "type": { "$ref": "#/components/schemas/RouteManagerProviderType", "description": "The type of the provider.", "example": "sip" }, "hostname": { "type": "string", "description": "The destination hostname for the provider.", "example": "sip.provider.example.com" }, "tech_prefix": { "type": "string", "description": "The tech prefix, valid only for SIP type providers.", "example": "9" }, "tech_postfix": { "type": "string", "description": "The tech postfix, valid only for SIP type providers.", "example": "#" }, "tech_headers": { "type": "object", "additionalProperties": { "type": "string" }, "description": "The tech headers, valid only for SIP type providers.", "example": { "X-Custom-Header": "value1" } }, "metadata": { "type": "object", "additionalProperties": true, "nullable": true, "description": "Carrier-specific resource identifiers stored during automated setup. For Telnyx providers created via `POST /providers/setup`, contains `telnyx_profile_id`, `telnyx_connection_id`, and `telnyx_ip_ids`. Read-only — populated automatically by the setup endpoint. Empty object `{}` for providers created manually via `POST /providers`.", "example": { "telnyx_profile_id": "2944757397136082899", "telnyx_connection_id": "2944757397198982899", "telnyx_ip_ids": [ "2944757397261882899" ] } }, "name": { "type": "string", "description": "The name of the provider.", "example": "Twilio SIP Provider" }, "detail": { "type": "string", "description": "The details about the provider.", "example": "Primary outbound SIP provider" }, "codecs": { "type": "string", "description": "Comma-separated codec list offered to this provider (e.g. \"PCMU,PCMA\"). Empty means server-default negotiation. Applied to outgoing PSTN dial attempts only; has no effect on SIP-to-SIP traffic.\n", "example": "PCMU,PCMA" }, "health_status": { "type": "string", "enum": [ "unknown", "healthy", "unhealthy" ], "x-enum-varnames": [ "RouteManagerProviderHealthStatusUnknown", "RouteManagerProviderHealthStatusHealthy", "RouteManagerProviderHealthStatusUnhealthy" ], "description": "The health status of the provider as determined by periodic SIP OPTIONS probes.", "example": "healthy" }, "health_checked_at": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The timestamp of the last successful health check probe.", "example": "2026-04-20T10:00:00.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The last update timestamp.", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The deletion timestamp.", "example": "2026-01-17T18:45:00.000000Z" } } }, "RouteManagerProviderCall": { "type": "object", "description": "An admin-triggered call placed through a specific provider. Captures the\nadmin's original request info plus the IDs of calls/groupcalls that were\ncreated by the underlying call-creation step. Admin polls the referenced\ncall IDs via `GET /calls/{id}` for per-call state.\n", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the providercall. Returned from the `POST /providercalls` response.", "example": "b7d1c0f6-9a2e-4b3f-8e2a-1c7d5b8a9e0f" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The customer the record is attributed to. Set server-side from the authenticated admin's own customer.", "example": "6a93f71e-8b2d-4e5f-9a1c-2d3e4f5a6b7c" }, "provider_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The provider the call was forced through. Returned from the `GET /providers` response.", "example": "4dbeabd6-f397-4375-95d2-a38411e07ed1" }, "flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The flow executed after the destination answered. `00000000-0000-0000-0000-000000000000` when no flow was attached.", "example": "00000000-0000-0000-0000-000000000000" }, "source": { "$ref": "#/components/schemas/CommonAddress" }, "destinations": { "type": "array", "items": { "$ref": "#/components/schemas/CommonAddress" }, "minItems": 1, "description": "The admin-supplied dial targets. One Call or Groupcall is created per destination, depending on destination type." }, "anonymous": { "type": "string", "enum": [ "yes", "no", "auto" ], "x-enum-varnames": [ "RouteManagerProviderCallAnonymousYes", "RouteManagerProviderCallAnonymousNo", "RouteManagerProviderCallAnonymousAuto" ], "description": "The anonymous caller-ID option requested. `auto` (default) resolves the same as `no` today.", "example": "auto" }, "call_ids": { "type": "array", "items": { "type": "string", "format": "uuid", "x-go-type": "string" }, "description": "IDs of the Call records that the call-creation step produced. Returned from the `POST /calls` response and retrievable via `GET /calls/{id}`.", "example": [ "9f8e7d6c-5b4a-3c2d-1e0f-abcdef012345" ] }, "groupcall_ids": { "type": "array", "items": { "type": "string", "format": "uuid", "x-go-type": "string" }, "description": "IDs of any Groupcall records produced when a destination resolved to a group-type address. Retrievable via `GET /groupcalls/{id}`.", "example": [] }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-04-21T23:15:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The last update timestamp.", "example": "2026-04-21T23:15:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The deletion timestamp. `null` until soft-deleted.", "example": "2026-04-22T00:00:00.000000Z" } } }, "RouteManagerRoute": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the route. Returned from the `POST /routes` or `GET /routes` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this route. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "name": { "type": "string", "description": "The name of the route.", "example": "US Outbound Route" }, "detail": { "type": "string", "description": "The details about the route.", "example": "Routes calls to US numbers via primary provider" }, "provider_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the provider used for this route. Returned from the `GET /providers` response.", "example": "e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9a0b" }, "priority": { "type": "integer", "description": "The priority of the route, used for routing decisions.", "example": 1 }, "target": { "type": "string", "description": "The target destination for the route (e.g., country code or 'all').", "example": "1" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The last update timestamp.", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The deletion timestamp.", "example": "2026-01-17T18:45:00.000000Z" } } }, "StorageManagerAccount": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the storage account. Returned from the `GET /storage_accounts` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this storage account. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "total_file_count": { "type": "integer", "format": "int64", "description": "The total number of files in the account.", "example": 42 }, "total_file_size": { "type": "integer", "format": "int64", "description": "The total file size in bytes.", "example": 1073741824 }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The last update timestamp.", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The deletion timestamp.", "example": "2026-01-17T18:45:00.000000Z" } } }, "StorageManagerFileReferenceType": { "type": "string", "description": "The reference type of the file.", "enum": [ "", "normal", "recording" ], "x-enum-varnames": [ "StorageManagerFileReferenceTypeNone", "StorageManagerFileReferenceTypeNormal", "StorageManagerFileReferenceTypeRecording" ], "example": "recording" }, "StorageManagerFileType": { "type": "string", "description": "The type/category of the file. Indicates the purpose of the uploaded file.", "enum": [ "", "rag", "talk", "recording" ], "x-enum-varnames": [ "StorageManagerFileTypeNone", "StorageManagerFileTypeRAG", "StorageManagerFileTypeTalk", "StorageManagerFileTypeRecording" ], "example": "rag" }, "StorageManagerFile": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the file. Returned from the `POST /storage_files` or `GET /storage_files` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this file. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "owner_type": { "type": "string", "description": "Type of the resource owner (e.g., agent).", "example": "agent" }, "owner_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the resource that owns this file (e.g., an agent or a call). Returned from the corresponding owner resource endpoint.", "example": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90" }, "reference_type": { "$ref": "#/components/schemas/StorageManagerFileReferenceType", "description": "The type of resource this file is associated with.", "example": "recording" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource. Returned from the corresponding resource endpoint.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "type": { "$ref": "#/components/schemas/StorageManagerFileType", "description": "The type/category of the file.", "example": "rag" }, "name": { "type": "string", "description": "The name of the file.", "example": "meeting-recording.wav" }, "detail": { "type": "string", "description": "The details of the file.", "example": "Recording of the sales meeting" }, "filename": { "type": "string", "description": "The filename of the file.", "example": "550e8400-e29b-41d4-a716-446655440000.wav" }, "filesize": { "type": "integer", "format": "int64", "description": "The size of the file in bytes.", "example": 5242880 }, "uri_download": { "type": "string", "description": "The URI for downloading the file.", "example": "https://storage.voipbin.net/files/550e8400-e29b-41d4-a716-446655440000.wav" }, "tm_download_expire": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the download link expires.", "example": "2026-02-15T09:30:00.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The creation timestamp.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The last update timestamp.", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The deletion timestamp.", "example": "2026-01-17T18:45:00.000000Z" } } }, "TalkManagerTalkType": { "type": "string", "description": "Type of the talk.", "enum": [ "direct", "group", "talk" ], "x-enum-varnames": [ "TalkManagerTalkTypeDirect", "TalkManagerTalkTypeGroup", "TalkManagerTalkTypeTalk" ], "example": "direct" }, "TalkManagerParticipantInput": { "type": "object", "description": "Participant information for chat creation.", "properties": { "owner_type": { "type": "string", "description": "Owner type (e.g., \"agent\", \"customer\").", "example": "agent" }, "owner_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the participant owner. Returned from the corresponding owner resource endpoint (e.g., `GET /agents`).", "example": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90" } }, "required": [ "owner_type", "owner_id" ] }, "TalkManagerTalk": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the talk. Returned from the `POST /service_agents/talk_chats` or `GET /service_agents/talk_chats` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this talk. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "type": { "$ref": "#/components/schemas/TalkManagerTalkType", "description": "The type of the talk.", "example": "direct" }, "name": { "type": "string", "description": "Talk name (optional).", "example": "Sales Team Chat" }, "detail": { "type": "string", "description": "Talk description/detail (optional).", "example": "Internal chat for the sales team" }, "member_count": { "type": "integer", "description": "Number of participants in this chat.", "example": 5 }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the talk was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the talk was last updated.", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the talk was deleted.", "example": "2026-01-17T18:45:00.000000Z" } } }, "TalkManagerMessageType": { "type": "string", "description": "Type of the message.", "enum": [ "normal", "system" ], "x-enum-varnames": [ "TalkManagerMessageTypeNormal", "TalkManagerMessageTypeSystem" ], "example": "normal" }, "TalkManagerMessage": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the message. Returned from the `POST /service_agents/talk_messages` or `GET /service_agents/talk_messages` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this message. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "owner_type": { "type": "string", "description": "Resource's owner type.", "example": "agent" }, "owner_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the message author. Returned from the corresponding owner resource endpoint.", "example": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90" }, "chat_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the talk this message belongs to. Returned from the `GET /service_agents/talk_chats` response.", "example": "f6a7b8c9-d0e1-2f3a-4b5c-6d7e8f9a0b1c" }, "parent_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the parent message (for threaded replies). Returned from the `GET /service_agents/talk_messages` response.", "example": "a7b8c9d0-e1f2-3a4b-5c6d-7e8f9a0b1c2d" }, "type": { "$ref": "#/components/schemas/TalkManagerMessageType", "description": "The type of the message.", "example": "normal" }, "text": { "type": "string", "description": "Message text content.", "example": "Hello team, any updates on the project?" }, "medias": { "type": "array", "description": "Media attachments.", "items": { "$ref": "#/components/schemas/TalkManagerMedia" } }, "metadata": { "$ref": "#/components/schemas/TalkManagerMetadata", "description": "Message metadata including reactions." }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the message was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the message was last updated.", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the message was deleted.", "example": "2026-01-17T18:45:00.000000Z" } } }, "TalkManagerMediaType": { "type": "string", "description": "Type of the media content.", "enum": [ "address", "agent", "file", "link" ], "x-enum-varnames": [ "TalkManagerMediaTypeAddress", "TalkManagerMediaTypeAgent", "TalkManagerMediaTypeFile", "TalkManagerMediaTypeLink" ], "example": "file" }, "TalkManagerMedia": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/TalkManagerMediaType", "description": "The type of media content.", "example": "file" }, "address": { "description": "Valid only if the type is `address`.", "$ref": "#/components/schemas/CommonAddress" }, "agent_id": { "description": "The unique identifier of the agent. Valid only if the type is `agent`. Returned from the `GET /agents` response.", "type": "string", "format": "uuid", "example": "c3d4e5f6-a7b8-9c0d-1e2f-3a4b5c6d7e8f" }, "file_id": { "description": "The unique identifier of the file. Valid only if the type is `file`. Returned from the `GET /storage_files` response.", "type": "string", "format": "uuid", "x-go-type": "string", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "link_url": { "description": "The URL of the linked resource. Valid only if the type is `link`.", "type": "string", "format": "uri", "example": "https://example.com/document.pdf" } } }, "TalkManagerMetadata": { "type": "object", "properties": { "reactions": { "type": "array", "description": "List of reactions on the message.", "items": { "$ref": "#/components/schemas/TalkManagerReaction" } } } }, "TalkManagerReaction": { "type": "object", "properties": { "emoji": { "type": "string", "description": "Emoji character for the reaction.", "example": "👍" }, "owner_type": { "type": "string", "description": "Type of the owner who reacted.", "example": "agent" }, "owner_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the owner who reacted. Returned from the corresponding owner resource endpoint (e.g., `GET /agents`).", "example": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the reaction was created.", "example": "2026-01-15T09:30:00.000000Z" } } }, "TalkManagerParticipant": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the participant.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "owner_type": { "type": "string", "description": "Resource's owner type.", "example": "agent" }, "owner_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the participant owner. Returned from the corresponding owner resource endpoint.", "example": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90" }, "chat_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the talk this participant belongs to. Returned from the `GET /service_agents/talk_chats` response.", "example": "f6a7b8c9-d0e1-2f3a-4b5c-6d7e8f9a0b1c" }, "tm_joined": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the participant joined the talk.", "example": "2026-01-15T10:00:00.000000Z" } } }, "TimelineManagerEvent": { "type": "object", "description": "A timeline event with WebhookMessage data", "properties": { "timestamp": { "type": "string", "format": "date-time", "description": "When the event occurred", "example": "2026-01-15T09:30:00.000000Z" }, "event_type": { "type": "string", "description": "Type of event (e.g., call_created, conference_started)", "example": "call_created" }, "data": { "type": "object", "description": "Event data in WebhookMessage format", "example": {} } } }, "TimelineManagerAnalysisStatus": { "type": "string", "description": "Lifecycle state of the analysis.", "example": "completed", "enum": [ "progressing", "completed", "failed" ], "x-enum-varnames": [ "TimelineManagerAnalysisStatusProgressing", "TimelineManagerAnalysisStatusCompleted", "TimelineManagerAnalysisStatusFailed" ] }, "TimelineManagerAnalysis": { "type": "object", "description": "AI analysis of an ended activeflow. Produced on demand, stored once, and optionally re-analyzed. The structured verdict lives in `result` once the analysis completes.\n", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the analysis. Returned from the `POST /timeline-analyses` or `GET /timeline-analyses` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The customer who owns this analysis.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "activeflow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The ended activeflow that was analyzed. Returned from the `GET /activeflows` response.", "example": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" }, "status": { "$ref": "#/components/schemas/TimelineManagerAnalysisStatus" }, "result": { "type": "object", "additionalProperties": true, "description": "The structured analysis verdict. Null while progressing or on failure. Present on successful completion. Includes an overall status, a narrative, detected issues with evidence pointers, and per-type resource usage.\n", "example": { "version": 1, "overall_status": "warning", "input_reduced": false, "narrative": "The call connected, the IVR collected the customer's intent, and the call was routed to an available agent who resolved the request.", "issues": [ { "severity": "warning", "area": "routing", "summary": "The queue wait exceeded the configured target by 8 seconds.", "evidence": [ { "evidence_index": 12, "event_type": "queue_joined", "timestamp": "2026-01-15T09:30:12.000000Z", "resource_id": "5e3f8b2a-9c1d-4e6f-8a7b-2d3c4e5f6a7b" } ] } ], "resources_used": [ { "type": "call", "count": 1 }, { "type": "queuecall", "count": 1 } ] } }, "error": { "type": "string", "description": "Sanitized failure reason when status is failed.", "example": "analysis engine timed out" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the analysis was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "nullable": true, "description": "Timestamp when the analysis was last updated.", "example": "2026-01-15T09:30:05.000000Z" } } }, "TimelineManagerPeerEvent": { "type": "object", "description": "A single raw peer_events row: an unfiltered, address-searchable peer/local event log entry from call-manager or conversation-manager, with NO identity resolution and NO CRM eligibility filtering applied. May include internal-resource peer types (agent, ai, conference, sip) that ContactManagerInteraction deliberately excludes; the caller is responsible for any presentation-layer filtering of this noise.\n", "properties": { "timestamp": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "The event's origin timestamp.", "example": "2026-01-15T10:30:00.123000Z" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "Unique identifier of the associated customer.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "publisher": { "type": "string", "description": "Synthetic derived label, not the raw wire publisher value.", "enum": [ "call", "conversation_message", "conversation" ], "example": "call" }, "event_type": { "type": "string", "description": "The originating event type.", "example": "call_hangup" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The call_id / conversation_message_id / conversation_id this row was projected from.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "direction": { "type": "string", "description": "Direction of the interaction from the platform perspective. Empty for the conversation-parent shape, which has no direction concept.", "enum": [ "incoming", "outgoing", "" ], "example": "incoming" }, "peer": { "allOf": [ { "$ref": "#/components/schemas/CommonAddress" } ], "description": "Remote endpoint. May be an internal-resource type (agent/ai/conference/sip) not present in ContactManagerInteraction's Peer." }, "local": { "allOf": [ { "$ref": "#/components/schemas/CommonAddress" } ], "description": "The customer's own endpoint." }, "data": { "type": "object", "additionalProperties": true, "description": "The original webhook payload, verbatim.", "example": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" } } } }, "TimelineManagerPeerEventListResponse": { "type": "object", "properties": { "result": { "type": "array", "description": "List of peer_events rows.", "items": { "$ref": "#/components/schemas/TimelineManagerPeerEvent" } }, "next_page_token": { "type": "string", "description": "Pagination token for the next page. Empty when no further pages exist.", "example": "2026-01-15T10:30:00.123000Z" } } }, "TagManagerTag": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the tag. Returned from the `POST /tags` or `GET /tags` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this tag. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "name": { "type": "string", "description": "The name of the tag.", "example": "VIP Customer" }, "detail": { "type": "string", "description": "The details about the tag.", "example": "Tag for high-priority VIP customers" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the tag was created.", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the tag was last updated.", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the tag was deleted.", "example": "2026-01-17T18:45:00.000000Z" } } }, "TtsManagerSpeakingReferenceType": { "type": "string", "description": "Type of the referenced entity for the speaking session.", "example": "call", "enum": [ "", "call", "confbridge" ], "x-enum-varnames": [ "TtsManagerSpeakingReferenceTypeNone", "TtsManagerSpeakingReferenceTypeCall", "TtsManagerSpeakingReferenceTypeConfbridge" ] }, "TtsManagerSpeakingDirection": { "type": "string", "description": "Audio injection direction for the speaking session.", "example": "both", "enum": [ "", "in", "out", "both" ], "x-enum-varnames": [ "TtsManagerSpeakingDirectionNone", "TtsManagerSpeakingDirectionIn", "TtsManagerSpeakingDirectionOut", "TtsManagerSpeakingDirectionBoth" ] }, "TtsManagerSpeakingStatus": { "type": "string", "description": "Status of the speaking session.", "example": "active", "enum": [ "initiating", "active", "stopped" ], "x-enum-varnames": [ "TtsManagerSpeakingStatusInitiating", "TtsManagerSpeakingStatusActive", "TtsManagerSpeakingStatusStopped" ] }, "TtsManagerSpeaking": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the speaking session. Returned from the `POST /speakings` or `GET /speakings` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this speaking session. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "reference_type": { "$ref": "#/components/schemas/TtsManagerSpeakingReferenceType", "description": "Type of the referenced entity (call, confbridge).", "example": "call" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the referenced resource (call or confbridge). Returned from the corresponding resource endpoint.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "language": { "type": "string", "description": "TTS language (e.g. en-US)", "example": "en-US" }, "provider": { "type": "string", "description": "TTS provider (elevenlabs)", "example": "elevenlabs" }, "voice_id": { "type": "string", "description": "Provider-specific voice ID", "example": "21m00Tcm4TlvDq8ikWAM" }, "direction": { "$ref": "#/components/schemas/TtsManagerSpeakingDirection", "description": "Audio injection direction (in, out, both).", "example": "both" }, "status": { "$ref": "#/components/schemas/TtsManagerSpeakingStatus", "description": "Status of the speaking session.", "example": "active" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Creation timestamp", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Last update timestamp", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Soft-delete timestamp", "example": "2026-01-17T18:45:00.000000Z" } } }, "TranscribeManagerTranscribeDirection": { "type": "string", "enum": [ "both", "in", "out" ], "x-enum-varnames": [ "TranscribeManagerTranscribeDirectionBoth", "TranscribeManagerTranscribeDirectionIn", "TranscribeManagerTranscribeDirectionOut" ], "example": "both" }, "TranscribeManagerTranscribeProvider": { "type": "string", "enum": [ "", "gcp", "aws" ], "x-enum-varnames": [ "TranscribeManagerTranscribeProviderEmpty", "TranscribeManagerTranscribeProviderGcp", "TranscribeManagerTranscribeProviderAws" ], "example": "gcp" }, "TranscribeManagerTranscribeReferenceType": { "type": "string", "enum": [ "unknown", "recording", "call", "confbridge" ], "x-enum-varnames": [ "TranscribeManagerTranscribeReferenceTypeUnknown", "TranscribeManagerTranscribeReferenceTypeRecording", "TranscribeManagerTranscribeReferenceTypeCall", "TranscribeManagerTranscribeReferenceTypeConfbridge" ], "example": "call" }, "TranscribeManagerTranscribeStatus": { "type": "string", "enum": [ "progressing", "done" ], "x-enum-varnames": [ "TranscribeManagerTranscribeStatusProgressing", "TranscribeManagerTranscribeStatusDone" ], "example": "progressing" }, "TranscribeManagerTranscribe": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the transcribe session. Returned from the `POST /transcribes` or `GET /transcribes` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this transcribe session. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "activeflow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the activeflow associated with this transcribe session. Returned from the `POST /activeflows` or `GET /activeflows` response.", "example": "d4e5f6a7-b8c9-0123-4567-890abcdef012" }, "on_end_flow_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the flow to execute when the transcribe session ends. Returned from the `POST /flows` or `GET /flows` response.", "example": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "reference_type": { "$ref": "#/components/schemas/TranscribeManagerTranscribeReferenceType", "description": "The type of resource being transcribed.", "example": "call" }, "reference_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the resource being transcribed (call, conference, or recording). Returned from the corresponding resource endpoint.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "status": { "$ref": "#/components/schemas/TranscribeManagerTranscribeStatus", "description": "Current status of the transcribe session.", "example": "progressing" }, "language": { "type": "string", "description": "BCP47 type's language code.", "example": "en-US" }, "direction": { "$ref": "#/components/schemas/TranscribeManagerTranscribeDirection", "description": "The audio direction to transcribe.", "example": "both" }, "provider": { "$ref": "#/components/schemas/TranscribeManagerTranscribeProvider", "description": "The STT provider used for the transcription.", "example": "gcp" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when created", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when updated", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when deleted", "example": "2026-01-17T18:45:00.000000Z" } } }, "TranscribeManagerTranscriptDirection": { "type": "string", "enum": [ "both", "in", "out" ], "x-enum-varnames": [ "TranscribeManagerTranscriptDirectionBoth", "TranscribeManagerTranscriptDirectionIn", "TranscribeManagerTranscriptDirectionOut" ], "example": "both" }, "TranscribeManagerTranscript": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the transcript.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this transcript. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "transcribe_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the parent transcribe session. Returned from the `POST /transcribes` or `GET /transcribes` response.", "example": "b8c9d0e1-f2a3-4b5c-6d7e-8f9a0b1c2d3e" }, "direction": { "$ref": "#/components/schemas/TranscribeManagerTranscriptDirection", "description": "The audio direction of this transcript.", "example": "both" }, "message": { "type": "string", "description": "Transcript message", "example": "Hello, thank you for calling. How can I help you?" }, "tm_transcript": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when this transcript was spoken.", "example": "2026-01-15T09:31:15.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the transcript record was created.", "example": "2026-01-15T09:30:00.000000Z" } } }, "TranscribeManagerSpeechWebhookMessage": { "type": "object", "description": "Webhook payload for speech recognition events (transcribe_speech_started, transcribe_speech_interim, transcribe_speech_ended). Delivered when voice activity is detected during a streaming transcription session.", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the speech event.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this transcription session. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "streaming_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the audio streaming session that produced this speech event.", "example": "b8c9d0e1-f2a3-4b5c-6d7e-8f9a0b1c2d3e" }, "transcribe_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the parent transcribe session. Returned from the `POST /transcribes` or `GET /transcribes` response.", "example": "c9d0e1f2-a3b4-5c6d-7e8f-9a0b1c2d3e4f" }, "direction": { "$ref": "#/components/schemas/TranscribeManagerTranscriptDirection", "description": "The audio direction of this speech event.", "example": "in" }, "message": { "type": "string", "description": "The interim transcribed text. Present for `transcribe_speech_interim` events. Empty for `transcribe_speech_started` and `transcribe_speech_ended` events.", "example": "Hello, I need help with my account" }, "tm_event": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the speech event occurred.", "example": "2026-01-15T09:31:15.000000Z" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when the speech event record was created.", "example": "2026-01-15T09:31:15.000000Z" } } }, "TransferManagerTransferType": { "type": "string", "enum": [ "attended", "blind" ], "x-enum-varnames": [ "TransferManagerTransferTypeAttended", "TransferManagerTransferTypeBlind" ], "example": "blind" }, "TransferManagerTransfer": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the transfer. Returned from the `POST /transfers` response.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the customer who owns this transfer. Returned from the `GET /customers` response.", "example": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d" }, "type": { "$ref": "#/components/schemas/TransferManagerTransferType", "description": "The type of transfer being performed.", "example": "blind" }, "transferer_call_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the call initiating the transfer. Returned from the `GET /calls` response.", "example": "c9d0e1f2-a3b4-5c6d-7e8f-9a0b1c2d3e4f" }, "transferee_addresses": { "type": "array", "description": "List of target addresses for the transfer.", "minItems": 1, "items": { "$ref": "#/components/schemas/CommonAddress" } }, "transferee_call_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the call being transferred. Returned from the `GET /calls` response.", "example": "d0e1f2a3-b4c5-6d7e-8f9a-0b1c2d3e4f5a" }, "groupcall_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the groupcall created for the transfer. Returned from the `GET /groupcalls` response.", "example": "e1f2a3b4-c5d6-7e8f-9a0b-1c2d3e4f5a6b" }, "confbridge_id": { "type": "string", "format": "uuid", "x-go-type": "string", "description": "The unique identifier of the conference bridge used for attended transfer. Returned from the `GET /conferences` response.", "example": "f2a3b4c5-d6e7-8f9a-0b1c-2d3e4f5a6b7c" }, "tm_create": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when created", "example": "2026-01-15T09:30:00.000000Z" }, "tm_update": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when updated", "example": "2026-01-16T14:20:00.000000Z" }, "tm_delete": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Timestamp when deleted", "example": "2026-01-17T18:45:00.000000Z" } } }, "RequestBodyAuthSignupPOST": { "type": "object", "required": [ "email", "accepted_tos" ], "description": "Request body for POST /auth/signup (self-service customer registration).", "properties": { "name": { "type": "string", "description": "Display name for the customer account.", "example": "Acme Corporation" }, "detail": { "type": "string", "description": "Additional details about the customer.", "example": "Enterprise customer account" }, "email": { "type": "string", "format": "email", "x-go-type": "string", "description": "Email address for the new customer account. Must be unique across all customers.", "example": "admin@acme.com" }, "phone_number": { "type": "string", "description": "Contact phone number in E.164 format.", "example": "+14155551234" }, "address": { "type": "string", "description": "Mailing address of the customer.", "example": "123 Main St, San Francisco, CA 94105" }, "webhook_method": { "type": "string", "description": "HTTP method for webhook delivery. One of: POST, GET, PUT, DELETE.", "example": "POST" }, "webhook_uri": { "type": "string", "description": "URI where webhook events will be delivered.", "example": "https://api.acme.com/webhooks/voipbin" }, "accepted_tos": { "type": "boolean", "description": "Must be `true` to confirm acceptance of the Terms of Service. Requests with `false` or missing value are rejected with HTTP 400.", "example": true } } }, "RequestBodyAuthEmailVerifyPOST": { "type": "object", "required": [ "token" ], "description": "Request body for POST /auth/email-verify (email verification).", "properties": { "token": { "type": "string", "description": "64-character lowercase hexadecimal verification token. Sent to the customer's email after `POST /auth/signup`.", "example": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6abcd" } } }, "CustomerManagerSignupResult": { "type": "object", "description": "Result of a successful signup. Contains the newly created customer and a provisioned access key.", "properties": { "customer": { "$ref": "#/components/schemas/CustomerManagerCustomer" }, "accesskey": { "$ref": "#/components/schemas/CustomerManagerAccesskey" } } }, "CustomerManagerEmailVerifyResult": { "type": "object", "required": [ "customer" ], "description": "Result of a successful email verification. Contains the verified customer.", "properties": { "customer": { "$ref": "#/components/schemas/CustomerManagerCustomer" } } }, "RequestBodyAuthUnregisterPOST": { "type": "object", "description": "Request body for POST /auth/unregister (self-service account deletion).\nExactly one of `password` or `confirmation_phrase` must be provided.\n", "properties": { "password": { "type": "string", "description": "Account password for re-authentication. Required for password-based accounts. Mutually exclusive with `confirmation_phrase`.", "example": "mySecurePassword123" }, "confirmation_phrase": { "type": "string", "description": "Must be exactly \"DELETE\". Required for SSO users and API-key authenticated requests. Mutually exclusive with `password`.", "example": "DELETE" }, "immediate": { "type": "boolean", "description": "If true, skip the 30-day grace period and delete the account immediately. The account is frozen and then permanently deleted (PII anonymized, all resources cascade-deleted) in a single request. Default: false.", "example": false } } }, "RequestBodyAuthBootPOST": { "type": "object", "required": [ "direct_hash" ], "description": "Request body for POST /auth/boot (resource-scoped JWT generation from a direct hash).", "properties": { "direct_hash": { "type": "string", "description": "The direct hash link (e.g., \"direct.a1b2c3d4e5f6\"). Obtained from resource direct hash endpoints such as `POST /ais/{id}/direct_hash_regenerate`.", "example": "direct.a1b2c3d4e5f6" } } }, "RequestBodyAuthPasswordForgotPOST": { "type": "object", "required": [ "username" ], "description": "Request body for POST /auth/password-forgot (initiate password reset).", "properties": { "username": { "type": "string", "format": "email", "x-go-type": "string", "description": "The agent's username (email address). A reset link will be sent to this address if an account exists.", "example": "agent@example.com" } } }, "RequestBodyAuthPasswordResetPOST": { "type": "object", "required": [ "token", "password" ], "description": "Request body for POST /auth/password-reset (complete password reset).", "properties": { "token": { "type": "string", "pattern": "^[0-9a-f]{64}$", "minLength": 64, "maxLength": 64, "description": "64-character lowercase hexadecimal password reset token. Received via the link in the reset email sent by `POST /auth/password-forgot`.", "example": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6abcd" }, "password": { "type": "string", "minLength": 8, "description": "The new password to set for the account. Must be at least 8 characters.", "example": "myNewSecurePassword123" } } }, "AuthBootResponse": { "type": "object", "description": "Result of a successful boot request. Contains a resource-scoped JWT and metadata about the scoped resource.", "properties": { "token": { "type": "string", "description": "JWT token string for API authentication. Pass as `Bearer ` in the Authorization header.", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcl9pZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCJ9.abc123" }, "type": { "type": "string", "enum": [ "direct" ], "description": "Token type. Always \"direct\" for boot tokens.", "example": "direct" }, "resource_type": { "type": "string", "description": "The type of resource this token is scoped to (e.g., \"ai\").", "example": "ai" }, "resource_id": { "type": "string", "format": "uuid", "description": "The UUID of the resource this token is scoped to. Returned from the resource creation endpoint (e.g., `POST /ais`).", "example": "550e8400-e29b-41d4-a716-446655440000" }, "customer_id": { "type": "string", "format": "uuid", "description": "The UUID of the customer that owns the resource. Returned from the `POST /auth/signup` response.", "example": "660e8400-e29b-41d4-a716-446655440001" }, "expire": { "type": "string", "format": "date-time", "x-go-type": "string", "description": "Token expiry timestamp in ISO 8601 format.", "example": "2026-04-07T12:00:00Z" }, "resource_data": { "type": "object", "nullable": true, "description": "Resource-type-scoped envelope for additional, publicly-safe data about the boot-scoped resource. Each entry is a self-documenting named key; currently only \"public_display_config\" is populated (for resource_type \"webchat_widget\", carrying the widget's WebchatManagerWidgetThemeConfig shape). The envelope key itself, and any entry inside it, is OMITTED (not present) when there is nothing to report -- never present as an empty object.\n", "properties": { "public_display_config": { "oneOf": [ { "$ref": "#/components/schemas/WebchatManagerWidgetThemeConfig" } ] } } } } }, "ErrorBody": { "type": "object", "required": [ "status", "reason", "message", "request_id" ], "properties": { "status": { "type": "string", "enum": [ "INVALID_ARGUMENT", "UNAUTHENTICATED", "PAYMENT_REQUIRED", "PERMISSION_DENIED", "NOT_FOUND", "ALREADY_EXISTS", "FAILED_PRECONDITION", "RESOURCE_EXHAUSTED", "UNAVAILABLE", "INTERNAL" ], "description": "Canonical error status. Maps 1:1 to HTTP status code." }, "reason": { "type": "string", "description": "Specific VoIPbin reason code in UPPER_SNAKE (open-ended).", "example": "CALL_NOT_FOUND" }, "message": { "type": "string", "description": "Human-readable message for debugging." }, "request_id": { "type": "string", "description": "Request correlation ID. Include in support tickets.", "example": "req_ABCDEF0123456789" }, "details": { "type": "array", "items": { "type": "object", "additionalProperties": true }, "description": "Reserved for future per-field or structured error detail. May be omitted." } } }, "ErrorResponse": { "type": "object", "required": [ "error" ], "properties": { "error": { "$ref": "#/components/schemas/ErrorBody" } } } }, "responses": { "BadRequest": { "description": "Invalid request (INVALID_ARGUMENT).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "Unauthenticated": { "description": "Authentication required (UNAUTHENTICATED).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "PaymentRequired": { "description": "Payment required (PAYMENT_REQUIRED).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "PermissionDenied": { "description": "Insufficient permission (PERMISSION_DENIED).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "NotFound": { "description": "Resource not found (NOT_FOUND).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "Conflict": { "description": "State conflict (ALREADY_EXISTS or FAILED_PRECONDITION).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "TooManyRequests": { "description": "Rate or quota exceeded (RESOURCE_EXHAUSTED).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "Unavailable": { "description": "Upstream unavailable (UNAVAILABLE).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "InternalError": { "description": "Internal error (INTERNAL).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }