diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index b02b48e58..9681e7eb9 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -269,7 +269,7 @@ } }, "409": { - "description": "Vapi Agents manages the assistant (see AssistantManagedConflictResponseDTO). Other 409s on this route carry a plain message instead.", + "description": "Vapi for CX manages the assistant (see AssistantManagedConflictResponseDTO). Other 409s on this route carry a plain message instead.", "content": { "application/json": { "schema": { @@ -315,7 +315,7 @@ } }, "409": { - "description": "One of its versions is pinned (see AssistantPinnedConflictResponseDTO), or Vapi Agents manages the assistant (see AssistantManagedConflictResponseDTO).", + "description": "One of its versions is pinned (see AssistantPinnedConflictResponseDTO), or Vapi for CX manages the assistant (see AssistantManagedConflictResponseDTO).", "content": { "application/json": { "schema": { @@ -2961,7 +2961,7 @@ "description": "The source assistant does not exist." }, "409": { - "description": "The provided expectedCurrentAllocationId no longer matches the allocation currently in effect (see TrafficAllocationStaleConflictResponseDTO; omitting the field never conflicts), or Vapi Agents manages the assistant (see AssistantManagedConflictResponseDTO).", + "description": "The provided expectedCurrentAllocationId no longer matches the allocation currently in effect (see TrafficAllocationStaleConflictResponseDTO; omitting the field never conflicts), or Vapi for CX manages the assistant (see AssistantManagedConflictResponseDTO).", "content": { "application/json": { "schema": { @@ -3114,6 +3114,94 @@ ] } }, + "/traffic-allocations/metrics": { + "get": { + "operationId": "TrafficAllocationController_metricsGet", + "x-fern-availability": "beta", + "summary": "Get traffic split metrics", + "description": "Per-assistant-version call metrics over a time window: call counts, configured vs actual traffic share, duration, cost per minute, latency, ended reasons, a bucketed timeseries, and optional structured output aggregations. Calls with no assistant version are reported as an 'unversioned' row. Traffic splitting is in beta, rolling out to select organizations; requests from organizations without access receive a 403.", + "parameters": [ + { + "name": "assistantId", + "required": true, + "in": "query", + "description": "The assistant whose per-version traffic metrics to return.", + "schema": { + "type": "string" + } + }, + { + "name": "from", + "required": true, + "in": "query", + "description": "Start of the metrics window (inclusive), ISO 8601 datetime.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "to", + "required": true, + "in": "query", + "description": "End of the metrics window (exclusive), ISO 8601 datetime. Must be later than from, and the window may hold at most 2000 buckets of the requested width.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "bucket", + "required": false, + "in": "query", + "description": "Bucket size for the timeseries. Defaults to 'day'.", + "schema": { + "enum": [ + "hour", + "day" + ], + "type": "string" + } + }, + { + "name": "structuredOutputIds", + "required": false, + "in": "query", + "description": "Structured output ids to aggregate per version, as an array or a comma-separated string. At most 5.", + "schema": { + "maxItems": 5, + "type": "array" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TrafficTabMetricsDTO" + } + } + } + }, + "400": { + "description": "assistantId is missing or not a UUID, from/to are missing, malformed, or inverted, the window spans more than 2000 buckets, or structuredOutputIds has more than 5 entries or a non-UUID entry." + }, + "403": { + "description": "Traffic splitting is not enabled for your organization. The feature is in beta, rolling out to select organizations." + } + }, + "tags": [ + "Traffic Allocations" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, "/traffic-allocations/{id}": { "get": { "operationId": "TrafficAllocationController_findOne", @@ -5808,7 +5896,7 @@ } }, "409": { - "description": "The write links or unlinks an assistant managed by Vapi Agents, which would rewrite its artifact plan.", + "description": "The write links or unlinks an assistant managed by Vapi for CX, which would rewrite its artifact plan.", "content": { "application/json": { "schema": { @@ -5910,7 +5998,7 @@ } }, "409": { - "description": "The write links or unlinks an assistant managed by Vapi Agents, which would rewrite its artifact plan.", + "description": "The write links or unlinks an assistant managed by Vapi for CX, which would rewrite its artifact plan.", "content": { "application/json": { "schema": { @@ -5956,7 +6044,7 @@ } }, "409": { - "description": "The write links or unlinks an assistant managed by Vapi Agents, which would rewrite its artifact plan.", + "description": "The write links or unlinks an assistant managed by Vapi for CX, which would rewrite its artifact plan.", "content": { "application/json": { "schema": { @@ -6783,6 +6871,21 @@ "operationId": "SimulationRunController_findAll", "summary": "List Simulation Runs", "parameters": [ + { + "name": "suiteId", + "required": false, + "in": "query", + "description": "Filter by simulation suite ids", + "schema": { + "maxItems": 100, + "uniqueItems": true, + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, { "name": "status", "required": false, @@ -7256,10 +7359,17 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SimulationRunItem" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulationRunItem" + } + }, + { + "$ref": "#/components/schemas/SimulationRunItemsPaginatedResponse" + } + ] } } } @@ -7457,7 +7567,38 @@ "get": { "operationId": "SimulationSuiteController_findAll", "summary": "List Simulation Suites", + "description": "Returns a pagination envelope when page, limit, name, assistantId, or squadId is supplied; otherwise returns the legacy array.", "parameters": [ + { + "name": "assistantId", + "required": false, + "in": "query", + "description": "Filter by any assigned assistant ID. Supplying both assistant and squad filters requires both to match.", + "schema": { + "maxItems": 100, + "uniqueItems": true, + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "squadId", + "required": false, + "in": "query", + "description": "Filter by any assigned squad ID. Supplying both assistant and squad filters requires both to match.", + "schema": { + "maxItems": 100, + "uniqueItems": true, + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, { "name": "name", "required": false, @@ -7602,10 +7743,17 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SimulationSuite" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulationSuite" + } + }, + { + "$ref": "#/components/schemas/SimulationSuitesPaginatedResponse" + } + ] } } } @@ -10666,15 +10814,15 @@ "agentId": { "type": "string", "format": "uuid", - "description": "The Vapi Agents agent that manages the assistant." + "description": "The Vapi for CX agent that manages the assistant." }, "agentUrl": { "type": "string", - "description": "The agent's page in Vapi Agents." + "description": "The agent's page in Vapi for CX." }, "mcpUrl": { "type": "string", - "description": "The Vapi Agents MCP server, where an AI client makes the change instead." + "description": "The Vapi for CX MCP server, where an AI client makes the change instead." } }, "required": [ @@ -10691,11 +10839,11 @@ "enum": [ "assistant_managed_by_vapi_agents" ], - "description": "Vapi Agents manages the assistant. The lock refuses writes to the assistant itself (update, replace, delete, restore, version delete, traffic splits) and to outcomes, monitors and structured outputs that link or unlink it. It doesn't cover what changes a call without writing the assistant: call-level assistantOverrides or assistantVersion, squad member pins and overrides, which phone number points at it, edits to the tools or knowledge bases it references, or Vapi's own model-retirement sweep." + "description": "Vapi for CX manages the assistant. The lock refuses writes to the assistant itself (update, replace, delete, restore, version delete, traffic splits) and to outcomes, monitors and structured outputs that link or unlink it. It doesn't cover what changes a call without writing the assistant: call-level assistantOverrides or assistantVersion, squad member pins and overrides, which phone number points at it, edits to the tools or knowledge bases it references, or Vapi's own model-retirement sweep." }, "message": { "type": "string", - "description": "Why the write was rejected and how to make the change in Vapi Agents instead: the agent link, the Vapi Agents MCP URL with the steps to connect it, and which of its tools to call." + "description": "Why the write was rejected and how to make the change in Vapi for CX instead: the agent link, the Vapi for CX MCP URL with the steps to connect it, and which of its tools to call." }, "vapiAgents": { "$ref": "#/components/schemas/AssistantManagedVapiAgentsDTO" @@ -13288,10 +13436,11 @@ }, "model": { "type": "string", - "description": "This is the model that will be used for the transcription.", + "description": "This is the model that will be used for the transcription.\nDigit formatting can differ by model: `gpt-transcribe` may write spoken digit strings as words (for example, \"four seven two\"), where `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` may write them as digits (\"472\"). Do not rely on either format.", "enum": [ "gpt-4o-transcribe", - "gpt-4o-mini-transcribe" + "gpt-4o-mini-transcribe", + "gpt-transcribe" ] }, "language": { @@ -13357,6 +13506,20 @@ "cy" ] }, + "keywords": { + "description": "These are words and phrases the model should recognize, such as names, brands, and product terms.\nSupported only by `gpt-transcribe`. Each keyword is one line and must not contain `<` or `>`. Maximum 16,384 keywords.", + "maxItems": 16384, + "type": "array", + "items": { + "type": "string", + "pattern": "^(?=[^<>\\r\\n]*[^<>\\s])[^<>\\r\\n]*$" + } + }, + "prompt": { + "type": "string", + "description": "This is free-text context for the transcription, such as the topic of the call or the expected vocabulary.\nMaximum length: 8,192 characters for `gpt-transcribe`, and 1,024 characters for `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`.", + "maxLength": 8192 + }, "fallbackPlan": { "description": "This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", "allOf": [ @@ -16333,10 +16496,11 @@ }, "model": { "type": "string", - "description": "This is the model that will be used for the transcription.", + "description": "This is the model that will be used for the transcription.\nDigit formatting can differ by model: `gpt-transcribe` may write spoken digit strings as words (for example, \"four seven two\"), where `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` may write them as digits (\"472\"). Do not rely on either format.", "enum": [ "gpt-4o-transcribe", - "gpt-4o-mini-transcribe" + "gpt-4o-mini-transcribe", + "gpt-transcribe" ] }, "language": { @@ -16401,6 +16565,20 @@ "vi", "cy" ] + }, + "keywords": { + "description": "These are words and phrases the model should recognize, such as names, brands, and product terms.\nSupported only by `gpt-transcribe`. Each keyword is one line and must not contain `<` or `>`. Maximum 16,384 keywords.", + "maxItems": 16384, + "type": "array", + "items": { + "type": "string", + "pattern": "^(?=[^<>\\r\\n]*[^<>\\s])[^<>\\r\\n]*$" + } + }, + "prompt": { + "type": "string", + "description": "This is free-text context for the transcription, such as the topic of the call or the expected vocabulary.\nMaximum length: 8,192 characters for `gpt-transcribe`, and 1,024 characters for `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`.", + "maxLength": 8192 } }, "required": [ @@ -27801,7 +27979,7 @@ "sonic-preview", "sonic" ], - "example": "sonic-english" + "example": "sonic-3.5" }, "language": { "type": "string", @@ -28203,45 +28381,45 @@ }, "similarityBoost": { "type": "number", - "description": "Defines the similarity boost for voice settings. Ignored by `eleven_v4_turbo`.", + "description": "Defines the similarity boost for voice settings. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.", "minimum": 0, "maximum": 1, "example": 0.75 }, "style": { "type": "number", - "description": "Defines the style for voice settings. Ignored by `eleven_v4_turbo`.", + "description": "Defines the style for voice settings. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.", "minimum": 0, "maximum": 1, "example": 0 }, "useSpeakerBoost": { "type": "boolean", - "description": "Defines the use speaker boost for voice settings. Ignored by `eleven_v4_turbo`.", + "description": "Defines the use speaker boost for voice settings. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.", "example": false }, "speed": { "type": "number", - "description": "Defines the speed for voice settings. Ignored by `eleven_v4_turbo`.", + "description": "Defines the speed for voice settings. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.", "minimum": 0.7, "maximum": 1.2, "example": 0.9 }, "optimizeStreamingLatency": { "type": "number", - "description": "Defines the optimize streaming latency for voice settings. Defaults to 3. Ignored by `eleven_v4_turbo`.", + "description": "Defines the optimize streaming latency for voice settings. Defaults to 3. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.", "minimum": 0, "maximum": 4, "example": 3 }, "enableSsmlParsing": { "type": "boolean", - "description": "This enables the use of https://elevenlabs.io/docs/speech-synthesis/prompting#pronunciation. Defaults to false to save latency. Ignored by `eleven_v4_turbo`.\n\n@default false", + "description": "This enables the use of https://elevenlabs.io/docs/speech-synthesis/prompting#pronunciation. Defaults to false to save latency. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.\n\n@default false", "example": false }, "autoMode": { "type": "boolean", - "description": "Defines the auto mode for voice settings. Defaults to false. Ignored by `eleven_v4_turbo`.", + "description": "Defines the auto mode for voice settings. Defaults to false. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.", "example": false }, "model": { @@ -28255,13 +28433,14 @@ "eleven_flash_v2_5", "eleven_monolingual_v1", "eleven_v3", - "eleven_v4_turbo" + "eleven_v4_turbo", + "eleven_v3_conversational" ], "example": "eleven_turbo_v2_5" }, "language": { "type": "string", - "description": "This is the language (ISO 639-1) that is enforced for the model. Currently only Turbo v2.5, Flash v2.5 and v4 Turbo support language enforcement; other models ignore it." + "description": "This is the language (ISO 639-1) that is enforced for the model. Currently only Turbo v2.5, Flash v2.5 and the Text to Dialogue models support language enforcement; other models ignore it." }, "chunkPlan": { "description": "This is the plan for chunking the model output before it is sent to the voice provider.", @@ -30693,7 +30872,7 @@ "sonic-preview", "sonic" ], - "example": "sonic-english" + "example": "sonic-3.5" }, "language": { "type": "string", @@ -31053,45 +31232,45 @@ }, "similarityBoost": { "type": "number", - "description": "Defines the similarity boost for voice settings. Ignored by `eleven_v4_turbo`.", + "description": "Defines the similarity boost for voice settings. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.", "minimum": 0, "maximum": 1, "example": 0.75 }, "style": { "type": "number", - "description": "Defines the style for voice settings. Ignored by `eleven_v4_turbo`.", + "description": "Defines the style for voice settings. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.", "minimum": 0, "maximum": 1, "example": 0 }, "useSpeakerBoost": { "type": "boolean", - "description": "Defines the use speaker boost for voice settings. Ignored by `eleven_v4_turbo`.", + "description": "Defines the use speaker boost for voice settings. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.", "example": false }, "speed": { "type": "number", - "description": "Defines the speed for voice settings. Ignored by `eleven_v4_turbo`.", + "description": "Defines the speed for voice settings. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.", "minimum": 0.7, "maximum": 1.2, "example": 0.9 }, "optimizeStreamingLatency": { "type": "number", - "description": "Defines the optimize streaming latency for voice settings. Defaults to 3. Ignored by `eleven_v4_turbo`.", + "description": "Defines the optimize streaming latency for voice settings. Defaults to 3. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.", "minimum": 0, "maximum": 4, "example": 3 }, "enableSsmlParsing": { "type": "boolean", - "description": "This enables the use of https://elevenlabs.io/docs/speech-synthesis/prompting#pronunciation. Defaults to false to save latency. Ignored by `eleven_v4_turbo`.\n\n@default false", + "description": "This enables the use of https://elevenlabs.io/docs/speech-synthesis/prompting#pronunciation. Defaults to false to save latency. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.\n\n@default false", "example": false }, "autoMode": { "type": "boolean", - "description": "Defines the auto mode for voice settings. Defaults to false. Ignored by `eleven_v4_turbo`.", + "description": "Defines the auto mode for voice settings. Defaults to false. Ignored by `eleven_v4_turbo` and `eleven_v3_conversational`.", "example": false }, "model": { @@ -31105,13 +31284,14 @@ "eleven_flash_v2_5", "eleven_monolingual_v1", "eleven_v3", - "eleven_v4_turbo" + "eleven_v4_turbo", + "eleven_v3_conversational" ], "example": "eleven_turbo_v2_5" }, "language": { "type": "string", - "description": "This is the language (ISO 639-1) that is enforced for the model. Currently only Turbo v2.5, Flash v2.5 and v4 Turbo support language enforcement; other models ignore it." + "description": "This is the language (ISO 639-1) that is enforced for the model. Currently only Turbo v2.5, Flash v2.5 and the Text to Dialogue models support language enforcement; other models ignore it." }, "pronunciationDictionaryLocators": { "description": "This is the pronunciation dictionary locators to use.", @@ -47242,6 +47422,7 @@ "pipeline-error-eleven-labs-voice-not-allowed-for-free-users", "pipeline-error-eleven-labs-max-character-limit-exceeded", "pipeline-error-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + "pipeline-error-eleven-labs-unsupported-model", "pipeline-error-eleven-labs-500-server-error", "pipeline-error-eleven-labs-503-server-error", "call.in-progress.error-vapifault-eleven-labs-voice-not-found", @@ -47264,6 +47445,7 @@ "call.in-progress.error-vapifault-eleven-labs-voice-not-allowed-for-free-users", "call.in-progress.error-vapifault-eleven-labs-max-character-limit-exceeded", "call.in-progress.error-vapifault-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + "call.in-progress.error-vapifault-eleven-labs-unsupported-model", "call.in-progress.error-providerfault-eleven-labs-system-busy-and-requested-upgrade", "call.in-progress.error-providerfault-eleven-labs-blocked-concurrent-requests-and-requested-upgrade", "call.in-progress.error-providerfault-eleven-labs-voice-disabled-by-owner", @@ -51832,6 +52014,394 @@ "message" ] }, + "GetTrafficTabMetricsDTO": { + "type": "object", + "properties": { + "assistantId": { + "type": "string", + "description": "The assistant whose per-version traffic metrics to return." + }, + "from": { + "format": "date-time", + "type": "string", + "description": "Start of the metrics window (inclusive), ISO 8601 datetime." + }, + "to": { + "format": "date-time", + "type": "string", + "description": "End of the metrics window (exclusive), ISO 8601 datetime. Must be later than from, and the window may hold at most 2000 buckets of the requested width." + }, + "bucket": { + "type": "string", + "enum": [ + "hour", + "day" + ], + "description": "Bucket size for the timeseries. Defaults to 'day'." + }, + "structuredOutputIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "maxItems": 5, + "description": "Structured output ids to aggregate per version, as an array or a comma-separated string. At most 5." + } + }, + "required": [ + "assistantId", + "from", + "to" + ] + }, + "TrafficTabMetricsWindowDTO": { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "Start of the window (inclusive), ISO 8601." + }, + "to": { + "type": "string", + "description": "End of the window (exclusive), ISO 8601." + }, + "bucket": { + "type": "string", + "enum": [ + "hour", + "day" + ] + } + }, + "required": [ + "from", + "to", + "bucket" + ] + }, + "TrafficTabDurationSecondsDTO": { + "type": "object", + "properties": { + "mean": { + "type": "number", + "nullable": true + }, + "stddev": { + "type": "number", + "nullable": true + }, + "p50": { + "type": "number", + "nullable": true + }, + "p95": { + "type": "number", + "nullable": true + } + } + }, + "TrafficTabCostBreakdownPerMinuteDTO": { + "type": "object", + "properties": { + "llm": { + "type": "number", + "nullable": true + }, + "stt": { + "type": "number", + "nullable": true + }, + "tts": { + "type": "number", + "nullable": true + }, + "vapi": { + "type": "number", + "nullable": true + }, + "transport": { + "type": "number", + "nullable": true + } + } + }, + "TrafficTabCostPerMinuteDTO": { + "type": "object", + "properties": { + "mean": { + "type": "number", + "nullable": true + }, + "breakdown": { + "$ref": "#/components/schemas/TrafficTabCostBreakdownPerMinuteDTO" + } + }, + "required": [ + "breakdown" + ] + }, + "TrafficTabLatencyStatsDTO": { + "type": "object", + "properties": { + "mean": { + "type": "number", + "nullable": true + }, + "p50": { + "type": "number", + "nullable": true + }, + "p95": { + "type": "number", + "nullable": true + } + } + }, + "TrafficTabLatencyMsDTO": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/TrafficTabLatencyStatsDTO" + }, + "voice": { + "$ref": "#/components/schemas/TrafficTabLatencyStatsDTO" + }, + "transcriber": { + "$ref": "#/components/schemas/TrafficTabLatencyStatsDTO" + }, + "turn": { + "$ref": "#/components/schemas/TrafficTabLatencyStatsDTO" + } + }, + "required": [ + "model", + "voice", + "transcriber", + "turn" + ] + }, + "TrafficTabEndedReasonCountDTO": { + "type": "object", + "properties": { + "reason": { + "type": "string" + }, + "count": { + "type": "number" + } + }, + "required": [ + "reason", + "count" + ] + }, + "TrafficTabTimeseriesPointDTO": { + "type": "object", + "properties": { + "bucketStart": { + "type": "string", + "description": "Start of the bucket, ISO 8601 (UTC)." + }, + "calls": { + "type": "number" + }, + "durationSecondsMean": { + "type": "number", + "nullable": true + }, + "costPerMinuteMean": { + "type": "number", + "nullable": true + }, + "turnLatencyMsMean": { + "type": "number", + "nullable": true + } + }, + "required": [ + "bucketStart", + "calls" + ] + }, + "TrafficTabStructuredOutputNumericDTO": { + "type": "object", + "properties": { + "mean": { + "type": "number", + "nullable": true + }, + "stddev": { + "type": "number", + "nullable": true + }, + "p50": { + "type": "number", + "nullable": true + }, + "p95": { + "type": "number", + "nullable": true + }, + "sum": { + "type": "number", + "nullable": true + } + } + }, + "TrafficTabStructuredOutputValueCountDTO": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "count": { + "type": "number" + } + }, + "required": [ + "value", + "count" + ] + }, + "TrafficTabStructuredOutputDTO": { + "type": "object", + "properties": { + "structuredOutputId": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "number", + "string", + "boolean", + "unknown" + ] + }, + "present": { + "type": "number", + "description": "Calls in the window where this output produced a result." + }, + "numeric": { + "$ref": "#/components/schemas/TrafficTabStructuredOutputNumericDTO" + }, + "valueCounts": { + "description": "Top 10 values by count, for string/boolean outputs.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TrafficTabStructuredOutputValueCountDTO" + } + } + }, + "required": [ + "structuredOutputId", + "type", + "present" + ] + }, + "TrafficTabVersionMetricsDTO": { + "type": "object", + "properties": { + "assistantVersionId": { + "type": "string", + "nullable": true, + "format": "uuid" + }, + "assistantVersionLabel": { + "type": "string", + "nullable": true, + "description": "The published version label, such as \"v7\". Null when no version row resolves (unversioned calls, or a since-purged version)." + }, + "unversioned": { + "type": "boolean", + "description": "True for the row aggregating calls with no assistant version (stored as SQL NULL)." + }, + "calls": { + "type": "number" + }, + "configuredPercentage": { + "type": "number", + "nullable": true, + "description": "The version's share in the currently-governing allocation. Null when the version is not in the current split — never rendered as 0%." + }, + "actualPercentage": { + "type": "number", + "description": "calls / totalCalls * 100 over the window, rounded to 3 decimals." + }, + "durationSeconds": { + "$ref": "#/components/schemas/TrafficTabDurationSecondsDTO" + }, + "costPerMinute": { + "$ref": "#/components/schemas/TrafficTabCostPerMinuteDTO" + }, + "latencyMs": { + "$ref": "#/components/schemas/TrafficTabLatencyMsDTO" + }, + "endedReasons": { + "description": "Full per-reason counts; the UI unions and top-Ns.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TrafficTabEndedReasonCountDTO" + } + }, + "timeseries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrafficTabTimeseriesPointDTO" + } + }, + "structuredOutputs": { + "description": "Present only when structuredOutputIds was given.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TrafficTabStructuredOutputDTO" + } + } + }, + "required": [ + "calls", + "actualPercentage", + "durationSeconds", + "costPerMinute", + "latencyMs", + "endedReasons", + "timeseries" + ] + }, + "TrafficTabMetricsDTO": { + "type": "object", + "properties": { + "window": { + "$ref": "#/components/schemas/TrafficTabMetricsWindowDTO" + }, + "totalCalls": { + "type": "number", + "description": "All calls for the assistant in the window, every version." + }, + "currentAllocation": { + "nullable": true, + "description": "The allocation currently governing the assistant. Null when traffic splitting was never configured.", + "allOf": [ + { + "$ref": "#/components/schemas/TrafficAllocation" + } + ] + }, + "versions": { + "description": "One row per version with calls in the window, plus the unversioned row when it has any. Ordered by calls descending, then by version label (numeric-aware), the unversioned row last among equals.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TrafficTabVersionMetricsDTO" + } + } + }, + "required": [ + "window", + "totalCalls", + "versions" + ] + }, "ByoPhoneNumber": { "type": "object", "properties": { @@ -62767,6 +63337,24 @@ "updatedAt" ] }, + "SimulationRunItemsPaginatedResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulationRunItem" + } + }, + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" + } + }, + "required": [ + "results", + "metadata" + ] + }, "SimulationSuiteTargetAssignment": { "type": "object", "properties": { @@ -62894,6 +63482,24 @@ "targetAssignments" ] }, + "SimulationSuitesPaginatedResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulationSuite" + } + }, + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" + } + }, + "required": [ + "results", + "metadata" + ] + }, "UpdateSimulationSuiteDTO": { "type": "object", "properties": { @@ -62994,6 +63600,502 @@ "coverageNotes" ] }, + "SimulationOnboardingErrorDTO": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Which refusal this is. Retry `SIMULATION_ONBOARDING_GENERATION_IN_PROGRESS` with the same key and `SIMULATION_ONBOARDING_CONCURRENCY_LIMITED` or `SIMULATION_ONBOARDING_QUOTA_UNAVAILABLE` after `retryAfterSeconds`, send a new key for `SIMULATION_ONBOARDING_IDEMPOTENCY_KEY_REUSED`, and stop for `SIMULATION_ONBOARDING_QUOTA_EXCEEDED`.", + "enum": [ + "SIMULATION_ONBOARDING_GENERATION_IN_PROGRESS", + "SIMULATION_ONBOARDING_IDEMPOTENCY_KEY_REUSED", + "SIMULATION_ONBOARDING_CONCURRENCY_LIMITED", + "SIMULATION_ONBOARDING_QUOTA_EXCEEDED", + "SIMULATION_ONBOARDING_QUOTA_UNAVAILABLE" + ] + }, + "message": { + "type": "string", + "description": "What happened, written for the user." + }, + "retryAfterSeconds": { + "type": "number", + "description": "Seconds to wait before retrying, the same value as the `Retry-After` header. For a daily limit, the seconds until 00:00 UTC." + }, + "limit": { + "type": "number", + "description": "The daily limit that was reached, on a daily-limit refusal only." + } + }, + "required": [ + "code", + "message" + ] + }, + "SimulationOnboardingRequirementDTO": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stable requirement id, e.g. `R3`." + }, + "text": { + "type": "string", + "description": "One observable behaviour the assistant must get right.", + "maxLength": 1000 + }, + "tag": { + "type": "string", + "description": "Why this requirement needs the user's attention, when it does.", + "enum": [ + "assumption", + "not-testable", + "voice-only" + ] + }, + "note": { + "type": "string", + "description": "What was assumed, why only a voice run can check it, or why it cannot be tested.", + "maxLength": 1000 + } + }, + "required": [ + "id", + "text" + ] + }, + "SimulationOnboardingOpenQuestionDTO": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Question id within its draft, e.g. `Q1`." + }, + "text": { + "type": "string", + "description": "The question to ask your user.", + "maxLength": 1000 + }, + "why": { + "type": "string", + "description": "Which requirement the answer changes, and how.", + "maxLength": 1000 + } + }, + "required": [ + "id", + "text", + "why" + ] + }, + "SimulationOnboardingRequirementsDraftDTO": { + "type": "object", + "properties": { + "version": { + "type": "number", + "description": "Draft version, 1 for a first draft.", + "minimum": 1 + }, + "changeNote": { + "type": "string", + "description": "What changed since the previous draft.", + "maxLength": 1000 + }, + "sources": { + "description": "What the draft was based on, e.g. the prompt and tools.", + "maxItems": 10, + "type": "array", + "items": { + "type": "string" + } + }, + "requirements": { + "description": "The requirements, for your user to review.", + "maxItems": 50, + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulationOnboardingRequirementDTO" + } + }, + "openQuestions": { + "description": "Questions to ask your user before they agree.", + "maxItems": 3, + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulationOnboardingOpenQuestionDTO" + } + } + }, + "required": [ + "version", + "sources", + "requirements", + "openQuestions" + ] + }, + "SimulationOnboardingRequirementsCreateDTO": { + "type": "object", + "properties": { + "assistantId": { + "type": "string", + "description": "Assistant to draft requirements for.", + "format": "uuid" + }, + "previousDraft": { + "description": "The draft being revised, exactly as this endpoint returned it. Send it with `feedback`.", + "allOf": [ + { + "$ref": "#/components/schemas/SimulationOnboardingRequirementsDraftDTO" + } + ] + }, + "feedback": { + "type": "string", + "description": "What your user wants changed in `previousDraft`, in the user's own words. Send it with `previousDraft`.", + "maxLength": 8000 + } + }, + "required": [ + "assistantId" + ] + }, + "SimulationOnboardingSuiteCreateDTO": { + "type": "object", + "properties": { + "assistantId": { + "type": "string", + "description": "Assistant the suite tests and is assigned to.", + "format": "uuid" + }, + "idempotencyKey": { + "type": "string", + "description": "One key per agreed draft. Retrying with the same key returns the suite already saved, or a 409 while it is still generating, instead of generating another.", + "maxLength": 200, + "minLength": 1 + }, + "requirements": { + "description": "The requirements your user agreed to, from the requirements draft. Each id at most once.", + "maxItems": 50, + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulationOnboardingRequirementDTO" + } + } + }, + "required": [ + "assistantId", + "idempotencyKey", + "requirements" + ] + }, + "SimulationOnboardingSuiteRefDTO": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Suite id; pass it to edit or run the suite." + }, + "name": { + "type": "string", + "description": "Suite name." + } + }, + "required": [ + "id", + "name" + ] + }, + "SimulationOnboardingSuiteSimulationDTO": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Simulation id; pass it back to edit or remove the simulation." + }, + "scenarioId": { + "type": "string", + "description": "Scenario the simulation runs." + }, + "name": { + "type": "string", + "description": "Scenario name." + }, + "personalityName": { + "type": "string", + "description": "Name of the simulated caller's personality." + }, + "successCriteria": { + "description": "Each success criterion, as the yes/no question it is judged by.", + "type": "array", + "items": { + "type": "string" + } + }, + "requirementIds": { + "description": "Requirement ids this simulation covers, e.g. `R3`.", + "type": "array", + "items": { + "type": "string" + } + }, + "mockedTools": { + "description": "Tools the scenario mocks.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "scenarioId", + "name", + "successCriteria", + "requirementIds", + "mockedTools" + ] + }, + "SimulationOnboardingCoverageGapDTO": { + "type": "object", + "properties": { + "requirementId": { + "type": "string", + "description": "Requirement the gap is for, e.g. `R4`." + }, + "reason": { + "type": "string", + "description": "Why no simulation covers it. `failed` and `budget` gaps are regenerated by an edit with `retryFailed`.", + "enum": [ + "not-testable", + "unmapped", + "failed", + "budget" + ] + }, + "detail": { + "type": "string", + "description": "A short explanation for the user." + } + }, + "required": [ + "requirementId", + "reason" + ] + }, + "SimulationOnboardingSuiteCoverageDTO": { + "type": "object", + "properties": { + "covered": { + "type": "number", + "description": "Requirements at least one simulation covers." + }, + "total": { + "type": "number", + "description": "Requirements in the agreed draft." + }, + "gaps": { + "description": "Requirements no simulation covers, and why.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulationOnboardingCoverageGapDTO" + } + }, + "retryable": { + "type": "number", + "description": "Planned scenarios an edit with `retryFailed` would regenerate." + } + }, + "required": [ + "covered", + "total", + "gaps", + "retryable" + ] + }, + "SimulationOnboardingSuiteDocsDTO": { + "type": "object", + "properties": { + "bestPractices": { + "type": "string", + "description": "Link to testing best practices." + }, + "toolMocks": { + "type": "string", + "description": "Link explaining why tools are mocked by default." + } + }, + "required": [ + "bestPractices", + "toolMocks" + ] + }, + "SimulationOnboardingToolGapDTO": { + "type": "object", + "properties": { + "toolName": { + "type": "string", + "description": "Function name of the tool, e.g. `handoff_to_group_1` or `transferCall`." + }, + "assistantName": { + "type": "string", + "description": "Assistant the tool belongs to, when it is a handoff destination's tool. Unset for the assistant's own tools." + }, + "reason": { + "type": "string", + "description": "Why the path is not exercised: a reason the simulations mock the tool, or why a native path is never reached. New reasons may be added.", + "enum": [ + "dynamic-handoff", + "destination-not-plain", + "destination-unresolved", + "destination-truncated", + "transfer-external", + "destination-name-unscoped", + "native-tool-shadowed" + ] + }, + "destinationNames": { + "description": "Static destinations the simulations do not reach through this tool.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "toolName", + "reason" + ] + }, + "SimulationOnboardingSuiteViewDTO": { + "type": "object", + "properties": { + "suite": { + "description": "The suite.", + "allOf": [ + { + "$ref": "#/components/schemas/SimulationOnboardingSuiteRefDTO" + } + ] + }, + "assistantId": { + "type": "string", + "description": "Assistant the suite is assigned to." + }, + "simulations": { + "description": "The suite's simulations, in order.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulationOnboardingSuiteSimulationDTO" + } + }, + "coverage": { + "description": "Coverage of the agreed requirements.", + "allOf": [ + { + "$ref": "#/components/schemas/SimulationOnboardingSuiteCoverageDTO" + } + ] + }, + "requirements": { + "description": "The agreed requirements the suite was generated from, to name the gaps.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulationOnboardingRequirementDTO" + } + }, + "docs": { + "description": "Documentation to link when you summarize the suite.", + "allOf": [ + { + "$ref": "#/components/schemas/SimulationOnboardingSuiteDocsDTO" + } + ] + }, + "reused": { + "type": "boolean", + "description": "True when the request matched one already applied (same `idempotencyKey` or `patchKey`) and nothing changed." + }, + "failedEditSimulationIds": { + "description": "Simulations an edit asked to rewrite that were not rewritten, for example because the rewrite did not generate in time. Retry them with a new `patchKey`.", + "type": "array", + "items": { + "type": "string" + } + }, + "toolGaps": { + "description": "Tool paths the suite's simulations do not exercise as configured, such as a tool mocked although it runs natively. Omitted when there are none.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulationOnboardingToolGapDTO" + } + } + }, + "required": [ + "suite", + "assistantId", + "simulations", + "coverage", + "requirements", + "docs", + "reused" + ] + }, + "SimulationOnboardingSuiteEditDTO": { + "type": "object", + "properties": { + "simulationId": { + "type": "string", + "description": "Simulation in the suite whose scenario is rewritten.", + "format": "uuid" + }, + "instruction": { + "type": "string", + "description": "The user's requested change, in their own words.", + "maxLength": 8000 + } + }, + "required": [ + "simulationId", + "instruction" + ] + }, + "SimulationOnboardingSuiteUpdateDTO": { + "type": "object", + "properties": { + "patchKey": { + "type": "string", + "description": "A new key for each edit. Replaying an applied key changes nothing and returns the current suite. A suite remembers its last 50 keys, so never reuse one.", + "maxLength": 200, + "minLength": 1 + }, + "removeSimulationIds": { + "description": "Simulations to take out of the suite. They are unlinked, not deleted.", + "maxItems": 100, + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "edits": { + "description": "Simulations to rewrite in place, at most one edit per simulation: put every change for a simulation in one instruction.", + "maxItems": 10, + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulationOnboardingSuiteEditDTO" + } + }, + "retryFailed": { + "type": "boolean", + "description": "Regenerate the scenarios that failed or did not fit when the suite was generated." + } + }, + "required": [ + "patchKey" + ] + }, "CreateSimulationDTO": { "type": "object", "properties": { @@ -78149,6 +79251,7 @@ "pipeline-error-eleven-labs-voice-not-allowed-for-free-users", "pipeline-error-eleven-labs-max-character-limit-exceeded", "pipeline-error-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + "pipeline-error-eleven-labs-unsupported-model", "pipeline-error-eleven-labs-500-server-error", "pipeline-error-eleven-labs-503-server-error", "call.in-progress.error-vapifault-eleven-labs-voice-not-found", @@ -78171,6 +79274,7 @@ "call.in-progress.error-vapifault-eleven-labs-voice-not-allowed-for-free-users", "call.in-progress.error-vapifault-eleven-labs-max-character-limit-exceeded", "call.in-progress.error-vapifault-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + "call.in-progress.error-vapifault-eleven-labs-unsupported-model", "call.in-progress.error-providerfault-eleven-labs-system-busy-and-requested-upgrade", "call.in-progress.error-providerfault-eleven-labs-blocked-concurrent-requests-and-requested-upgrade", "call.in-progress.error-providerfault-eleven-labs-voice-disabled-by-owner", @@ -79608,6 +80712,7 @@ "pipeline-error-eleven-labs-voice-not-allowed-for-free-users", "pipeline-error-eleven-labs-max-character-limit-exceeded", "pipeline-error-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + "pipeline-error-eleven-labs-unsupported-model", "pipeline-error-eleven-labs-500-server-error", "pipeline-error-eleven-labs-503-server-error", "call.in-progress.error-vapifault-eleven-labs-voice-not-found", @@ -79630,6 +80735,7 @@ "call.in-progress.error-vapifault-eleven-labs-voice-not-allowed-for-free-users", "call.in-progress.error-vapifault-eleven-labs-max-character-limit-exceeded", "call.in-progress.error-vapifault-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + "call.in-progress.error-vapifault-eleven-labs-unsupported-model", "call.in-progress.error-providerfault-eleven-labs-system-busy-and-requested-upgrade", "call.in-progress.error-providerfault-eleven-labs-blocked-concurrent-requests-and-requested-upgrade", "call.in-progress.error-providerfault-eleven-labs-voice-disabled-by-owner",