{"items":[{"type":"link","label":"Voice API v2","link":"/docs/voice-2.0/api-reference/voice","routeSlug":"/docs/voice-2.0/api-reference/voice","content":{"contentType":"overview","meta":{"name":"Voice API v2"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"voice.json","url":"/_bundle/docs/voice-2.0/api-reference/voice.json?download"},{"kind":"download","label":"voice.yaml","url":"/_bundle/docs/voice-2.0/api-reference/voice.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"externallink","title":"URL","titleTranslationKey":"info.contact.url","label":"https://sinch.com/help-center/","url":"https://sinch.com/help-center/"},{"kind":"email","title":"Sinch Support","email":"support@sinch.com","label":"support@sinch.com","withCopyButton":true,"copyContent":"support@sinch.com"},{"kind":"externallink","title":"License","titleTranslationKey":"info.license","label":"Sinch License","url":"https://www.sinch.com/legal/"},{"kind":"externallink","label":"Terms of Service","labelTranslationKey":"info.termsOfService","url":"https://www.sinch.com/terms-of-service/"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Voice API v2 (2.0.58)","showPageActions":true},{"nodeType":"markdoc","content":"Make and receive voice calls with Sinch's RESTful Voice API interface."},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[]}],"sectionId":"/docs/voice-2.0/api-reference/voice"}],"sectionId":"/docs/voice-2.0/api-reference/voice"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":1,"id":"section/core-concepts"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Core Concepts"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The Voice API enables embedding voice calling into applications for virtually limitless use cases. From "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"number masking"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for privacy, automated "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"appointment reminders"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"outreach campaigns"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" with answering machine detection, to "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"bridging calls"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" between PSTN and SIP endpoints, the API offers the flexibility and control needed for modern communications."},"children":[]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/core-concepts/call-model"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call Model"},"children":[]}]}]},{"$$mdtype":"Node","type":"tag","tag":"table","attributes":{},"children":[{"$$mdtype":"Node","type":"table","attributes":{},"children":[{"$$mdtype":"Node","type":"thead","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Concept"},"children":[]}]}]},{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Description"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"tbody","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Session"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A session initiates as soon as the first call is created. It serves as a container for all related calls and their connections, maintaining context and state throughout the interaction. The session persists until all associated calls are terminated."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A single participant's connection in a session (e.g., caller or callee)."},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Inbound Call:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" A call initiated from an external source (PSTN, SIP, etc.) into the service."},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Outbound Call:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" A call initiated by the service to an external destination."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bridge"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A mechanism to connect one or more calls, so that participants can communicate with each other."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"image","inline":true,"attributes":{"alt":"session bridge chart","src":"/images/voicev2/voicev2-session-chart.png"},"children":[]}]}]}]}]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/call-model"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/call-model"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/core-concepts/initiating-calls"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Initiating Calls"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"There are a few ways to create a call:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Inbound Calls:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Triggered by incoming traffic from PSTN, SIP, or other sources."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Outbound Calls (via Dial):"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Initiated from within an existing call session using the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"dial"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" command."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Outbound Calls (via API):"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Created directly by sending an API request to the Voice API."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call Queuing:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Calls can be queued and processed based on parameters such as priority, time, or custom logic."},"children":[]}]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/initiating-calls"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/initiating-calls"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/core-concepts/call-pacing-(batch)"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call Pacing (Batch)"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The new Voice API v2 supports Call pacing via batch calling to efficiently manage high volumes of outbound calls. This is especially useful for scenarios like appointment reminders, notifications, or campaigns where customers need to reach multiple recipients in a controlled and scalable way."},"children":[]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/call-pacing-(batch)"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/call-pacing-(batch)"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":4,"id":"section/core-concepts/how-to-initiate-batch-calls"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"How To Initiate Batch Calls"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To initiate several calls in a batch, send a POST request to the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v2/projects/{projectId}/calls"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" endpoint. The request body contains a SVAML payload describing the call flow and a list of parameters for each call in the batch. The API queues and triggers calls according to the provided configuration, such as maximum calls per second ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"maxCps"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and time-to-live ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ttlSeconds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"commands\": [\n    {\n      \"command\": \"dial\",\n      \"callName\": \"batch-notification\",\n      \"from\": { \n        \"type\": \"PHONE\",\n        \"phone\": { \"number\": \"@from\" } \n      },\n      \"to\": { \n        \"type\": \"PHONE\",\n        \"phone\": { \"number\": \"@to\" } \n      },\n      \"events\": {\n        \"onAnswer\": [\n          {\n            \"command\": \"messages\",\n            \"messages\": [\n              {\n                \"type\": \"SAY\",\n                \"say\": {\n                  \"text\": \"Hello @name, you have an appointment tomorrow at 10 AM.\",\n                  \"voiceName\": \"Emma\"\n                }\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ],\n  \"parameters\": [\n    { \"from\": \"+46712345678\", \"to\": \"+46787654321\", \"name\": \"Alice\" },\n    { \"from\": \"+46712345678\", \"to\": \"+46781234567\", \"name\": \"Bob\" }\n  ],\n  \"batchOptions\": {\n    \"maxCps\": 10,\n    \"ttlSeconds\": 60\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"commands\": [\n    {\n      \"command\": \"dial\",\n      \"callName\": \"batch-notification\",\n      \"from\": { \n        \"type\": \"PHONE\",\n        \"phone\": { \"number\": \"@from\" } \n      },\n      \"to\": { \n        \"type\": \"PHONE\",\n        \"phone\": { \"number\": \"@to\" } \n      },\n      \"events\": {\n        \"onAnswer\": [\n          {\n            \"command\": \"messages\",\n            \"messages\": [\n              {\n                \"type\": \"SAY\",\n                \"say\": {\n                  \"text\": \"Hello @name, you have an appointment tomorrow at 10 AM.\",\n                  \"voiceName\": \"Emma\"\n                }\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ],\n  \"parameters\": [\n    { \"from\": \"+46712345678\", \"to\": \"+46787654321\", \"name\": \"Alice\" },\n    { \"from\": \"+46712345678\", \"to\": \"+46781234567\", \"name\": \"Bob\" }\n  ],\n  \"batchOptions\": {\n    \"maxCps\": 10,\n    \"ttlSeconds\": 60\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"commands:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" SVAML commands describing the call flow for each call in the batch. Parameter placeholders start with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"@"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and can be used as variables for each call. They can be used alone as in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"@from"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or in combination with text in a say message (e.g., "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Hello @name, your appointment is at @time"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"parameters:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" An array of objects, each specifying the values for the placeholders in the commands. Each object represents a call to be queued and triggered."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"batchOptions:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Controls how the batch is processed:"},"children":[]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"maxCps"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Maximum number of calls per second to be initiated."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ttlSeconds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Time-to-live for the batch in seconds; calls not initiated within this time window will be skipped."},"children":[]}]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The API responds with metadata for the queued calls:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"sessionIds:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Each call in the batch is assigned a unique sessionId, which can be used to track the state and progress of individual calls."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"batchId:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" The batchId identifies the entire batch operation, allowing batch state and summaries to be queried, or the batch to be managed as a whole (e.g., cancel unprocessed calls)."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Other properties:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" The response may also include other Ids, timestamps, and state related information."},"children":[]}]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/how-to-initiate-batch-calls"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/how-to-initiate-batch-calls"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":4,"id":"section/core-concepts/how-calls-are-triggered"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"How Calls Are Triggered"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When a batch request is submitted:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The API validates the SVAML commands and parameters."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Calls are queued and triggered according to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"maxCps"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ttlSeconds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" settings."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Each call is processed independently, using the provided parameters to personalize the call flow."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The API tracks the state of each call (e.g., "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"QUEUED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"INITIATED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"IN_PROGRESS"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"COMPLETED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Batch progress can be monitored and summaries can be retrieved via the [GET] "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v2/projects/{projectId}/batches/{batchId}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" endpoint."},"children":[]}]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/how-calls-are-triggered"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/how-calls-are-triggered"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/core-concepts/call-lifecycle"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call Lifecycle"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A call progresses through several states from creation to completion."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call States"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tag","tag":"table","attributes":{},"children":[{"$$mdtype":"Node","type":"table","attributes":{},"children":[{"$$mdtype":"Node","type":"thead","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"State"},"children":[]}]}]},{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Description"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"tbody","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"QUEUED"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call is waiting to be processed."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"INITIATED"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call setup is in progress (ringing)."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"IN_PROGRESS"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call is answered and active."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"COMPLETED"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call ended normally."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"REJECTED"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Recipient rejected the call."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"NO_ANSWER"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Recipient did not answer."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"CANCEL"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call was cancelled before being answered."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"BUSY"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Recipient was busy."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"FAILED"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call could not be set up."},"children":[]}]}]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call Transitions"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"image","inline":true,"attributes":{"alt":"transition states flowchart","src":"/images/voicev2/voicev2-transition-states.png"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This diagram shows how a call moves between states. Typically, most calls start at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"QUEUED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", progress to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"INITIATED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and either get answered ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"IN_PROGRESS"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") or end in a final state ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"COMPLETED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"NO_ANSWER"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", etc.)."},"children":[]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/call-lifecycle"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/call-lifecycle"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/core-concepts/handling-events-with-webhooks"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Handling Events with Webhooks"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When a specific event occurs (for example, a call is answered), the Voice API v2 sends an HTTP request (usually POST) to the webhook URL configured in service settings. The request contains details about the event, such as call identifiers and timestamps. The application can then respond with "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/voice-2.0/api-reference/svaml"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"SVAML commands"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to control the ongoing call or perform other actions."},"children":[]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/handling-events-with-webhooks"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/handling-events-with-webhooks"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/core-concepts/typical-request-response-cycle"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Typical Request-Response Cycle"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"An event (e.g., call.answered) occurs in the Voice API."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The API sends a POST request to the configured webhook endpoint with event details."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The server processes the event and responds with SVAML commands (e.g., play a message, gather input)."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The API executes the commands and updates the call state."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"sequenceDiagram\n  participant VoiceAPI as Voice API\n  participant Backend as Application Backend\n  VoiceAPI ->> Backend: POST webhook (event details)\n  Backend ->> VoiceAPI: SVAML commands (response)\n  VoiceAPI ->> Backend: Further webhooks (if needed)\n  Backend ->> VoiceAPI: Additional SVAML commands\n","language":"mermaid"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"sequenceDiagram\n  participant VoiceAPI as Voice API\n  participant Backend as Application Backend\n  VoiceAPI ->> Backend: POST webhook (event details)\n  Backend ->> VoiceAPI: SVAML commands (response)\n  VoiceAPI ->> Backend: Further webhooks (if needed)\n  Backend ->> VoiceAPI: Additional SVAML commands\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhook endpoints must respond within 5 seconds. If the endpoint fails or times out and a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fallbackUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is configured, the request is re-sent to the fallback URL. See "},"children":[]},{"$$mdtype":"Node","type":"em","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Timeouts and failover"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" in the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhooks"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" section for the algorithm and its effect on delivery guarantees."},"children":[]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/typical-request-response-cycle"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/typical-request-response-cycle"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/core-concepts/webhooks-vs.-events"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhooks vs. Events"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhooks:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" External HTTP notifications sent to the application when specific events occur."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Events:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Internal API notifications about call state changes; can be exposed via webhooks for external handling or internally by predefining event handlers in SVAML commands."},"children":[]}]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/webhooks-vs.-events"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/webhooks-vs.-events"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/core-concepts/event-naming-convention"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Event Naming Convention"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Events are named using the pattern "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"resource.command.event"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"For example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"call.answered"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Indicates that a call was answered."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"call.amd.machine"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Indicates that the Answering Machine Detection (AMD) on a call detected a machine."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This convention helps clearly identify the resource, the command involved, and the specific event that occurred."},"children":[]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/event-naming-convention"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/event-naming-convention"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":4,"id":"section/core-concepts/common-webhook-events"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Common Webhook Events"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"call.incoming"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Triggered when a call is received from PSTN, SIP, etc."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"call.answered"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Triggered when a call is answered."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"call.hangup"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Triggered when a call is hung up."},"children":[]}]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/common-webhook-events"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/common-webhook-events"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/core-concepts/precedence-rules"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Precedence Rules"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When handling events in call flows, the Voice API applies the following precedence rules to determine which SVAML commands are executed:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Command-Level Event Handlers:"},"children":[]}]},{"$$mdtype":"Node","type":"hardbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If an event handler (e.g., "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"on_answer"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"on_machine"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") is defined directly within a SVAML command, the commands specified in that handler are executed first for that event."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Service Configuration Fallback:"},"children":[]}]},{"$$mdtype":"Node","type":"hardbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If the event handler is not defined in the SVAML command, the API falls back to the event handler defined in the service configuration. This allows default behaviors for events to be set at the service level."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Execution Order:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Command-level event handlers always take priority over service-level handlers."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If neither is defined, the event is ignored and no commands are executed for that event."},"children":[]}]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Best Practice:"},"children":[]}]},{"$$mdtype":"Node","type":"hardbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Define event handlers in SVAML commands for custom, per-call logic. Use service configuration event handlers for default or global behaviors across all calls."},"children":[]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/precedence-rules"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/precedence-rules"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/core-concepts/webhook-request-example"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhook Request Example"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When a call is answered, the API sends a POST request to the configured webhook endpoint that includes the event type and the current call details."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The webhook endpoint should return a valid SVAML payload specifying which commands to execute on the call. For example, the response below synthesizes a welcome message and then ends the call."},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n  \"commands\": [\n    {\n      \"command\": \"messages\",\n      \"messages\": [\n        {\n          \"type\": \"SAY\",\n          \"say\": {\n            \"text\": \"Welcome to our service!\",\n            \"voiceName\": \"Emma\"\n          }\n        }\n      ],\n      \"events\": {\n        \"onFinish\": [\n          {\n            \"command\": \"hangup\"\n          }\n        ]\n      }\n    }\n  ]\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n  \"commands\": [\n    {\n      \"command\": \"messages\",\n      \"messages\": [\n        {\n          \"type\": \"SAY\",\n          \"say\": {\n            \"text\": \"Welcome to our service!\",\n            \"voiceName\": \"Emma\"\n          }\n        }\n      ],\n      \"events\": {\n        \"onFinish\": [\n          {\n            \"command\": \"hangup\"\n          }\n        ]\n      }\n    }\n  ]\n}\n"},"children":[]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/webhook-request-example"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/webhook-request-example"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/core-concepts/regions"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Regions"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The following table displays the servers available for each region."},"children":[]}]}]},{"$$mdtype":"Node","type":"table","attributes":{},"children":[{"$$mdtype":"Node","type":"thead","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Region"},"children":[]}]}]},{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Server"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"tbody","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Global endpoint - Redirected by Sinch to the closest region."},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://voice.api.sinch.com"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"North America 1 - East"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://us1.voice.api.sinch.com"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"South America 1 - East"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://br1.voice.api.sinch.com"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Europe 1 - Central"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://eu1.voice.api.sinch.com"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Asia Pacific 1 - Southeast"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://sg1.voice.api.sinch.com"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Australia & Oceania 1 - Southeast"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://au1.voice.api.sinch.com"},"children":[]}]}]}]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/regions"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/regions"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/core-concepts/best-practices"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Best Practices"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Respond Quickly:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Webhook requests should be processed and responded to as quickly as possible to avoid call delays."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Idempotency:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" A failed request is re-sent to the fallback URL, so the same event can arrive more than once. Make the handler idempotent and deduplicate on the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ce-id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ce-source"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" headers — see "},"children":[]},{"$$mdtype":"Node","type":"em","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Timeouts and failover"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" in the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhooks"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" section."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Logging:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Log incoming webhook requests and responses for troubleshooting and auditing."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validation:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Validate incoming requests to ensure they are from the Voice API (see Security below)."},"children":[]}]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/best-practices"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/best-practices"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/core-concepts/security"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Security"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To safeguard a webhook endpoint, verify that incoming requests are genuinely sent by the Voice API and have not been altered in transit. This prevents unauthorized access and mitigates risks such as man-in-the-middle attacks."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Each service has an identifier and a secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When a webhook arrives, use the secret to compute a signature over the canonical request string."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Compare the computed signature to the one in the request authorization header."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only process the webhook if the signatures match."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"For the exact "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header format, the canonical string that is signed, the signature algorithm and a worked example, see "},"children":[]},{"$$mdtype":"Node","type":"em","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Request signing"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call webhook"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" operation in the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhooks"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" section."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access to the webhook endpoint may also be restricted by IP address, and HTTPS can be used to encrypt traffic."},"children":[]}]}]}]}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/security"}],"sectionId":"/docs/voice-2.0/api-reference/voice/section/core-concepts/security"}]}]}},{"type":"group","label":"Core Concepts","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts","items":[{"type":"link","label":"Call Model","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/call-model","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/call-model","content":null},{"type":"link","label":"Initiating Calls","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/initiating-calls","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/initiating-calls","content":null},{"type":"link","label":"Call Pacing (Batch)","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/call-pacing-(batch)","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/call-pacing-(batch)","content":null},{"type":"link","label":"How To Initiate Batch Calls","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/how-to-initiate-batch-calls","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/how-to-initiate-batch-calls","content":null},{"type":"link","label":"How Calls Are Triggered","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/how-calls-are-triggered","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/how-calls-are-triggered","content":null},{"type":"link","label":"Call Lifecycle","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/call-lifecycle","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/call-lifecycle","content":null},{"type":"link","label":"Handling Events with Webhooks","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/handling-events-with-webhooks","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/handling-events-with-webhooks","content":null},{"type":"link","label":"Typical Request-Response Cycle","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/typical-request-response-cycle","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/typical-request-response-cycle","content":null},{"type":"link","label":"Webhooks vs. Events","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/webhooks-vs.-events","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/webhooks-vs.-events","content":null},{"type":"link","label":"Event Naming Convention","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/event-naming-convention","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/event-naming-convention","content":null},{"type":"link","label":"Common Webhook Events","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/common-webhook-events","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/common-webhook-events","content":null},{"type":"link","label":"Precedence Rules","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/precedence-rules","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/precedence-rules","content":null},{"type":"link","label":"Webhook Request Example","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/webhook-request-example","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/webhook-request-example","content":null},{"type":"link","label":"Regions","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/regions","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/regions","content":null},{"type":"link","label":"Best Practices","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/best-practices","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/best-practices","content":null},{"type":"link","label":"Security","link":"/docs/voice-2.0/api-reference/voice/section/core-concepts/security","routeSlug":"/docs/voice-2.0/api-reference/voice/section/core-concepts/security","content":null}],"content":null},{"type":"separator","label":"Calls and Call Management","content":null},{"type":"group","label":"Calls","link":"/docs/voice-2.0/api-reference/voice/calls","routeSlug":"/docs/voice-2.0/api-reference/voice/calls","items":[{"label":"List calls made with Sinch Voice API","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/calls/listcalls","routeSlug":"/docs/voice-2.0/api-reference/voice/calls/listcalls","metadata":{"seo":{"title":"List calls made with Sinch Voice API","description":"List and filter calls made with Sinch"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listCalls","name":"List calls made with Sinch Voice API","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1calls/get","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List calls made with Sinch Voice API","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"List and filter calls made with Sinch"},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1calls/get/parameters"},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"serviceId","in":"query","schemaId":"schema_1036","description":"The ID of the service."},{"name":"from","in":"query","schemaId":"schema_1037","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only include calls where "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"from"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" matches this origin.  For inbound calls, this is the caller; for outbound calls, this is the calling party."},"children":[]}]}]}]},{"name":"to","in":"query","schemaId":"schema_1038","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only include calls where "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"to"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" matches this destination. For inbound calls, this is the called party; for outbound calls, this is the callee/recipient."},"children":[]}]}]}]},{"name":"callType","in":"query","schemaId":"schema_1039","description":"Only include calls of the specified type.\n\nIf omitted, calls of all types are included."},{"name":"startTime","in":"query","schemaId":"schema_1040","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only include calls that started "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"at or after"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"startTime"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use a more precise timestamp to narrow the results. For example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"2025-02-01"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" matches calls starting from 2025-02-01T00:00:00Z"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"2025-02-01T14:00:00Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" matches calls starting from 14:00:00Z on 2025-02-01"},"children":[]}]}]}]}]},{"name":"endTime","in":"query","schemaId":"schema_1041","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only include calls that ended "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"before"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"endTime"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (exclusive)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use a more precise timestamp to narrow the results. For example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"2025-03-01"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" matches calls ending up to 2025-03-01T00:00:00Z"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"2025-03-01T14:00:00Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" matches calls ending up to 14:00:00Z on 2025-03-01"},"children":[]}]}]}]}]},{"name":"callResult","in":"query","schemaId":"schema_1042","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Filter results to only include calls whose "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"callResult"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" matches the specified value."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If omitted, calls with any result are included."},"children":[]}]}]}]},{"name":"callReason","in":"query","schemaId":"schema_1043","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Filter results to only include calls whose "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"callReason"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" matches the specified value."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If omitted, calls with any reason are included."},"children":[]}]}]}]},{"name":"pageSize","in":"query","schemaId":"schema_1044","description":"Number of items to be returned on each page."},{"name":"page","in":"query","schemaId":"schema_1045","description":"Page number (1-based)"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1calls/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/projects/{projectId}/calls","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"}],"query":[{"name":"serviceId","in":"query","required":false,"schemaId":"components/schemas/serviceId"},{"name":"from","in":"query","required":false,"example":"+15551234567","schemaId":"schema_1037"},{"name":"to","in":"query","required":false,"example":"+15551234568","schemaId":"schema_1038"},{"name":"callType","in":"query","required":false,"schemaId":"components/schemas/callType"},{"name":"startTime","in":"query","required":false,"example":"2025-02-01T14:00:00Z","schemaId":"schema_1040"},{"name":"endTime","in":"query","required":false,"example":"2025-03-01T14:00:00Z","schemaId":"schema_1041"},{"name":"callResult","in":"query","required":false,"schemaId":"components/schemas/callResult"},{"name":"callReason","in":"query","required":false,"schemaId":"components/schemas/callReason"},{"name":"pageSize","in":"query","required":false,"schemaId":"schema_1044"},{"name":"page","in":"query","required":false,"schemaId":"schema_1045"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","400","401","403","404","429","500"],"pointer":"/v2/projects/{projectId}/calls","href":"calls/listcalls","openApiOperationId":"listCalls","summary":"List calls made with Sinch Voice API","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\ncalls = sinch_client.voice.v2.calls.list()\n\nprint(\"List of calls:\\n\")\nfor call in calls.iterator():\n    print(call)\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.voice.v2.calls.list();\n    if (response.data.length === 0) {\n      console.log('No Voice v2 calls found.');\n      return;\n    }\n    console.log(`✅ Found ${response.data.length} Voice v2 calls.`);\n    response.data.forEach((call) => {\n      console.log(call);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list Voice v2 calls:');\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"A list of calls","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/callsList","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls/get/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/callsList","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls/get/responses/200/content/application~1json/example"]},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"404","description":"Resource not found.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}},"schemaId":"components/schemas/notFound"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1calls/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/callsList","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls/get/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/callsList","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls/get/responses/200/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"404","schemaId":"components/schemas/notFound","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/calls/listcalls"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/calls"},{"label":"Create and initiate a new outbound voice call","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/calls/createcall","routeSlug":"/docs/voice-2.0/api-reference/voice/calls/createcall","metadata":{"seo":{"title":"Create and initiate a new outbound voice call","description":"Create a new outbound call associated to the project's default service or to the service specified in the serviceId query parameter."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createCall","name":"Create and initiate a new outbound voice call","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1calls/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create and initiate a new outbound voice call","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create a new outbound call associated to the project's default service or to the service specified in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"serviceId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" query parameter."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1calls/post/parameters"},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"serviceId","in":"query","schemaId":"schema_1036","description":"The ID of the service."}],"pointer":"/paths/~1v2~1projects~1{projectId}~1calls/post/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Idempotency-Key","in":"header","schemaId":"schema_1048","description":"Client-generated idempotency key to safely retry requests. The server uses this key to recognize retries of the same request. If a request with the same key is received within 10 minutes, the server returns the cached response from the original request. Using a random UUID (v4) is strongly recommended."}],"pointer":"/paths/~1v2~1projects~1{projectId}~1calls/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/callRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/simpleDial","paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/dialToStream","paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/batchDial"]}},"schemaId":"components/schemas/callRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/simpleDial","paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/dialToStream","paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/batchDial"],"pointer":"/paths/~1v2~1projects~1{projectId}~1calls/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/v2/projects/{projectId}/calls","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"}],"query":[{"name":"serviceId","in":"query","required":false,"schemaId":"components/schemas/serviceId"}],"querystring":[],"header":[{"name":"Idempotency-Key","in":"header","required":false,"schemaId":"schema_1048"}],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/callRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/simpleDial","paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/dialToStream","paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/batchDial"]}},"responseCodes":["201","400","401","402","403","404","429","500"],"pointer":"/v2/projects/{projectId}/calls","href":"calls/createcall","openApiOperationId":"createCall","summary":"Create and initiate a new outbound voice call","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The Sinch phone number to call from\nfrom_phone_number = (\n    os.environ.get(\"SINCH_PHONE_NUMBER\") or \"MY_SINCH_PHONE_NUMBER\"\n)\n\n# The phone number of the recipient to call\nto_phone_number = \"RECIPIENT_PHONE_NUMBER\"\n\n# The command dialing out to the recipient\ndial_command = {\n    \"command\": \"dial\",\n    \"call_name\": \"Python_SDK_Snippet_Call\",\n    \"from_\": {\"type\": \"PHONE\", \"phone\": {\"number\": from_phone_number}},\n    \"to\": {\"type\": \"PHONE\", \"phone\": {\"number\": to_phone_number}},\n    \"events\": {\n        \"on_answer\": [\n            {\n                \"command\": \"messages\",\n                \"messages\": [\n                    {\n                        \"type\": \"SAY\",\n                        \"say\": {\n                            \"text\": \"Hello, your call is now connected.\",\n                            \"voice_name\": \"Emma\",\n                        },\n                    }\n                ],\n            }\n        ],\n        \"on_hangup\": [{\"command\": \"hangup\"}],\n    },\n}\n\n# The SVAML commands describing the call flow\ncommands = [dial_command]\n\nresponse = sinch_client.voice.v2.calls.start(commands=commands)\n\nprint(f\"Call Successfully started.\\n{response}\")\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The phone number to be used as the caller ID, in E.164 format (e.g., +12025550123)\n  const sinchPhoneNumber = process.env.SINCH_PHONE_NUMBER || 'MY_SINCH_PHONE_NUMBER';\n  // The phone number you want to call, in E.164 format (e.g., +12025550123)\n  const recipientPhoneNumber = 'RECIPIENT_PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.voice.v2.calls.start({\n      createCallRequestBody: {\n        commands: [\n          {\n            command: 'dial',\n            callName: 'Node_SDK_Snippet_Call',\n            from: {\n              type: 'PHONE',\n              phone: {\n                number: sinchPhoneNumber,\n              },\n            },\n            to: {\n              type: 'PHONE',\n              phone: {\n                number: recipientPhoneNumber,\n              },\n            },\n            dialTimeoutDurationSeconds: 30,\n            events: {\n              onAnswer: [\n                {\n                  command: 'messages',\n                  messages: [\n                    {\n                      type: 'SAY',\n                      say: {\n                        text: 'Hello, your call is now connected.',\n                        voiceName: 'Emma',\n                      },\n                    },\n                  ],\n                },\n              ],\n              onHangup: [\n                {\n                  command: 'hangup',\n                },\n              ],\n            },\n          },\n        ],\n      },\n    });\n    console.log(`✅ Successfully started a Voice v2 call to ${recipientPhoneNumber}.`);\n    console.log(`Response:\\n${JSON.stringify(response, null, 2)}`);\n  } catch (err) {\n    console.error(`❌ Failed to start a Voice v2 call to ${recipientPhoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"schemaId":"components/schemas/callRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/simpleDial","paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/dialToStream","paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/batchDial"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/callRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/simpleDial","paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/dialToStream","paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/batchDial"]}},"examples":[{},{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Call created","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/callResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls/post/responses/201/content/application~1json/examples/singleCallCreated","paths/~1v2~1projects~1{projectId}~1calls/post/responses/201/content/application~1json/examples/batchCallCreated"]}},"schemaId":"components/schemas/callResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls/post/responses/201/content/application~1json/examples/singleCallCreated","paths/~1v2~1projects~1{projectId}~1calls/post/responses/201/content/application~1json/examples/batchCallCreated"]},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"402","description":"Payment required","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/paymentRequired"}},"schemaId":"components/schemas/paymentRequired"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"404","description":"Resource not found.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}},"schemaId":"components/schemas/notFound"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1calls/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/callResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls/post/responses/201/content/application~1json/examples/singleCallCreated","paths/~1v2~1projects~1{projectId}~1calls/post/responses/201/content/application~1json/examples/batchCallCreated"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/callResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls/post/responses/201/content/application~1json/examples/singleCallCreated","paths/~1v2~1projects~1{projectId}~1calls/post/responses/201/content/application~1json/examples/batchCallCreated"]}}},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"402","schemaId":"components/schemas/paymentRequired","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/paymentRequired"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"404","schemaId":"components/schemas/notFound","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/calls/createcall"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/calls"},{"label":"Retrieve call details by call ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/calls/getcallbyid","routeSlug":"/docs/voice-2.0/api-reference/voice/calls/getcallbyid","metadata":{"seo":{"title":"Retrieve call details by call ID","description":"Retrieve detailed information about a specific call using its unique identifier."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getCallById","name":"Retrieve call details by call ID","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1calls~1{callId}/get","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Retrieve call details by call ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Retrieve detailed information about a specific call using its unique identifier."},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true},{"name":"callId","in":"path","schemaId":"schema_1049","description":"The ID of the call.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1calls~1{callId}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/projects/{projectId}/calls/{callId}","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"},{"name":"callId","in":"path","required":true,"schemaId":"components/schemas/callId"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","401","403","404","429","500"],"pointer":"/v2/projects/{projectId}/calls/{callId}","href":"calls/getcallbyid","openApiOperationId":"getCallById","summary":"Retrieve call details by call ID","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The ID of the call to retrieve\ncall_id = \"CALL_ID\"\n\nresponse = sinch_client.voice.v2.calls.get(call_id=call_id)\n\nprint(f\"Successfully retrieved call details.\\n{response}\")\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The ID of the call to retrieve\n  const callId = 'CALL_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.voice.v2.calls.get({\n      callId,\n    });\n    console.log(`✅ Successfully retrieved the Voice v2 call with ID ${callId}.`);\n    console.log(`Response:\\n${JSON.stringify(response, null, 2)}`);\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the Voice v2 call with ID ${callId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"A call object","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/call","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls~1{callId}/get/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/call","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls~1{callId}/get/responses/200/content/application~1json/example"]},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"404","description":"Resource not found.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}},"schemaId":"components/schemas/notFound"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1calls~1{callId}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/call","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls~1{callId}/get/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/call","exampleIds":["paths/~1v2~1projects~1{projectId}~1calls~1{callId}/get/responses/200/content/application~1json/example"]}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"404","schemaId":"components/schemas/notFound","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/calls/getcallbyid"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/calls/{callId}"},{"label":"Patch an ongoing call by call ID","deprecated":false,"httpVerb":"patch","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/calls/patchcallbyid","routeSlug":"/docs/voice-2.0/api-reference/voice/calls/patchcallbyid","metadata":{"seo":{"title":"Patch an ongoing call by call ID","description":"Interact with an ongoing call by submitting a set of SVAML commands. Use this to force disconnect, play messages, bridge with another call, or perform other call control actions."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"patchCallById","name":"Patch an ongoing call by call ID","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1calls~1{callId}/patch","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Patch an ongoing call by call ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Interact with an ongoing call by submitting a set of SVAML commands. Use this to force disconnect, play messages, bridge with another call, or perform other call control actions."},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true},{"name":"callId","in":"path","schemaId":"schema_1049","description":"The ID of the call.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1calls~1{callId}/patch/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Idempotency-Key","in":"header","schemaId":"schema_1048","description":"Client-generated idempotency key to safely retry requests. The server uses this key to recognize retries of the same request. If a request with the same key is received within 10 minutes, the server returns the cached response from the original request. Using a random UUID (v4) is strongly recommended."}],"pointer":"/paths/~1v2~1projects~1{projectId}~1calls~1{callId}/patch/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/callPatchRequest"}},"schemaId":"components/schemas/callPatchRequest","pointer":"/paths/~1v2~1projects~1{projectId}~1calls~1{callId}/patch/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PATCH","path":"/v2/projects/{projectId}/calls/{callId}","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"},{"name":"callId","in":"path","required":true,"schemaId":"components/schemas/callId"}],"query":[],"querystring":[],"header":[{"name":"Idempotency-Key","in":"header","required":false,"schemaId":"schema_1048"}],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/callPatchRequest"}},"responseCodes":["202","400","401","403","404","429","500"],"pointer":"/v2/projects/{projectId}/calls/{callId}","href":"calls/patchcallbyid","openApiOperationId":"patchCallById","summary":"Patch an ongoing call by call ID","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The ID of the ongoing call to interact with\ncall_id = \"CALL_ID\"\n\n# The SVAML commands to interact with the ongoing call\ncommands = [{\"command\": \"hangup\"}]\n\nsinch_client.voice.v2.calls.interact_by_call_id(\n    call_id=call_id, commands=commands\n)\n\nprint(\"Successfully submitted commands to the call.\")\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The ID of the ongoing call to interact with\n  const callId = 'CALL_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    await sinch.voice.v2.calls.interactByCallId({\n      callId,\n      callPatchRequestBody: {\n        commands: [\n          {\n            command: 'hangup',\n          },\n        ],\n      },\n    });\n    console.log(`✅ Successfully submitted SVAML commands for the Voice v2 call with ID ${callId}.`);\n  } catch (err) {\n    console.error(`❌ Failed to interact with the Voice v2 call with ID ${callId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"schemaId":"components/schemas/callPatchRequest","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/callPatchRequest"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"202","description":"Commands accepted for processing."},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"404","description":"Resource not found.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}},"schemaId":"components/schemas/notFound"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1calls~1{callId}/patch/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"202"},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"404","schemaId":"components/schemas/notFound","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/calls/patchcallbyid"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/calls/{callId}"},{"label":"Patch an ongoing call by session ID and call name","deprecated":false,"httpVerb":"patch","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/calls/patchcallbysessionandname","routeSlug":"/docs/voice-2.0/api-reference/voice/calls/patchcallbysessionandname","metadata":{"seo":{"title":"Patch an ongoing call by session ID and call name","description":"Interact with an ongoing call identified by its session and call name by submitting a set of SVAML commands. Use this to force disconnect, play messages, bridge with another call, or perform other call control actions."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"patchCallBySessionAndName","name":"Patch an ongoing call by session ID and call name","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}~1calls~1{callName}/patch","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Patch an ongoing call by session ID and call name","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Interact with an ongoing call identified by its session and call name by submitting a set of SVAML commands. Use this to force disconnect, play messages, bridge with another call, or perform other call control actions."},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true},{"name":"sessionId","in":"path","schemaId":"schema_1050","description":"The ID of the session.","required":true},{"name":"callName","in":"path","schemaId":"schema_1051","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The name of the call leg within the session, as assigned by the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"callName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" property in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"dial"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" command."},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}~1calls~1{callName}/patch/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Idempotency-Key","in":"header","schemaId":"schema_1048","description":"Client-generated idempotency key to safely retry requests. The server uses this key to recognize retries of the same request. If a request with the same key is received within 10 minutes, the server returns the cached response from the original request. Using a random UUID (v4) is strongly recommended."}],"pointer":"/paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}~1calls~1{callName}/patch/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/callPatchRequest"}},"schemaId":"components/schemas/callPatchRequest","pointer":"/paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}~1calls~1{callName}/patch/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PATCH","path":"/v2/projects/{projectId}/sessions/{sessionId}/calls/{callName}","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"},{"name":"sessionId","in":"path","required":true,"schemaId":"components/schemas/sessionId"},{"name":"callName","in":"path","required":true,"example":"origin","schemaId":"schema_1051"}],"query":[],"querystring":[],"header":[{"name":"Idempotency-Key","in":"header","required":false,"schemaId":"schema_1048"}],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/callPatchRequest"}},"responseCodes":["202","400","401","403","404","429","500"],"pointer":"/v2/projects/{projectId}/sessions/{sessionId}/calls/{callName}","href":"calls/patchcallbysessionandname","openApiOperationId":"patchCallBySessionAndName","summary":"Patch an ongoing call by session ID and call name","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The ID of the session the call leg belongs to\nsession_id = \"SESSION_ID\"\n\n# The name of the call leg within the session\ncall_name = \"CALL_NAME\"\n\n# The SVAML commands to interact with the ongoing call\ncommands = [{\"command\": \"hangup\"}]\n\nsinch_client.voice.v2.calls.interact_by_call_name(\n    session_id=session_id, call_name=call_name, commands=commands\n)\n\nprint(\"Successfully submitted commands to the call.\")\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The ID of the session that contains the call\n  const sessionId = 'SESSION_ID';\n  // The name of the call leg within the session, as assigned by the `callName` property in the `dial` command\n  const callName = 'CALL_NAME';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    await sinch.voice.v2.calls.interactByCallName({\n      sessionId,\n      callName,\n      callPatchRequestBody: {\n        commands: [\n          {\n            command: 'hangup',\n          },\n        ],\n      },\n    });\n    console.log(`✅ Successfully submitted SVAML commands for the Voice v2 call named ${callName} in session ${sessionId}.`);\n  } catch (err) {\n    console.error(`❌ Failed to interact with the Voice v2 call named ${callName} in session ${sessionId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"schemaId":"components/schemas/callPatchRequest","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/callPatchRequest"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"202","description":"Commands accepted for processing."},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"404","description":"Resource not found.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}},"schemaId":"components/schemas/notFound"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}~1calls~1{callName}/patch/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"202"},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"404","schemaId":"components/schemas/notFound","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/calls/patchcallbysessionandname"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/sessions/{sessionId}/calls/{callName}"}],"content":{"contentType":"group","meta":{"name":"Calls"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Calls","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Calls are the core resource for voice interactions. The API supports creating, retrieving, updating, and deleting calls, and accessing call metadata, state, and participants."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Call"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" resource represents a connection between a voice channel and Sinch."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Using this resource, customers can initiate a call, fetch information about a completed call, fetch a list of calls made to and from the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/voice-2.0/api-reference/voice/services/"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Voice service"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and redirect or end a call in progress."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A call always has a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"direction"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", either "},"children":[]},{"$$mdtype":"Node","type":"em","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"inbound"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"em","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"outbound"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". The direction of the call dictates when and how the call can be controlled."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"An "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"outbound"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" call is created when a DIAL command is invoked. Outbound calls can be controlled by supplying "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/voice-2.0/api-reference/svaml"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"SVAMLv2"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" commands when creating the call, via the responses to the call's webhooks, or by sending a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"PATCH"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" request."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"An "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"inbound"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" call is created when the service receives a call via one of the Sinch voice channels [Phone, In-App, SIP, Streams]. To handle incoming calls, a service webhook must be configured via the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/voice-2.0/api-reference/voice/services"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"services API"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://dashboard.sinch.com/voice"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"dashboard"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/v2/projects/{projectId}/calls","summary":"List calls made with Sinch Voice API","prefix":{"name":"get","color":"get"},"badges":[],"link":"/calls/listcalls","deprecated":false},{"title":"/v2/projects/{projectId}/calls","summary":"Create and initiate a new outbound voice call","prefix":{"name":"post","color":"post"},"badges":[],"link":"/calls/createcall","deprecated":false},{"title":"/v2/projects/{projectId}/calls/{callId}","summary":"Retrieve call details by call ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/calls/getcallbyid","deprecated":false},{"title":"/v2/projects/{projectId}/calls/{callId}","summary":"Patch an ongoing call by call ID","prefix":{"name":"patch","color":"patch"},"badges":[],"link":"/calls/patchcallbyid","deprecated":false},{"title":"/v2/projects/{projectId}/sessions/{sessionId}/calls/{callName}","summary":"Patch an ongoing call by session ID and call name","prefix":{"name":"patch","color":"patch"},"badges":[],"link":"/calls/patchcallbysessionandname","deprecated":false}]}]}]}]}},{"type":"group","label":"Sessions","link":"/docs/voice-2.0/api-reference/voice/sessions","routeSlug":"/docs/voice-2.0/api-reference/voice/sessions","items":[{"label":"Get a session details by the session ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/sessions/getsessionbyid","routeSlug":"/docs/voice-2.0/api-reference/voice/sessions/getsessionbyid","metadata":{"seo":{"title":"Get a session details by the session ID","description":"Retrieve detailed information about a specific session, including all associated calls and their current states. Sessions represent the complete interaction lifecycle and can contain multiple related calls."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getSessionById","name":"Get a session details by the session ID","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}/get","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get a session details by the session ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Retrieve detailed information about a specific session, including all associated calls and their current states.  Sessions represent the complete interaction lifecycle and can contain multiple related calls."},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true},{"name":"sessionId","in":"path","schemaId":"schema_1050","description":"The ID of the session.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/projects/{projectId}/sessions/{sessionId}","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"},{"name":"sessionId","in":"path","required":true,"schemaId":"components/schemas/sessionId"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","400","401","403","404","429","500"],"pointer":"/v2/projects/{projectId}/sessions/{sessionId}","href":"sessions/getsessionbyid","openApiOperationId":"getSessionById","summary":"Get a session details by the session ID","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The ID of the session to retrieve\nsession_id = \"SESSION_ID\"\n\nresponse = sinch_client.voice.v2.sessions.get(session_id=session_id)\n\nprint(f\"Successfully retrieved session.\\n{response}\")\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The ID of the session to retrieve\n  const sessionId = 'SESSION_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.voice.v2.sessions.get({\n      sessionId,\n    });\n    console.log(`✅ Successfully retrieved the session with ID ${sessionId}.`);\n    console.log(`Response:\\n${JSON.stringify(response, null, 2)}`);\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the session with ID ${sessionId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"A session object","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/session","exampleIds":["paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}/get/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/session","exampleIds":["paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}/get/responses/200/content/application~1json/example"]},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"404","description":"Resource not found.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}},"schemaId":"components/schemas/notFound"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/session","exampleIds":["paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}/get/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/session","exampleIds":["paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}/get/responses/200/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"404","schemaId":"components/schemas/notFound","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/sessions/getsessionbyid"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/sessions/{sessionId}"}],"content":{"contentType":"group","meta":{"name":"Sessions"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Sessions","showPageActions":true},{"nodeType":"markdoc","content":"A session represents a single interaction between a user and the Sinch Voice API. Sessions can be used to track the state of a call, including its duration, participants, and any associated metadata."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/v2/projects/{projectId}/sessions/{sessionId}","summary":"Get a session details by the session ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/sessions/getsessionbyid","deprecated":false}]}]}]}]}},{"type":"group","label":"Batches","link":"/docs/voice-2.0/api-reference/voice/batches","routeSlug":"/docs/voice-2.0/api-reference/voice/batches","items":[{"type":"link","label":"Key Features","link":"/docs/voice-2.0/api-reference/voice/batches/key-features","routeSlug":"/docs/voice-2.0/api-reference/voice/batches/key-features","content":{"contentType":"item","itemVariant":"markdown","meta":{"name":"Key Features"},"children":[{"nodeType":"container","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"batches/key-features"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Key Features"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Rate limiting"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Control the maximum calls per second (CPS) to manage load and comply with carrier requirements"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"TTL (Time-to-Live)"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Set a maximum time window for initiating queued calls"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Monitoring"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Track batch execution state including completed, failed, in-progress, and queued calls"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Cancellation"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Stop processing queued calls while allowing in-progress calls to complete"},"children":[]}]}]}]}]}],"panels":[]}]}},{"label":"Stop processing a batch of call sessions","deprecated":false,"httpVerb":"delete","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/batches/stopbatchprocessing","routeSlug":"/docs/voice-2.0/api-reference/voice/batches/stopbatchprocessing","metadata":{"seo":{"title":"Stop processing a batch of call sessions","description":"Stop processing a batch of call sessions. This will prevent any queued calls in the batch from being initiated. Calls that are already in progress will not be affected and will continue until completion."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"stopBatchProcessing","name":"Stop processing a batch of call sessions","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/delete","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Stop processing a batch of call sessions","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Stop processing a batch of call sessions.  This will prevent any queued calls in the batch from being initiated.  Calls that are already in progress will not be affected and will continue until completion."},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true},{"name":"batchId","in":"path","schemaId":"schema_1052","description":"The ID of the batch.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/delete/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"DELETE","path":"/v2/projects/{projectId}/batches/{batchId}","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"},{"name":"batchId","in":"path","required":true,"schemaId":"components/schemas/batchId"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["202","400","401","403","404","429","500"],"pointer":"/v2/projects/{projectId}/batches/{batchId}","href":"batches/stopbatchprocessing","openApiOperationId":"stopBatchProcessing","summary":"Stop processing a batch of call sessions","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The ID of the batch call operation to stop\nbatch_id = \"BATCH_ID\"\n\nresponse = sinch_client.voice.v2.batches.stop(batch_id=batch_id)\n\nprint(f\"Batch processing cancellation result: {response.result}\")\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The ID of the batch to stop processing\n  const batchId = 'BATCH_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.voice.v2.batches.stop({\n      batchId,\n    });\n    console.log(`✅ Successfully requested stop for the batch call with ID ${batchId}.`);\n    console.log(`Response:\\n${JSON.stringify(response, null, 2)}`);\n  } catch (err) {\n    console.error(`❌ Failed to stop the batch call with ID ${batchId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"202","description":"Batch call processing cancellation received.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/batchStopResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/delete/responses/202/content/application~1json/example"]}},"schemaId":"components/schemas/batchStopResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/delete/responses/202/content/application~1json/example"]},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"404","description":"Resource not found.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}},"schemaId":"components/schemas/notFound"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/delete/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"202","schemaId":"components/schemas/batchStopResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/delete/responses/202/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/batchStopResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/delete/responses/202/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"404","schemaId":"components/schemas/notFound","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/batches/stopbatchprocessing"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/batches/{batchId}"},{"label":"Get a batch summary","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/batches/getbatchcallsummary","routeSlug":"/docs/voice-2.0/api-reference/voice/batches/getbatchcallsummary","metadata":{"seo":{"title":"Get a batch summary","description":"Retrieve a summary of a batch call operation, including statistics on completed, failed, in-progress, and queued calls. This provides an overview of the batch execution state and individual call session states."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getBatchCallSummary","name":"Get a batch summary","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/get","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get a batch summary","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Retrieve a summary of a batch call operation, including statistics on completed, failed, in-progress, and queued calls.  This provides an overview of the batch execution state and individual call session states."},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true},{"name":"batchId","in":"path","schemaId":"schema_1052","description":"The ID of the batch.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/projects/{projectId}/batches/{batchId}","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"},{"name":"batchId","in":"path","required":true,"schemaId":"components/schemas/batchId"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","400","401","403","404","429","500"],"pointer":"/v2/projects/{projectId}/batches/{batchId}","href":"batches/getbatchcallsummary","openApiOperationId":"getBatchCallSummary","summary":"Get a batch summary","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The ID of the batch\nbatch_id = \"BATCH_ID\"\n\nresponse = sinch_client.voice.v2.batches.get(batch_id=batch_id)\n\nprint(f\"Successfully retrieved batch call summary.\\n{response}\")\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The ID of the batch to get a summary for\n  const batchId = 'BATCH_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.voice.v2.batches.get({\n      batchId,\n    });\n    console.log(`✅ Successfully retrieved the summary for the batch call with ID ${batchId}.`);\n    console.log(`Response:\\n${JSON.stringify(response, null, 2)}`);\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the summary for the batch call with ID ${batchId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"A batch call summary","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/batchSummary","exampleIds":["paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/get/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/batchSummary","exampleIds":["paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/get/responses/200/content/application~1json/example"]},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"404","description":"Resource not found.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}},"schemaId":"components/schemas/notFound"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/batchSummary","exampleIds":["paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/get/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/batchSummary","exampleIds":["paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/get/responses/200/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"404","schemaId":"components/schemas/notFound","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/batches/getbatchcallsummary"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/batches/{batchId}"},{"label":"Get batch details","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/batches/getbatchdetails","routeSlug":"/docs/voice-2.0/api-reference/voice/batches/getbatchdetails","metadata":{"seo":{"title":"Get batch details","description":"Retrieve per-session details for a batch call operation, including the current state of each call session in the batch.Use this endpoint when individual session-level visibility is needed (for example, to inspect which sessions are QUEUED, IN_PROGRESS or COMPLETED). EXPIRED sessions are never returned because they were never initiated."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getBatchDetails","name":"Get batch details","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1batches~1{batchId}~1details/get","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get batch details","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve per-session details for a batch call operation, including the current state of each call session in the batch."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use this endpoint when individual session-level visibility is needed (for example, to inspect which sessions are "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"QUEUED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"IN_PROGRESS"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"COMPLETED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"). "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"EXPIRED"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" sessions are never returned because they were never initiated."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true},{"name":"batchId","in":"path","schemaId":"schema_1052","description":"The ID of the batch.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1batches~1{batchId}~1details/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/projects/{projectId}/batches/{batchId}/details","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"},{"name":"batchId","in":"path","required":true,"schemaId":"components/schemas/batchId"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","400","401","403","404","429","500"],"pointer":"/v2/projects/{projectId}/batches/{batchId}/details","href":"batches/getbatchdetails","openApiOperationId":"getBatchDetails","summary":"Get batch details","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The ID of the batch\nbatch_id = \"BATCH_ID\"\n\nresponse = sinch_client.voice.v2.batches.get_details(batch_id=batch_id)\n\nprint(f\"Successfully retrieved batch details.\\n{response}\")\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The ID of the batch to get details for\n  const batchId = 'BATCH_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.voice.v2.batches.getDetails({\n      batchId,\n    });\n    console.log(`✅ Successfully retrieved the details for the batch call with ID ${batchId}.`);\n    console.log(`Response:\\n${JSON.stringify(response, null, 2)}`);\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the details for the batch call with ID ${batchId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Batch details","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/batchDetails","exampleIds":["paths/~1v2~1projects~1{projectId}~1batches~1{batchId}~1details/get/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/batchDetails","exampleIds":["paths/~1v2~1projects~1{projectId}~1batches~1{batchId}~1details/get/responses/200/content/application~1json/example"]},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"404","description":"Resource not found.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}},"schemaId":"components/schemas/notFound"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1batches~1{batchId}~1details/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/batchDetails","exampleIds":["paths/~1v2~1projects~1{projectId}~1batches~1{batchId}~1details/get/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/batchDetails","exampleIds":["paths/~1v2~1projects~1{projectId}~1batches~1{batchId}~1details/get/responses/200/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"404","schemaId":"components/schemas/notFound","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/batches/getbatchdetails"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/batches/{batchId}/details"}],"content":{"contentType":"group","meta":{"name":"Batches"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Batches","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A batch represents a group of call sessions initiated together as a single operation."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Batches are useful for scenarios like outbound campaigns, notifications, or any use case requiring multiple calls to be placed concurrently with controlled pacing."},"children":[]}]}]}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/v2/projects/{projectId}/batches/{batchId}","summary":"Stop processing a batch of call sessions","prefix":{"name":"delete","color":"delete"},"badges":[],"link":"/batches/stopbatchprocessing","deprecated":false},{"title":"/v2/projects/{projectId}/batches/{batchId}","summary":"Get a batch summary","prefix":{"name":"get","color":"get"},"badges":[],"link":"/batches/getbatchcallsummary","deprecated":false},{"title":"/v2/projects/{projectId}/batches/{batchId}/details","summary":"Get batch details","prefix":{"name":"get","color":"get"},"badges":[],"link":"/batches/getbatchdetails","deprecated":false}]}]}]}]}},{"type":"separator","label":"Event-Driven Call Control","content":null},{"type":"group","label":"Webhooks","link":"/docs/voice-2.0/api-reference/voice/webhooks","routeSlug":"/docs/voice-2.0/api-reference/voice/webhooks","items":[{"type":"link","label":"Request Format","link":"/docs/voice-2.0/api-reference/voice/webhooks/request-format","routeSlug":"/docs/voice-2.0/api-reference/voice/webhooks/request-format","content":{"contentType":"item","itemVariant":"markdown","meta":{"name":"Request Format"},"children":[{"nodeType":"container","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"webhooks/request-format"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Request Format"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhook requests conform to the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"CloudEvents 1.0"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" specification using "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"HTTP binary content mode"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":":"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"CloudEvent metadata is carried as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ce-*"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" HTTP headers (see parameters below)."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The request body contains only the event data payload ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"call"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" object), encoded as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"application/json"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}],"panels":[]}]}},{"type":"link","label":"When webhooks are triggered","link":"/docs/voice-2.0/api-reference/voice/webhooks/when-webhooks-are-triggered","routeSlug":"/docs/voice-2.0/api-reference/voice/webhooks/when-webhooks-are-triggered","content":{"contentType":"item","itemVariant":"markdown","meta":{"name":"When webhooks are triggered"},"children":[{"nodeType":"container","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"webhooks/when-webhooks-are-triggered"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When webhooks are triggered"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Incoming calls"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": When a call arrives on a service configured with a webhook URL. Services using static SVAML behavior ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"STATIC"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") do not trigger this webhook."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call events"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": When the service is configured with a webhook URL "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"and"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" the SVAML command does not have an "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"events"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" property defined. If the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"events"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" property is present — even if empty — no webhook is triggered for that command's events. For example, a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"dial"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" command with no "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"events"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" property will trigger a webhook when the call is answered; a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"dial"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" command with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"events: {}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" will not."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Custom events"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": When a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"webhook"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" SVAML command is executed explicitly during a call."},"children":[]}]}]}]}]}],"panels":[]}]}},{"type":"link","label":"Response","link":"/docs/voice-2.0/api-reference/voice/webhooks/response","routeSlug":"/docs/voice-2.0/api-reference/voice/webhooks/response","content":{"contentType":"item","itemVariant":"markdown","meta":{"name":"Response"},"children":[{"nodeType":"container","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"webhooks/response"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The endpoint must return HTTP "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"200"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" with a JSON body containing SVAML commands to execute next, or an empty "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"commands"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" array to take no action."},"children":[]}]}]}]}],"panels":[]}]}},{"type":"link","label":"Timeouts and failover","link":"/docs/voice-2.0/api-reference/voice/webhooks/timeouts-and-failover","routeSlug":"/docs/voice-2.0/api-reference/voice/webhooks/timeouts-and-failover","content":{"contentType":"item","itemVariant":"markdown","meta":{"name":"Timeouts and failover"},"children":[{"nodeType":"container","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"webhooks/timeouts-and-failover"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Timeouts and failover"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Sinch enforces a "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"5-second response timeout"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Slow responses may affect call quality."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhook requests are "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"blocking"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": execution of the call flow pauses until the endpoint responds, and the next command runs once a response has been received."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhook URLs are configured on the service via the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/voice-2.0/api-reference/voice/services"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Services API"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://dashboard.sinch.com/voice/services"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Dashboard"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". The "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"webhook"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" SVAML command carries its own "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"url"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fallbackUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for mid-call events."},"children":[]}]}]}]}]}],"panels":[]}]}},{"type":"link","label":"What counts as a failure","link":"/docs/voice-2.0/api-reference/voice/webhooks/what-counts-as-a-failure","routeSlug":"/docs/voice-2.0/api-reference/voice/webhooks/what-counts-as-a-failure","content":{"contentType":"item","itemVariant":"markdown","meta":{"name":"What counts as a failure"},"children":[{"nodeType":"container","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"webhooks/what-counts-as-a-failure"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"What counts as a failure"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A delivery attempt has failed when:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The endpoint returns a non-successful status code."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The endpoint does not respond within the 5-second timeout."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returned body does not contain proper SVAML commands."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Because the call flow is blocked while waiting, a delivery that ends with a failure disconnects the call. This happens when the primary URL fails and no "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fallbackUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is configured, or when both the primary URL and the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fallbackUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" fail."},"children":[]}]}]}]}],"panels":[]}]}},{"type":"link","label":"Failover algorithm","link":"/docs/voice-2.0/api-reference/voice/webhooks/failover-algorithm","routeSlug":"/docs/voice-2.0/api-reference/voice/webhooks/failover-algorithm","content":{"contentType":"item","itemVariant":"markdown","meta":{"name":"Failover algorithm"},"children":[{"nodeType":"container","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"webhooks/failover-algorithm"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Failover algorithm"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This section is the authoritative description of how the webhook URL is selected. When a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fallbackUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is configured:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Requests are sent to the primary "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"url"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If a request to the primary URL fails, that same event is re-sent immediately to the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fallbackUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". The primary URL continues to be used for subsequent requests."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"After several "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"consecutive failures"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (exact number may vary) of the primary URL, the primary URL is bypassed and requests are sent only to the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fallbackUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". This avoids incurring the timeout on every request."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"While the primary URL is bypassed it is retried once every "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"60 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". The interval is counted from the last failure of the primary URL that triggers the bypass. Each unsuccessful retry restarts the 60-second clock. As soon as a retry succeeds the primary URL is restored and processing returns to step 1."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If no "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fallbackUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is configured, a failed request is not retried and the event is not delivered."},"children":[]}]}]}]}],"panels":[]}]}},{"type":"link","label":"Delivery guarantees","link":"/docs/voice-2.0/api-reference/voice/webhooks/delivery-guarantees","routeSlug":"/docs/voice-2.0/api-reference/voice/webhooks/delivery-guarantees","content":{"contentType":"item","itemVariant":"markdown","meta":{"name":"Delivery guarantees"},"children":[{"nodeType":"container","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"webhooks/delivery-guarantees"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Delivery guarantees"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Because a failed request is re-sent to the fallback URL, the same event can be delivered more than once — for example when the primary endpoint received and processed the request but responded too slowly. Webhook handlers should be idempotent and deduplicate on the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ce-id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ce-source"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header pair."},"children":[]}]}]}]}],"panels":[]}]}},{"label":"Call webhook","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":true,"type":"link","link":"/docs/voice-2.0/api-reference/voice/webhooks/callwebhook","routeSlug":"/docs/voice-2.0/api-reference/voice/webhooks/callwebhook","metadata":{"seo":{"title":"Call webhook","description":"Receives webhook notifications for call events from the Voice Platform."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"callWebhook","name":"Call webhook","isWebhook":true,"pointer":"/paths/call.webhook/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Call webhook","isWebhook":true,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Receives webhook notifications for call events from the Voice Platform."},"children":[]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"webhooks/callwebhook/request/request-signing","deepLinkHash":"/webhooks/callwebhook#webhooks/callwebhook/request/request-signing"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Request signing"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Every webhook request is signed by the Voice Platform so that the receiving"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"endpoint can verify that the request was sent by Sinch and was not altered in"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"transit."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The signature is carried in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header, using the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"service"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"authentication scheme. The header value is the service identifier and the"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"signature, separated by a colon:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: service <serviceId>:<signature>\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: service <serviceId>:<signature>\n"},"children":[]}]},{"$$mdtype":"Node","type":"table","attributes":{},"children":[{"$$mdtype":"Node","type":"thead","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Element"},"children":[]}]}]},{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Description"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"tbody","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"<serviceId>"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Identifier of the service the webhook belongs to. Matches the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"serviceId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" segment of the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ce-source"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header and the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"call.serviceId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" field of the request body."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"<signature>"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Base64-encoded HMAC-SHA256 hash of the canonical request string, keyed with the service secret."},"children":[]}]}]}]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":4,"id":"webhooks/callwebhook/request/signature","deepLinkHash":"/webhooks/callwebhook#webhooks/callwebhook/request/signature"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Signature"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"signature = Base64( HMAC-SHA256( secretBytes, UTF8(stringToSign) ) )\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"signature = Base64( HMAC-SHA256( secretBytes, UTF8(stringToSign) ) )\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"secretBytes"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is the 16-byte binary value of the service secret, and the signed"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"message is the UTF-8 encoding of "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"stringToSign"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The service secret is issued as a Base64 string, for example"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"F5wrP9SKYU6w8sbZXkp7GA=="},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Base64-decoding it yields the 16 bytes of"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"secretBytes"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". The decoded bytes are used as the HMAC key — signing with the"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"characters of the Base64 string instead produces a different, invalid signature."},"children":[]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":4,"id":"webhooks/callwebhook/request/canonical-string","deepLinkHash":"/webhooks/callwebhook#webhooks/callwebhook/request/canonical-string"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Canonical string"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"stringToSign"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is the concatenation of five parts. Each of the first four parts"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"is terminated by a single line feed ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\\n"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"); the last part is not followed by a"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"line feed."},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"POST\n{contentMd5}\n{contentType}\nx-timestamp:{timestamp}\n{path}\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"POST\n{contentMd5}\n{contentType}\nx-timestamp:{timestamp}\n{path}\n"},"children":[]}]},{"$$mdtype":"Node","type":"table","attributes":{},"children":[{"$$mdtype":"Node","type":"thead","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Part"},"children":[]}]}]},{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Value"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"tbody","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Method"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The HTTP method, always "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for webhook requests."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{contentMd5}"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Base64( MD5( UTF8(body) ) )"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — the Base64-encoded MD5 digest of the raw request body. Empty when the request carries no body."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{contentType}"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The full value of the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Content-Type"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header, including its parameters, for example "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"application/json; charset=utf-8"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Empty when the request carries no body."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{timestamp}"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The verbatim value of the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"x-timestamp"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" request header, an ISO 8601 UTC timestamp with seven fractional-second digits, for example "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"2026-04-01T12:00:00.0000000Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". The literal prefix "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"x-timestamp:"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is part of the canonical string."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{path}"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The absolute path of the configured webhook URL, without scheme, host, query string or fragment, for example "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/voice-webhooks"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The MD5 digest acts as a checksum of the body inside the canonical string. The"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"integrity and authenticity guarantee is provided by the HMAC-SHA256 signature"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"computed over that string."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The CloudEvents ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ce-*"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") headers are not covered by the signature."},"children":[]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":4,"id":"webhooks/callwebhook/request/example","deepLinkHash":"/webhooks/callwebhook#webhooks/callwebhook/request/example"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A request delivered to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://example.com/voice-webhooks"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" with the body"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\"event\":\"call.incoming\",\"call\":{\"callId\":\"01AN4Z07BY79KA1307SR9X4MV3\"}}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\"event\":\"call.incoming\",\"call\":{\"callId\":\"01AN4Z07BY79KA1307SR9X4MV3\"}}\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Content-Type: application/json; charset=utf-8"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"x-timestamp: 2026-04-01T12:00:00.0000000Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" produces the canonical string"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"POST\nCH5/FnzqzRJ81QlTLGAhAw==\napplication/json; charset=utf-8\nx-timestamp:2026-04-01T12:00:00.0000000Z\n/voice-webhooks\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"POST\nCH5/FnzqzRJ81QlTLGAhAw==\napplication/json; charset=utf-8\nx-timestamp:2026-04-01T12:00:00.0000000Z\n/voice-webhooks\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"With the service secret "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"F5wrP9SKYU6w8sbZXkp7GA=="},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", the resulting header is"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"Authorization: service a74b1566-0f18-4f8e-9c23-8e6b5df8fd3e:EWFtVTrykdhMTdyYSbn40GBJpf5UBeggO9T99sdwLyY=\n"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"Authorization: service a74b1566-0f18-4f8e-9c23-8e6b5df8fd3e:EWFtVTrykdhMTdyYSbn40GBJpf5UBeggO9T99sdwLyY=\n"},"children":[]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":4,"id":"webhooks/callwebhook/request/verification","deepLinkHash":"/webhooks/callwebhook#webhooks/callwebhook/request/verification"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Verification"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Split the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header value into the service identifier and the"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"signature."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Rebuild "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"stringToSign"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" from the received request, using the raw request body"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"exactly as delivered, before any parsing, re-serialization or whitespace"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"normalization."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Recompute the signature with the secret of the identified service and compare"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"it to the received value using a constant-time comparison."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Reject the request when the two values differ."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Reject requests whose "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"x-timestamp"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" lies outside an accepted clock-skew"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"window, to limit replay of previously valid requests."},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"ce-specversion","in":"header","schemaId":"schema_1053","description":"CloudEvents specification version.","required":true},{"name":"ce-type","in":"header","schemaId":"schema_1054","description":"CloudEvents event type.","required":true},{"name":"ce-source","in":"header","schemaId":"schema_1055","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"URI identifying the context where the event originated. Format: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"projects/{projectId}/services/{serviceId}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"required":true},{"name":"ce-id","in":"header","schemaId":"schema_1056","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Unique identifier for this event instance. Use together with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ce-source"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for deduplication."},"children":[]}]}]}],"required":true},{"name":"ce-time","in":"header","schemaId":"schema_1057","description":"Timestamp (RFC 3339) when the event occurred.","required":true},{"name":"x-timestamp","in":"header","schemaId":"schema_1058","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Timestamp (ISO 8601, UTC) applied by the Voice Platform when the request was signed. Covered by the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" signature and required to recompute it."},"children":[]}]}]}],"required":true}],"pointer":"/paths/call.webhook/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","isEvent":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/webhookRequest","exampleIds":["paths/call.webhook/post/requestBody/content/application~1json/examples/callIncoming","paths/call.webhook/post/requestBody/content/application~1json/examples/callAnswered","paths/call.webhook/post/requestBody/content/application~1json/examples/callBusy","paths/call.webhook/post/requestBody/content/application~1json/examples/callRejected","paths/call.webhook/post/requestBody/content/application~1json/examples/callTimeout","paths/call.webhook/post/requestBody/content/application~1json/examples/callHangup","paths/call.webhook/post/requestBody/content/application~1json/examples/callFailed","paths/call.webhook/post/requestBody/content/application~1json/examples/callWebhookDynamic"]}},"schemaId":"components/schemas/webhookRequest","exampleIds":["paths/call.webhook/post/requestBody/content/application~1json/examples/callIncoming","paths/call.webhook/post/requestBody/content/application~1json/examples/callAnswered","paths/call.webhook/post/requestBody/content/application~1json/examples/callBusy","paths/call.webhook/post/requestBody/content/application~1json/examples/callRejected","paths/call.webhook/post/requestBody/content/application~1json/examples/callTimeout","paths/call.webhook/post/requestBody/content/application~1json/examples/callHangup","paths/call.webhook/post/requestBody/content/application~1json/examples/callFailed","paths/call.webhook/post/requestBody/content/application~1json/examples/callWebhookDynamic"],"pointer":"/paths/call.webhook/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"webhook","method":"POST","path":"call.webhook","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[{"name":"ce-specversion","in":"header","required":true,"schemaId":"schema_1053"},{"name":"ce-type","in":"header","required":true,"schemaId":"schema_1054"},{"name":"ce-source","in":"header","required":true,"example":"projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/services/6e124178-c29d-46a5-943c-5c2ae544aade","schemaId":"schema_1055"},{"name":"ce-id","in":"header","required":true,"example":"cb0c6a68-53de-4590-94a1-6e95df89fbac","schemaId":"schema_1056"},{"name":"ce-time","in":"header","required":true,"example":"2026-04-01T12:00:00+00:00","schemaId":"schema_1057"},{"name":"x-timestamp","in":"header","required":true,"example":"2026-04-01T12:00:00.0000000Z","schemaId":"schema_1058"}],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/webhookRequest","exampleIds":["paths/call.webhook/post/requestBody/content/application~1json/examples/callIncoming","paths/call.webhook/post/requestBody/content/application~1json/examples/callAnswered","paths/call.webhook/post/requestBody/content/application~1json/examples/callBusy","paths/call.webhook/post/requestBody/content/application~1json/examples/callRejected","paths/call.webhook/post/requestBody/content/application~1json/examples/callTimeout","paths/call.webhook/post/requestBody/content/application~1json/examples/callHangup","paths/call.webhook/post/requestBody/content/application~1json/examples/callFailed","paths/call.webhook/post/requestBody/content/application~1json/examples/callWebhookDynamic"]}},"responseCodes":["200"],"pointer":"call.webhook","href":"webhooks/callwebhook","openApiOperationId":"callWebhook","summary":"Call webhook","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"isWebhook":true,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"schemaId":"components/schemas/webhookRequest","exampleIds":["paths/call.webhook/post/requestBody/content/application~1json/examples/callIncoming","paths/call.webhook/post/requestBody/content/application~1json/examples/callAnswered","paths/call.webhook/post/requestBody/content/application~1json/examples/callBusy","paths/call.webhook/post/requestBody/content/application~1json/examples/callRejected","paths/call.webhook/post/requestBody/content/application~1json/examples/callTimeout","paths/call.webhook/post/requestBody/content/application~1json/examples/callHangup","paths/call.webhook/post/requestBody/content/application~1json/examples/callFailed","paths/call.webhook/post/requestBody/content/application~1json/examples/callWebhookDynamic"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/webhookRequest","exampleIds":["paths/call.webhook/post/requestBody/content/application~1json/examples/callIncoming","paths/call.webhook/post/requestBody/content/application~1json/examples/callAnswered","paths/call.webhook/post/requestBody/content/application~1json/examples/callBusy","paths/call.webhook/post/requestBody/content/application~1json/examples/callRejected","paths/call.webhook/post/requestBody/content/application~1json/examples/callTimeout","paths/call.webhook/post/requestBody/content/application~1json/examples/callHangup","paths/call.webhook/post/requestBody/content/application~1json/examples/callFailed","paths/call.webhook/post/requestBody/content/application~1json/examples/callWebhookDynamic"]}},"examples":[{},{},{},{},{},{},{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Success. A SVAML document returned in response to a webhook."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Note:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"callName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"events"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" only take effect in responses to webhooks triggered by an incoming call. In responses to other webhook types, they are ignored."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/webhookResponse","exampleIds":["paths/call.webhook/post/responses/200/content/application~1json/examples/incomingCall","paths/call.webhook/post/responses/200/content/application~1json/examples/playMessageAndHangup"]}},"schemaId":"components/schemas/webhookResponse","exampleIds":["paths/call.webhook/post/responses/200/content/application~1json/examples/incomingCall","paths/call.webhook/post/responses/200/content/application~1json/examples/playMessageAndHangup"]}],"pointer":"/paths/call.webhook/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/webhookResponse","exampleIds":["paths/call.webhook/post/responses/200/content/application~1json/examples/incomingCall","paths/call.webhook/post/responses/200/content/application~1json/examples/playMessageAndHangup"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/webhookResponse","exampleIds":["paths/call.webhook/post/responses/200/content/application~1json/examples/incomingCall","paths/call.webhook/post/responses/200/content/application~1json/examples/playMessageAndHangup"]}}}],"isEvent":true,"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/webhooks/callwebhook"}],"panels":[]}]},"httpPath":"call.webhook"}],"content":{"contentType":"group","meta":{"name":"Webhooks"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Webhooks","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The Sinch Voice platform delivers real-time call event notifications to a configured webhook URL via HTTP POST requests."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The receiving endpoint responds with "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/voice-2.0/api-reference/svaml"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"SVAML commands"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" that control the ongoing call flow."},"children":[]}]}]}]}],"panels":[{"children":[{"kind":"group-items","title":"Webhooks","titleTranslationKey":"webhooks","items":[{"title":"call.webhook","summary":"Call webhook","prefix":{"name":"post","color":"post"},"badges":[],"link":"/webhooks/callwebhook","deprecated":false}]}]}]}]}},{"type":"separator","label":"Configuration","content":null},{"type":"group","label":"Services","link":"/docs/voice-2.0/api-reference/voice/services","routeSlug":"/docs/voice-2.0/api-reference/voice/services","items":[{"type":"link","label":"Default Services","link":"/docs/voice-2.0/api-reference/voice/services/default-services","routeSlug":"/docs/voice-2.0/api-reference/voice/services/default-services","content":{"contentType":"item","itemVariant":"markdown","meta":{"name":"Default Services"},"children":[{"nodeType":"container","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"services/default-services"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Default Services"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When a new project is created a default service is automatically generated under this project. A default cannot be deleted directly, in order to delete a default service you must first promote another service to be the default one."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When performing some Voice API operations, you may choose not to specify a serviceId, in which case the default service will be used. If you have multiple services, you can specify which one to use by providing its serviceId in the request."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If your account was created before the release of the voice API v2"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", you may not have a service created under your projects. In this case, you must create a new one and set it as the default before you can use the programmable voice product within this project. You can do this via the API or the Dashboard."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This can be useful if customers want to point a group of numbers to a particular incoming call URL, or want to record all calls for one voice service but not for the other."},"children":[]}]}]}]}],"panels":[]}]}},{"type":"link","label":"Dashboard","link":"/docs/voice-2.0/api-reference/voice/services/dashboard","routeSlug":"/docs/voice-2.0/api-reference/voice/services/dashboard","content":{"contentType":"item","itemVariant":"markdown","meta":{"name":"Dashboard"},"children":[{"nodeType":"container","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"services/dashboard"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Dashboard"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Voice services and their settings can be managed via the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://dashboard.sinch.com/voice-v2/services"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Dashboard"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}],"panels":[]}]}},{"label":"List all services of a project","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/services/listservices","routeSlug":"/docs/voice-2.0/api-reference/voice/services/listservices","metadata":{"seo":{"title":"List all services of a project","description":"Retrieve a list of voice services in the specified project."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listServices","name":"List all services of a project","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1services/get","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List all services of a project","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve a list of voice services in the specified project."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Optionally:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Filter services by partial match on name or description ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"filter"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Return only the default service ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"default=true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")"},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1services/get/parameters"},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"filter","in":"query","schemaId":"schema_1059","description":"Filter services by name or description.  Returns all services where either the name or description contains the specified value (case-insensitive partial match)."},{"name":"isDefault","in":"query","schemaId":"schema_1060","description":"Return the default service only."},{"name":"pageSize","in":"query","schemaId":"schema_1044","description":"Number of items to be returned on each page."},{"name":"page","in":"query","schemaId":"schema_1045","description":"Page number (1-based)"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1services/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/projects/{projectId}/services","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"}],"query":[{"name":"filter","in":"query","required":false,"schemaId":"schema_1059"},{"name":"isDefault","in":"query","required":false,"example":true,"schemaId":"schema_1060"},{"name":"pageSize","in":"query","required":false,"schemaId":"schema_1044"},{"name":"page","in":"query","required":false,"schemaId":"schema_1045"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","400","401","403","404","429","500"],"pointer":"/v2/projects/{projectId}/services","href":"services/listservices","openApiOperationId":"listServices","summary":"List all services of a project","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\nservices = sinch_client.voice.v2.services.list()\n\nprint(\"List of services:\\n\")\nfor service in services.iterator():\n    print(service)\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.voice.v2.services.list();\n    if (response.data.length === 0) {\n      console.log('No Voice v2 services found.');\n      return;\n    }\n    console.log(`✅ Found ${response.data.length} Voice v2 services.`);\n    response.data.forEach((service) => {\n      console.log(service);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list Voice v2 services:');\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"A list of services.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/serviceListResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services/get/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/serviceListResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services/get/responses/200/content/application~1json/example"]},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"404","description":"Resource not found.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}},"schemaId":"components/schemas/notFound"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1services/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/serviceListResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services/get/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/serviceListResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services/get/responses/200/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"404","schemaId":"components/schemas/notFound","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/services/listservices"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/services"},{"label":"Create a new voice service","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/services/createservice","routeSlug":"/docs/voice-2.0/api-reference/voice/services/createservice","metadata":{"seo":{"title":"Create a new voice service","description":"Creates a new voice service in the specified project."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createService","name":"Create a new voice service","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1services/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create a new voice service","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Creates a new voice service in the specified project."},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1services/post/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Idempotency-Key","in":"header","schemaId":"schema_1048","description":"Client-generated idempotency key to safely retry requests. The server uses this key to recognize retries of the same request. If a request with the same key is received within 10 minutes, the server returns the cached response from the original request. Using a random UUID (v4) is strongly recommended."}],"pointer":"/paths/~1v2~1projects~1{projectId}~1services/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/createService","exampleIds":["paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/webhooksExample","paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/staticExample","paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/noneExample"]}},"schemaId":"components/schemas/createService","exampleIds":["paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/webhooksExample","paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/staticExample","paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/noneExample"],"pointer":"/paths/~1v2~1projects~1{projectId}~1services/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/v2/projects/{projectId}/services","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"}],"query":[],"querystring":[],"header":[{"name":"Idempotency-Key","in":"header","required":false,"schemaId":"schema_1048"}],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/createService","exampleIds":["paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/webhooksExample","paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/staticExample","paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/noneExample"]}},"responseCodes":["201","400","401","403","409","429","500"],"pointer":"/v2/projects/{projectId}/services","href":"services/createservice","openApiOperationId":"createService","summary":"Create a new voice service","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The name of the service\nname = \"My Voice Service\"\n\nresponse = sinch_client.voice.v2.services.create(name=name)\n\nprint(f\"Successfully created service.\\n{response}\")\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.voice.v2.services.create({\n      createServiceRequestBody: {\n        name: 'Example service',\n      },\n    });\n    console.log('✅ Successfully created a Voice v2 service.');\n    console.log(`Response:\\n${JSON.stringify(response, null, 2)}`);\n  } catch (err) {\n    console.error('❌ Failed to create a Voice v2 service:');\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"schemaId":"components/schemas/createService","exampleIds":["paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/webhooksExample","paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/staticExample","paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/noneExample"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/createService","exampleIds":["paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/webhooksExample","paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/staticExample","paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/noneExample"]}},"examples":[{},{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Service created.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/serviceResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services/post/responses/201/content/application~1json/example"]}},"schemaId":"components/schemas/serviceResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services/post/responses/201/content/application~1json/example"]},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"409","description":"Resource with the same name already exists","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/conflict"}},"schemaId":"components/schemas/conflict"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1services/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/serviceResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services/post/responses/201/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/serviceResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services/post/responses/201/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"409","schemaId":"components/schemas/conflict","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/conflict"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/services/createservice"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/services"},{"label":"Retrieve a voice service by ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/services/getservice","routeSlug":"/docs/voice-2.0/api-reference/voice/services/getservice","metadata":{"seo":{"title":"Retrieve a voice service by ID","description":"Retrieve the full details of a specific voice service by its serviceId."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getService","name":"Retrieve a voice service by ID","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/get","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Retrieve a voice service by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve the full details of a specific voice service by its "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"serviceId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true},{"name":"serviceId","in":"path","schemaId":"schema_1036","description":"The ID of the service.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/projects/{projectId}/services/{serviceId}","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"},{"name":"serviceId","in":"path","required":true,"schemaId":"components/schemas/serviceId"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","400","401","403","404","429","500"],"pointer":"/v2/projects/{projectId}/services/{serviceId}","href":"services/getservice","openApiOperationId":"getService","summary":"Retrieve a voice service by ID","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The ID of the service\nservice_id = \"SERVICE_ID\"\n\nresponse = sinch_client.voice.v2.services.get(service_id=service_id)\n\nprint(f\"Successfully retrieved service details.\\n{response}\")\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The ID of the service to retrieve\n  const serviceId = 'SERVICE_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.voice.v2.services.get({\n      serviceId,\n    });\n    console.log(`✅ Successfully retrieved the Voice v2 service with ID ${serviceId}.`);\n    console.log(`Response:\\n${JSON.stringify(response, null, 2)}`);\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the Voice v2 service with ID ${serviceId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"A service object.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/serviceResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/get/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/serviceResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/get/responses/200/content/application~1json/example"]},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"404","description":"Resource not found.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}},"schemaId":"components/schemas/notFound"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/serviceResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/get/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/serviceResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/get/responses/200/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"404","schemaId":"components/schemas/notFound","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/services/getservice"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/services/{serviceId}"},{"label":"Update a voice service","deprecated":false,"httpVerb":"patch","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/services/updateservice","routeSlug":"/docs/voice-2.0/api-reference/voice/services/updateservice","metadata":{"seo":{"title":"Update a voice service","description":"Updates an existing service resource with the provided properties. Only the fields included in the request body will be modified; omitted fields remain unchanged."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"updateService","name":"Update a voice service","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update a voice service","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Updates an existing service resource with the provided properties. Only the fields included in the request body will be modified; omitted fields remain unchanged."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To set a service as the default for the project, include "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"isDefault\": true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" in the request."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Note that each project can have only one default service. Setting a new default will automatically remove the default status from the previously designated service."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"isDefault\": false"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is invalid and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"will not"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" be accepted by the API."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true},{"name":"serviceId","in":"path","schemaId":"schema_1036","description":"The ID of the service.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Idempotency-Key","in":"header","schemaId":"schema_1048","description":"Client-generated idempotency key to safely retry requests. The server uses this key to recognize retries of the same request. If a request with the same key is received within 10 minutes, the server returns the cached response from the original request. Using a random UUID (v4) is strongly recommended."}],"pointer":"/paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/updateService","exampleIds":["paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/webhooksExample","paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/staticExample","paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/noneExample"]}},"schemaId":"components/schemas/updateService","exampleIds":["paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/webhooksExample","paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/staticExample","paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/noneExample"],"pointer":"/paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PATCH","path":"/v2/projects/{projectId}/services/{serviceId}","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"},{"name":"serviceId","in":"path","required":true,"schemaId":"components/schemas/serviceId"}],"query":[],"querystring":[],"header":[{"name":"Idempotency-Key","in":"header","required":false,"schemaId":"schema_1048"}],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/updateService","exampleIds":["paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/webhooksExample","paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/staticExample","paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/noneExample"]}},"responseCodes":["200","400","401","403","404","429","500"],"pointer":"/v2/projects/{projectId}/services/{serviceId}","href":"services/updateservice","openApiOperationId":"updateService","summary":"Update a voice service","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The ID of the service\nservice_id = \"SERVICE_ID\"\n\n# The new name of the service\nname = \"Updated from Python SDK snippet\"\n\nresponse = sinch_client.voice.v2.services.update(service_id=service_id, name=name)\n\nprint(f\"Successfully updated service.\\n{response}\")\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The ID of the service to update\n  const serviceId = 'SERVICE_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.voice.v2.services.update({\n      serviceId,\n      updateServiceRequestBody: {\n        name: 'Updated service name',\n      },\n    });\n    console.log(`✅ Successfully updated the Voice v2 service with ID ${serviceId}.`);\n    console.log(`Response:\\n${JSON.stringify(response, null, 2)}`);\n  } catch (err) {\n    console.error(`❌ Failed to update the Voice v2 service with ID ${serviceId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"schemaId":"components/schemas/updateService","exampleIds":["paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/webhooksExample","paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/staticExample","paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/noneExample"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/updateService","exampleIds":["paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/webhooksExample","paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/staticExample","paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/noneExample"]}},"examples":[{},{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Service updated.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/serviceResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/serviceResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/responses/200/content/application~1json/example"]},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"404","description":"Resource not found.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}},"schemaId":"components/schemas/notFound"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/serviceResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/serviceResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/responses/200/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"404","schemaId":"components/schemas/notFound","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/services/updateservice"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/services/{serviceId}"},{"label":"Delete a voice service by ID","deprecated":false,"httpVerb":"delete","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/services/deleteservice","routeSlug":"/docs/voice-2.0/api-reference/voice/services/deleteservice","metadata":{"seo":{"title":"Delete a voice service by ID","description":"Deletes a service permanently."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"deleteService","name":"Delete a voice service by ID","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/delete","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Delete a voice service by ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Deletes a service permanently."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Important:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" The default service cannot be deleted. To delete the current default service,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"a different service must first be designated as the default using the PATCH endpoint."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true},{"name":"serviceId","in":"path","schemaId":"schema_1036","description":"The ID of the service.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/delete/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"DELETE","path":"/v2/projects/{projectId}/services/{serviceId}","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"},{"name":"serviceId","in":"path","required":true,"schemaId":"components/schemas/serviceId"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["204","400","401","403","404","429","500"],"pointer":"/v2/projects/{projectId}/services/{serviceId}","href":"services/deleteservice","openApiOperationId":"deleteService","summary":"Delete a voice service by ID","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The ID of the service\nservice_id = \"SERVICE_ID\"\n\nsinch_client.voice.v2.services.delete(service_id=service_id)\n\nprint(\"Successfully deleted service.\")\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The ID of the service to delete\n  const serviceId = 'SERVICE_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    await sinch.voice.v2.services.delete({\n      serviceId,\n    });\n    console.log(`✅ Successfully deleted the Voice v2 service with ID ${serviceId}.`);\n  } catch (err) {\n    console.error(`❌ Failed to delete the Voice v2 service with ID ${serviceId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"204","description":"Service deleted"},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication failed — token missing, invalid, or expired."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}},"schemaId":"components/schemas/unauthorized","headers":{"WWW-Authenticate":{"description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.","schema":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\""}}},"headerSchemaId":"schema_1046"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"404","description":"Resource not found.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}},"schemaId":"components/schemas/notFound"},{"code":"429","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Too many requests — rate limit exceeded."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}},"schemaId":"components/schemas/tooManyRequests","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","example":60}}},"headerSchemaId":"schema_1047"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/delete/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"204"},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"401","schemaId":"components/schemas/unauthorized","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/unauthorized"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"404","schemaId":"components/schemas/notFound","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/notFound"}}},{"code":"429","schemaId":"components/schemas/tooManyRequests","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/tooManyRequests"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/services/deleteservice"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/services/{serviceId}"}],"content":{"contentType":"group","meta":{"name":"Services"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Services","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Services represent sets of configuration values and groupings for managing calls, such as service profiles, routing rules, and project settings. Services can be created, updated, and deleted via the API to organize call flows and endpoints."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Service is the way you can manage your voice calls. Each service has its own configuration, including webhook URLs, default caller IDs, and other settings that control how calls are handled."},"children":[]}]}]}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/v2/projects/{projectId}/services","summary":"List all services of a project","prefix":{"name":"get","color":"get"},"badges":[],"link":"/services/listservices","deprecated":false},{"title":"/v2/projects/{projectId}/services","summary":"Create a new voice service","prefix":{"name":"post","color":"post"},"badges":[],"link":"/services/createservice","deprecated":false},{"title":"/v2/projects/{projectId}/services/{serviceId}","summary":"Retrieve a voice service by ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/services/getservice","deprecated":false},{"title":"/v2/projects/{projectId}/services/{serviceId}","summary":"Update a voice service","prefix":{"name":"patch","color":"patch"},"badges":[],"link":"/services/updateservice","deprecated":false},{"title":"/v2/projects/{projectId}/services/{serviceId}","summary":"Delete a voice service by ID","prefix":{"name":"delete","color":"delete"},"badges":[],"link":"/services/deleteservice","deprecated":false}]}]}]}]}},{"type":"separator","label":"Controlling Calls","content":null},{"type":"group","label":"Payloads","link":"/docs/voice-2.0/api-reference/voice/payloads","routeSlug":"/docs/voice-2.0/api-reference/voice/payloads","items":[{"label":"Describe the call flow from the SVAML payload","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/payloads/describesvaml","routeSlug":"/docs/voice-2.0/api-reference/voice/payloads/describesvaml","metadata":{"seo":{"title":"Describe the call flow from the SVAML payload","description":"This endpoint is useful for understanding the structure and flow of a SVAML payload without executing it. It provides a detailed description of the commands, events, and messages defined in the SVAML."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"describeSvaml","name":"Describe the call flow from the SVAML payload","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1svaml~1describe/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Describe the call flow from the SVAML payload","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"This endpoint is useful for understanding the structure and flow of a SVAML payload without executing it. It provides a detailed description of the commands, events, and messages defined in the SVAML."},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/describeSvamlRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/requestBody/content/application~1json/examples/basicFlow"]}},"schemaId":"components/schemas/describeSvamlRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/requestBody/content/application~1json/examples/basicFlow"],"pointer":"/paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/v2/projects/{projectId}/svaml/describe","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/describeSvamlRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/requestBody/content/application~1json/examples/basicFlow"]}},"responseCodes":["200","400","403","500"],"pointer":"/v2/projects/{projectId}/svaml/describe","href":"payloads/describesvaml","openApiOperationId":"describeSvaml","summary":"Describe the call flow from the SVAML payload","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The SVAML commands to describe\ncommands = [{\"command\": \"hangup\"}]\n\nresponse = sinch_client.voice.v2.svaml.describe(commands=commands)\n\nprint(f\"Successfully described SVAML payload.\\n{response}\")"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.voice.v2.svaml.describe({\n      describeSvamlRequestBody: {\n        svaml: {\n          commands: [\n            {\n              command: 'messages',\n              messages: [\n                {\n                  type: 'SAY',\n                  say: {\n                    text: 'Hello, your call is now connected.',\n                    voiceName: 'Emma',\n                  },\n                },\n              ],\n            },\n          ],\n        },\n      },\n    });\n    console.log('✅ Successfully described a Voice v2 SVAML payload.');\n    console.log(`Response:\\n${JSON.stringify(response, null, 2)}`);\n  } catch (err) {\n    console.error('❌ Failed to describe a Voice v2 SVAML payload:');\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"schemaId":"components/schemas/describeSvamlRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/requestBody/content/application~1json/examples/basicFlow"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/describeSvamlRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/requestBody/content/application~1json/examples/basicFlow"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"SVAML description provided","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/svamlDescriptionResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/svamlDescriptionResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/responses/200/content/application~1json/example"]},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/svamlDescriptionResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/svamlDescriptionResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/responses/200/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/payloads/describesvaml"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/svaml/describe"},{"label":"Validate a SVAML payload","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/voice-2.0/api-reference/voice/payloads/validatesvaml","routeSlug":"/docs/voice-2.0/api-reference/voice/payloads/validatesvaml","metadata":{"seo":{"title":"Validate a SVAML payload","description":"This endpoint checks the structure and content of the SVAML commands to ensure they conform to the expected schema and rules. It can operate in different validation modes, such as strict or lenient, depending on the requirements."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"validateSvaml","name":"Validate a SVAML payload","isWebhook":false,"pointer":"/paths/~1v2~1projects~1{projectId}~1svaml~1validate/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Validate a SVAML payload","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"This endpoint checks the structure and content of the SVAML commands to ensure they conform to the expected schema and rules. It can operate in different validation modes, such as strict or lenient, depending on the requirements."},{"nodeType":"security","requirements":[{"schemes":[{"name":"BasicAuth","scopes":[],"type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]}]},{"schemes":[{"name":"SinchOAuth2","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"projectId","in":"path","schemaId":"schema_1035","description":"The ID of the project.","required":true}],"pointer":"/paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/validateSvamlRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/requestBody/content/application~1json/examples/strictValidation"]}},"schemaId":"components/schemas/validateSvamlRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/requestBody/content/application~1json/examples/strictValidation"],"pointer":"/paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/v2/projects/{projectId}/svaml/validate","servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"parameters":{"path":[{"name":"projectId","in":"path","required":true,"schemaId":"components/schemas/projectId"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BasicAuth","type":"http","scheme":"basic"}],"scopes":[]},{"schemes":[{"id":"SinchOAuth2","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/validateSvamlRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/requestBody/content/application~1json/examples/strictValidation"]}},"responseCodes":["200","400","403","500"],"pointer":"/v2/projects/{projectId}/svaml/validate","href":"payloads/validatesvaml","openApiOperationId":"validateSvaml","summary":"Validate a SVAML payload","securityGroups":[{"BasicAuth":[]},{"SinchOAuth2":[]}]},"definitionSamples":[{"lang":"Python","source":"\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\n\nfrom dotenv import load_dotenv\n\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n)\n\n# The SVAML commands to validate\ncommands = [{\"command\": \"hangup\"}]\n\nresponse = sinch_client.voice.v2.svaml.validate(commands=commands)\n\nprint(f\"Successfully validated SVAML payload.\\n{response}\")\n"},{"lang":"Node.js","source":"/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.voice.v2.svaml.validate({\n      validateSvamlRequestBody: {\n        svaml: {\n          commands: [\n            {\n              command: 'messages',\n              messages: [\n                {\n                  type: 'SAY',\n                  say: {\n                    text: 'Hello, your call is now connected.',\n                    voiceName: 'Emma',\n                  },\n                },\n              ],\n            },\n          ],\n        },\n      },\n    });\n    console.log('✅ Successfully validated a Voice v2 SVAML payload.');\n    console.log(`Response:\\n${JSON.stringify(response, null, 2)}`);\n  } catch (err) {\n    console.error('❌ Failed to validate a Voice v2 SVAML payload:');\n    console.error(err);\n  }\n}\n\nmain();\n"}],"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"schemaId":"components/schemas/validateSvamlRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/requestBody/content/application~1json/examples/strictValidation"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/validateSvamlRequest","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/requestBody/content/application~1json/examples/strictValidation"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Validation performed","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/validateSvamlResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/responses/200/content/application~1json/examples/validPayload","paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/responses/200/content/application~1json/examples/invalidPayload"]}},"schemaId":"components/schemas/validateSvamlResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/responses/200/content/application~1json/examples/validPayload","paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/responses/200/content/application~1json/examples/invalidPayload"]},{"code":"400","description":"Invalid request parameters.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}},"schemaId":"components/schemas/badRequest"},{"code":"403","description":"Forbidden.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}},"schemaId":"components/schemas/forbidden"},{"code":"500","description":"Internal server error occurred.","mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}},"schemaId":"components/schemas/internalServerError"}],"pointer":"/paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/validateSvamlResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/responses/200/content/application~1json/examples/validPayload","paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/responses/200/content/application~1json/examples/invalidPayload"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/validateSvamlResponse","exampleIds":["paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/responses/200/content/application~1json/examples/validPayload","paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/responses/200/content/application~1json/examples/invalidPayload"]}}},{"code":"400","schemaId":"components/schemas/badRequest","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/badRequest"}}},{"code":"403","schemaId":"components/schemas/forbidden","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/forbidden"}}},{"code":"500","schemaId":"components/schemas/internalServerError","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"components/schemas/internalServerError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/payloads/validatesvaml"}],"panels":[]}]},"httpPath":"/v2/projects/{projectId}/svaml/validate"}],"content":{"contentType":"group","meta":{"name":"Payloads"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Payloads","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"SVAML (Sinch Voice API Markup Language) is a JSON-based markup language used to define call flows and control the behavior of voice calls in the Sinch Voice API. It allows developers to specify commands that dictate how calls are handled, including dialing, playing messages, gathering input, and more."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"SVAML is used in various contexts within the Voice API, including:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call Creation"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": When initiating outbound calls via the API."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhooks"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": When responding to call events with commands to control the ongoing call flow."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Batch Calls"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": When defining call flows for multiple calls in a batch operation."},"children":[]}]}]}]}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/v2/projects/{projectId}/svaml/describe","summary":"Describe the call flow from the SVAML payload","prefix":{"name":"post","color":"post"},"badges":[],"link":"/payloads/describesvaml","deprecated":false},{"title":"/v2/projects/{projectId}/svaml/validate","summary":"Validate a SVAML payload","prefix":{"name":"post","color":"post"},"badges":[],"link":"/payloads/validatesvaml","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/problemDetails":{"id":"components/schemas/problemDetails","kind":"json-schema","title":"Problem Details","data":{"title":"Problem Details","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Base error response schema following "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://www.rfc-editor.org/rfc/rfc9457"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"RFC 9457"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (Problem Details for HTTP APIs). All error responses use this structure."},"children":[]}]}]}],"x-category":"response","x-usage":"http-response","type":"object","additionalProperties":false,"required":["type","title","detail","instance"],"properties":{"type":{"type":"string","description":"URI that identifies the problem type and links to the corresponding error documentation."},"title":{"type":"string","description":"Human-readable short summary of the problem type."},"detail":{"type":"string","description":"Human-readable explanation of the specific problem occurrence."},"instance":{"type":"string","description":"URI reference that identifies the specific occurrence of the problem (typically the request path)."}}}},"components/schemas/unauthorized":{"id":"components/schemas/unauthorized","kind":"json-schema","title":"Unauthorized","data":{"title":"Unauthorized","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returned when authentication fails — the token is missing, invalid, or expired."},"children":[]}]}]}],"allOf":[{"$ref":"#/components/schemas/problemDetails"},{"type":"object","properties":{"type":{"const":"https://api.sinch.com/docs/errors/unauthorized"},"title":{"const":"Unauthorized"},"detail":{"example":"The token is missing, invalid, or has expired."},"instance":{"example":"/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA"}}}]}},"components/schemas/badRequest":{"id":"components/schemas/badRequest","kind":"json-schema","title":"Bad Request","data":{"title":"Bad Request","description":"Returned when the request is malformed or contains invalid parameters.","allOf":[{"$ref":"#/components/schemas/problemDetails"},{"type":"object","properties":{"type":{"const":"https://api.sinch.com/docs/errors/bad-request"},"title":{"const":"Bad Request"},"detail":{"example":"The request body is invalid or malformed."},"instance":{"example":"/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA"}}}]}},"components/schemas/conflict":{"id":"components/schemas/conflict","kind":"json-schema","title":"Conflict","data":{"title":"Conflict","description":"Returned when a resource with the same name already exists in the project.","allOf":[{"$ref":"#/components/schemas/problemDetails"},{"type":"object","properties":{"type":{"const":"https://api.sinch.com/docs/errors/conflict"},"title":{"const":"Duplicate resource name"},"detail":{"example":"A resource with the name already exists in this project."},"instance":{"example":"/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA"}}}]}},"components/schemas/paymentRequired":{"id":"components/schemas/paymentRequired","kind":"json-schema","title":"Payment Required","data":{"title":"Payment Required","description":"Returned when the account has insufficient balance or credit to complete the request.","allOf":[{"$ref":"#/components/schemas/problemDetails"},{"type":"object","properties":{"type":{"const":"https://api.sinch.com/docs/errors/payment-required"},"title":{"const":"Account Suspended"},"detail":{"example":"No available balance/credit for this billing account."},"instance":{"example":"/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA"}}}]}},"components/schemas/forbidden":{"id":"components/schemas/forbidden","kind":"json-schema","title":"Forbidden","data":{"title":"Forbidden","description":"Returned when the authenticated identity does not have permission to perform the requested operation.","allOf":[{"$ref":"#/components/schemas/problemDetails"},{"type":"object","properties":{"type":{"const":"https://api.sinch.com/docs/errors/forbidden"},"title":{"const":"Forbidden"},"detail":{"example":"The request was rejected."},"instance":{"example":"/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA"}}}]}},"components/schemas/notFound":{"id":"components/schemas/notFound","kind":"json-schema","title":"Not Found","data":{"title":"Not Found","description":"Returned when the requested resource does not exist.","allOf":[{"$ref":"#/components/schemas/problemDetails"},{"type":"object","properties":{"type":{"const":"https://api.sinch.com/docs/errors/not-found"},"title":{"const":"Not Found"},"detail":{"example":"The requested resource was not found."},"instance":{"example":"/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA"}}}]}},"components/schemas/internalServerError":{"id":"components/schemas/internalServerError","kind":"json-schema","title":"Internal Server Error","data":{"title":"Internal Server Error","description":"Returned when an unexpected error occurs on the server.","allOf":[{"$ref":"#/components/schemas/problemDetails"},{"type":"object","properties":{"type":{"const":"https://api.sinch.com/docs/errors/internal-server-error"},"title":{"const":"Internal Server Error"},"detail":{"example":"An unexpected error occurred on the server."},"instance":{"example":"/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA"}}}]}},"components/schemas/tooManyRequests":{"id":"components/schemas/tooManyRequests","kind":"json-schema","title":"Too Many Requests","data":{"title":"Too Many Requests","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returned when the request rate limit has been exceeded. Retry after the duration indicated in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Retry-After"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" response header."},"children":[]}]}]}],"allOf":[{"$ref":"#/components/schemas/problemDetails"},{"type":"object","properties":{"type":{"const":"https://api.sinch.com/docs/errors/too-many-requests"},"title":{"const":"Too Many Requests"},"detail":{"example":"Rate limit exceeded. Please slow down your request rate and retry after the indicated period."},"instance":{"example":"/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls"}}}]}},"components/schemas/call":{"id":"components/schemas/call","kind":"json-schema","title":"Call Resource","data":{"type":"object","additionalProperties":false,"title":"Call Resource","description":"Call details","required":["callId","projectId","serviceId","sessionId","direction","originationType","callType","callResult","startTime","callRate","callResourceUrl"],"properties":{"callId":{"$ref":"#/components/schemas/callId"},"projectId":{"$ref":"#/components/schemas/projectId"},"serviceId":{"$ref":"#/components/schemas/serviceId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"callName":{"type":"string","minLength":1,"maxLength":32,"pattern":"^\\S+$","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The name identifying this call leg within the session, as assigned by the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"callName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" property in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"dial"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" command or in the SVAML response to an incoming call webhook."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Omitted for calls that were not assigned a name."},"children":[]}]}]}],"example":"origin"},"bridgeName":{"type":"string","description":"The name of the bridge the call belongs to. Omitted for calls not assigned to any bridge.","example":"my-bridge"},"batchId":{"$ref":"#/components/schemas/batchId"},"from":{"$ref":"#/components/schemas/from"},"to":{"$ref":"#/components/schemas/to"},"startTime":{"type":"string","format":"date-time","description":"Timestamp (RFC 3339) indicating when the call was created and call setup was initiated (start of the call attempt).","example":"2025-01-01 00:00:00+00:00"},"updateTime":{"type":"string","format":"date-time","description":"Timestamp (RFC 3339) indicating when the call was last updated.\n\nOmitted if no updates were performed on this call.","example":"2025-01-01 00:00:00+00:00"},"callType":{"$ref":"#/components/schemas/callType"},"direction":{"$ref":"#/components/schemas/callDirection"},"answerTime":{"type":"string","format":"date-time","description":"Timestamp (RFC 3339) indicating when the call was answered.\n\nOmitted if the call was not answered.","example":"2025-01-01 00:00:00+00:00"},"endTime":{"type":"string","format":"date-time","description":"Timestamp (RFC 3339) indicating when the call ended.\n\nOmitted for ongoing calls.","example":"2025-01-01 00:00:00+00:00"},"callDurationSeconds":{"type":"integer","description":"Duration of the call in seconds","example":42},"callResult":{"$ref":"#/components/schemas/callResult"},"callReason":{"$ref":"#/components/schemas/callReason"},"originationType":{"$ref":"#/components/schemas/originationType"},"callRate":{"$ref":"#/components/schemas/money","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The rate charged for this call, expressed as a monetary amount "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"per minute"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" in the specified currency."},"children":[]}]}]}]},"callResourceUrl":{"type":"string","format":"uri","description":"Absolute URI to this call resource. Use this URL to retrieve the call details","example":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01AN4Z07BY79KA1307SR9X4MV3"}}}},"components/schemas/callBehaviors":{"id":"components/schemas/callBehaviors","kind":"json-schema","title":"Call Behaviors","data":{"x-category":"call","x-usage":"call","title":"Call Behaviors","description":"Defines how calls are handled for this service","oneOf":[{"$ref":"#/components/schemas/callBehaviorsNone"},{"$ref":"#/components/schemas/callBehaviorsWebhook"},{"$ref":"#/components/schemas/callBehaviorsStatic"}],"discriminator":{"propertyName":"type","mapping":{"NONE":"#/components/schemas/callBehaviorsNone","WEBHOOK":"#/components/schemas/callBehaviorsWebhook","STATIC":"#/components/schemas/callBehaviorsStatic"}},"examples":[{"type":"WEBHOOK","webhook":{"url":"https://example.com/webhook","fallbackUrl":"https://example.com/fallback"}}]}},"components/schemas/callBehaviorsNone":{"id":"components/schemas/callBehaviorsNone","kind":"json-schema","title":"Call Behaviors (None)","data":{"type":"object","additionalProperties":false,"title":"Call Behaviors (None)","description":"No call behavior is configured for the service. Incoming calls will not be handled and outbound calls can still be initiated via the API.","required":["type"],"properties":{"type":{"type":"string","const":"NONE","description":"No call behavior is configured."}},"examples":[{"type":"NONE"}]}},"components/schemas/callBehaviorsWebhook":{"id":"components/schemas/callBehaviorsWebhook","kind":"json-schema","title":"Call Behaviors (Webhook)","data":{"type":"object","additionalProperties":false,"title":"Call Behaviors (Webhook)","description":"Calls are handled dynamically by sending webhook events to the configured URL. The backend responds with SVAML commands that control the call flow in real time.","required":["type","webhook"],"properties":{"type":{"type":"string","const":"WEBHOOK","description":"Calls are handled by sending webhook requests to the configured URL."},"webhook":{"$ref":"#/components/schemas/webhookConfiguration"}},"examples":[{"type":"WEBHOOK","webhook":{"url":"https://example.com/webhook","fallbackUrl":"https://example.com/fallback"}}]}},"components/schemas/callBehaviorsStatic":{"id":"components/schemas/callBehaviorsStatic","kind":"json-schema","title":"Call Behaviors (Static)","data":{"type":"object","additionalProperties":false,"title":"Call Behaviors (Static)","description":"Calls are handled using a predefined static SVAML script. The commands are executed for every call on this service, without any backend involvement.","required":["type","static"],"properties":{"type":{"type":"string","const":"STATIC","description":"Calls are handled using predefined static SVAML commands."},"static":{"$ref":"#/components/schemas/svamlInput"}},"examples":[{"type":"STATIC","static":{"callName":"incoming","commands":[{"command":"pause","durationMilliseconds":5000},{"command":"hangup"}]}}]}},"components/schemas/money":{"id":"components/schemas/money","kind":"json-schema","title":"Money","data":{"title":"Money","description":"A monetary amount with an associated currency code.","type":"object","additionalProperties":false,"required":["currencyCode","amount"],"properties":{"currencyCode":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The 3-letter currency code defined in "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://www.iso.org/iso-4217-currency-codes.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"ISO 4217"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":"USD"},"amount":{"type":"string","pattern":"^\\d+(\\.\\d{1,4})?$","description":"The monetary amount as a string to preserve precision. Supports up to 4 decimal places (e.g., \"10.5000\", \"0.9999\").","example":"0.0123"}}}},"components/schemas/paginationLinks":{"id":"components/schemas/paginationLinks","kind":"json-schema","title":"Pagination Links","data":{"type":"object","additionalProperties":false,"required":["first","last","self"],"title":"Pagination Links","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Pagination links for navigating through pages of results in a paginated list response."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Available link properties:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"first"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Absolute URI of the first page"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"last"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Absolute URI of the last page"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"next"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Absolute URI of the next page (omitted if this is the last page)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"prev"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Absolute URI of the previous page (omitted if this is the first page)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"self"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - Absolute URI of the current page"},"children":[]}]}]}]}],"properties":{"first":{"type":"string","format":"uri","description":"Absolute URI of the first page.","example":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls?page=1&pageSize=20"},"last":{"type":"string","format":"uri","description":"Absolute URI of the last page.","example":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls?page=5&pageSize=20"},"next":{"type":"string","format":"uri","description":"Absolute URI of the next page (omitted if this is the last page).","example":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls?page=3&pageSize=20"},"prev":{"type":"string","format":"uri","description":"Absolute URI of the previous page (omitted if this is the first page).","example":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls?page=1&pageSize=20"},"self":{"type":"string","format":"uri","description":"Absolute URI of the current page.","example":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls?page=2&pageSize=20"}}}},"components/schemas/paginationMeta":{"id":"components/schemas/paginationMeta","kind":"json-schema","title":"Pagination Metadata","data":{"type":"object","additionalProperties":false,"required":["totalCount","pageCount"],"title":"Pagination Metadata","description":"Metadata about the paginated list response.\n","properties":{"totalCount":{"type":"integer","description":"Total number of items across all pages.","example":100},"pageCount":{"type":"integer","description":"Total number of pages.","example":5}}}},"components/schemas/callPatchRequest":{"id":"components/schemas/callPatchRequest","kind":"json-schema","title":"Call Patch Request","data":{"x-category":"call","x-usage":"call","type":"object","additionalProperties":false,"title":"Call Patch Request","description":"Request body for patching an ongoing call with SVAML commands.","required":["commands"],"properties":{"commands":{"$ref":"#/components/schemas/svamlCommands"}},"examples":[{"commands":[{"command":"hangup"}]}]}},"components/schemas/callRequest":{"id":"components/schemas/callRequest","kind":"json-schema","title":"Callout requests","data":{"x-category":"call","x-usage":"call","type":"object","additionalProperties":false,"title":"Callout requests","description":"Request payload to initiate an outbound call or a batch of outbound call sessions.\nIf parameters are provided a batch of call sessions will be initiated. BatchOptions are only valid in that mode. If not provided, default values of each batch option will be used.","required":["commands"],"properties":{"commands":{"$ref":"#/components/schemas/svamlCommands"},"parameters":{"$ref":"#/components/schemas/requestParameters"},"batchOptions":{"$ref":"#/components/schemas/batchOptions"}},"examples":[{"commands":[{"command":"dial","callName":"origin","from":{"type":"PHONE","phone":{"number":"+4673522480"}},"to":{"type":"PHONE","phone":{"number":"+4673522488"}},"dialTimeoutDurationSeconds":45,"maxCallDurationSeconds":3600,"events":{"onAnswer":[{"command":"messages","messages":[{"type":"SAY","say":{"text":"Hello, you are going to be connected to our Echo service. Say something and you should be able to hear yourself.","format":"TEXT","voiceName":"Brian"}}]},{"command":"bridgeCall","bridgeName":"bridge"},{"command":"dial","callName":"destination","to":{"type":"STREAM","stream":{"endpoint":"ws://echo/"}},"dialTimeoutDurationSeconds":45,"maxCallDurationSeconds":60,"events":{"onAnswer":[{"command":"bridgeCall","bridgeName":"bridge"}],"onHangup":[{"command":"hangup","callName":"origin"}]}}],"onHangup":[{"command":"hangup","callName":"destination"}]}}]}]}},"components/schemas/callResponse":{"id":"components/schemas/callResponse","kind":"json-schema","title":"Callout response","data":{"x-category":"call","x-usage":"call","type":"object","additionalProperties":false,"title":"Callout response","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Response returned after initiating an outbound call or a batch of call sessions."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Contains identifiers for the created session and associated project/service. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"batchId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is included only when the request started a batch operation."},"children":[]}]}]}],"required":["projectId","serviceId","sessionId"],"properties":{"projectId":{"$ref":"#/components/schemas/projectId"},"serviceId":{"$ref":"#/components/schemas/serviceId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"batchId":{"$ref":"#/components/schemas/batchId"}}}},"components/schemas/batchDetails":{"id":"components/schemas/batchDetails","kind":"json-schema","title":"Batch details","data":{"title":"Batch details","description":"Detailed per-session view of a batch call operation. Contains one entry for each call session in the batch, including the session identifier and its current execution state.","type":"object","additionalProperties":false,"required":["sessions"],"properties":{"sessions":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"ulid","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Unique identifier of the call session within the batch. This identifies the session, not an individual call. Use it with  "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v2/projects/{projectId}/sessions/{sessionId}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to retrieve full session details."},"children":[]}]}]}]},"state":{"$ref":"#/components/schemas/sessionStates"}}},"examples":[[{"id":"01F8Z5J4X2G9Y3J4X2G9Y3J4X2G9","state":"COMPLETED"},{"id":"01F8Z5J4X2G9Y3J4X2G9Y3J4X5YJ","state":"IN_PROGRESS"}]]}}}},"components/schemas/batchSummary":{"id":"components/schemas/batchSummary","kind":"json-schema","title":"Batch Summary","data":{"title":"Batch Summary","description":"Summary of a batch call operation, including counts of call sessions by state and overall progress.","type":"object","additionalProperties":false,"required":["batchId","sessionCount","queued","inProgress","completed","expired","requestedCps"],"properties":{"batchId":{"type":"string","format":"ulid","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Unique identifier of the batch call operation (ULID)."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use this value to retrieve the batch details ([GET] "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v2/projects/{projectId}/batches/{batchId}/details"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") or stop processing ([DELETE] "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/v2/projects/{projectId}/batches/{batchId}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]}]},"sessionCount":{"type":"integer","example":100,"description":"Total number of call sessions requested in this batch."},"endTime":{"type":"string","format":"date-time","description":"Timestamp (RFC 3339) when the batch finished processing (all call sessions reached a final state). Returns\n\nOmitted if the batch is still in progress or has not completed yet."},"queued":{"type":"integer","example":5,"description":"Number of call sessions that are queued and waiting to be initiated (not yet in progress)."},"inProgress":{"type":"integer","example":2,"description":"Number of call sessions that are in progress."},"completed":{"type":"integer","example":93,"description":"Number of call sessions that have completed successfully."},"expired":{"type":"integer","example":0,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Number of queued call sessions that were not initiated before the batch TTL ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ttlSeconds"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") elapsed and therefore expired."},"children":[]}]}]}]},"ttlSeconds":{"type":"integer","description":"Batch time-to-live (TTL) in seconds. The maximum amount of time the platform will keep attempting to start queued call sessions in this batch.\nWhen the TTL expires, any call sessions that have not yet been initiated will stop being processed (calls already in progress are not affected).","example":10800},"requestedCps":{"type":"integer","example":10,"description":"Requested maximum call initiation rate, in calls per second (CPS), for this batch.\nActual CPS may be lower depending on routing, carrier, and platform capacity, as well as account limitations."}}}},"components/schemas/batchStopResponse":{"id":"components/schemas/batchStopResponse","kind":"json-schema","title":"batchStopResponse","data":{"type":"object","additionalProperties":false,"properties":{"result":{"type":"string","description":"State of the batch processing cancellation request","enum":["STOP_REQUESTED"],"x-enumDescriptions":{"STOP_REQUESTED":"Batch call processing cancellation requested. No new calls will be initiated."}}}}},"components/schemas/session":{"id":"components/schemas/session","kind":"json-schema","title":"Session Resource","data":{"x-category":"session","x-usage":"session","type":"object","additionalProperties":false,"title":"Session Resource","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A session represents the complete lifecycle of a voice interaction initiated through the Voice API."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A session can contain one or more related call legs (for example, an original outbound call plus additional dials or transfers triggered by SVAML commands)."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"calls"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" array to inspect all call legs associated with the session and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"state"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to determine whether the session is still ongoing or has reached a final state."},"children":[]}]}]}],"required":["sessionId","projectId","serviceId","calls","createTime","state"],"properties":{"sessionId":{"$ref":"#/components/schemas/sessionId"},"projectId":{"$ref":"#/components/schemas/projectId"},"serviceId":{"$ref":"#/components/schemas/serviceId"},"calls":{"type":"array","items":{"$ref":"#/components/schemas/call"}},"createTime":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp (RFC 3339) indicating when the session was created.","example":"2025-01-01 00:00:00+00:00"},"updateTime":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp (RFC 3339) indicating when the session was last updated.\n\nOmitted if no updates were performed on this session.","example":"2025-01-01 00:00:00+00:00"},"endTime":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp (RFC 3339) indicating when the session ended.\n\nOmitted for ongoing sessions.","example":"2025-01-01 00:00:00+00:00"},"state":{"$ref":"#/components/schemas/sessionStates"}}}},"components/schemas/webhookRequest":{"id":"components/schemas/webhookRequest","kind":"json-schema","title":"Webhook event payload","data":{"x-category":"webhooks","x-usage":"call","type":"object","additionalProperties":false,"title":"Webhook event payload","description":"The event payload delivered to the webhook endpoint.","required":["event","call"],"properties":{"event":{"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Identifies the type of call event that triggered this webhook notification."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call-related webhook events always start with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"call."},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" followed by the type of event that triggered them. Events triggered by the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"webhook"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" SVAML command are dynamic and follow the pattern "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"call.webhook.<webhookName>"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"oneOf":[{"type":"string","enum":["call.incoming","call.answered","call.busy","call.rejected","call.timeout","call.hangup","call.failed","call.amd.human","call.amd.machine","call.amd.beep","call.amd.unknown","call.message.finished","call.recording.finished","call.recording.failed","call.menu"],"x-enumDescriptions":{"call.incoming":"Triggered when an inbound call arrives on a service configured with a webhook URL.","call.answered":"Triggered when an outbound call is answered by the recipient.","call.busy":"Triggered when the outbound call recipient is busy.","call.rejected":"Triggered when the outbound call is rejected by the recipient.","call.timeout":"Triggered when the outbound call was not answered within the dial timeout.","call.hangup":"Triggered when the call is disconnected.","call.failed":"Triggered when the call could not be set up.","call.amd.human":"Triggered when answering machine detection determines that a human answered the call.","call.amd.machine":"Triggered when answering machine detection determines that a machine answered the call.","call.amd.beep":"Triggered when answering machine detection detects a voicemail beep.","call.amd.unknown":"Triggered when answering machine detection cannot determine whether a human, machine, or beep was detected.","call.message.finished":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Triggered when all messages in a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"messages"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" sequence have finished playing."},"children":[]}]}]}],"call.recording.finished":"Triggered when a recording is successfully stopped. This event does not guarantee that the recorded file has been delivered to the configured destination yet.","call.recording.failed":"Triggered when recording could not be started.","call.menu":"Triggered when a menu completes and input is received from the user or the menu fails."}},{"type":"string","pattern":"^call\\.webhook\\.","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Dynamic event name from a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"webhook"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" SVAML command, prefixed with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"call.webhook."},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}],"example":"call.incoming"},"call":{"description":"The current state of the call at the time the event was triggered.","$ref":"#/components/schemas/call"},"menu":{"type":"object","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Information about the menu interaction that triggered the webhook, including the menu name and the input sequence received from the user."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This property is also included for webhooks triggered by the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"webhook"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" command within a menu context."},"children":[]}]}]}],"required":["menuName","input"],"properties":{"menuName":{"type":"string","description":"The name of the menu that triggered this webhook event."},"input":{"type":"string","description":"The input sequence gathered from the user by the menu."}}}}}},"components/schemas/webhookResponse":{"id":"components/schemas/webhookResponse","kind":"json-schema","title":"Webhook Response","data":{"type":"object","title":"Webhook Response","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A SVAML document returned in response to a webhook."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Note:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"callName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"events"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" only take effect in responses to webhooks triggered by an incoming call. In responses to other webhook types, they are ignored."},"children":[]}]}]}],"allOf":[{"$ref":"#/components/schemas/svamlInput"}]}},"components/schemas/callDirection":{"id":"components/schemas/callDirection","kind":"json-schema","title":"Call Direction","data":{"title":"Call Direction","type":"string","description":"Indicates the direction of the call.","enum":["INBOUND","OUTBOUND"],"x-enumDescriptions":{"INBOUND":"A call initiated towards the Sinch Calling Platform.","OUTBOUND":"A call initiated from the Sinch Calling Platform."},"examples":["OUTBOUND"]}},"components/schemas/callType":{"id":"components/schemas/callType","kind":"json-schema","title":"Call Type","data":{"title":"Call Type","x-category":"call","x-usage":"call","type":"string","description":"The type of channel used for the call.\n\nThis value indicates what kind of endpoint the call is connected to (PSTN phone number or WebSocket stream).","enum":["PHONE","SIP","STREAM","VOICE_RELAY"],"x-enumDescriptions":{"PHONE":"A call from or to the telephone network.","SIP":"A call from or to a SIP endpoint.","STREAM":"A call to a stream.","VOICE_RELAY":"A call to voice relay service."},"examples":["PHONE"]}},"components/schemas/originationType":{"id":"components/schemas/originationType","kind":"json-schema","title":"Origination Type","data":{"title":"Origination Type","x-category":"call","x-usage":"call","type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Indicates the origin/source of the call."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This describes "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"how the call was initiated"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (PSTN or via the API)."},"children":[]}]}]}],"enum":["PHONE","SIP","SERVER"],"x-enumDescriptions":{"PHONE":"The call originated from the telephone network (PSTN).","SIP":"The call originated from a SIP trunk.","SERVER":"The call originated through the Sinch API."},"examples":["PHONE"]}},"components/schemas/callEvents":{"id":"components/schemas/callEvents","kind":"json-schema","title":"Call Events Webhook","data":{"type":"object","additionalProperties":false,"title":"Call Events Webhook","description":"Webhook to handle call events, used when callBehaviors are set to WEBHOOK","properties":{"onAnswer":{"description":"SVAML commands to be executed when the call is answered","$ref":"#/components/schemas/svamlCommands"},"onBusy":{"description":"SVAML commands to be executed when the call is busy","$ref":"#/components/schemas/svamlCommands"},"onReject":{"description":"SVAML commands to be executed when the call is rejected","$ref":"#/components/schemas/svamlCommands"},"onTimeout":{"description":"SVAML commands to be executed when the call is timed out","$ref":"#/components/schemas/svamlCommands"},"onHangup":{"description":"SVAML commands to be executed when the call is hung up","$ref":"#/components/schemas/svamlCommands"},"onFailure":{"description":"SVAML commands to be executed when the call fails","$ref":"#/components/schemas/svamlCommands"}}}},"components/schemas/amdEvents":{"id":"components/schemas/amdEvents","kind":"json-schema","title":"AMD Events","data":{"type":"object","additionalProperties":false,"title":"AMD Events","description":"SVAML commands to execute based on the answering machine detection result. These events define different call flows depending on whether a human, machine, beep, or unknown entity answers the call.","properties":{"onHuman":{"description":"SVAML commands to be executed when a human is detected","$ref":"#/components/schemas/svamlCommands"},"onMachine":{"description":"SVAML commands to be executed when a machine is detected","$ref":"#/components/schemas/svamlCommands"},"onBeep":{"description":"SVAML commands to be executed when a beep is detected","$ref":"#/components/schemas/svamlCommands"},"onUnknown":{"description":"SVAML commands to be executed when an unknown event is detected","$ref":"#/components/schemas/svamlCommands"}}}},"components/schemas/messageEvents":{"id":"components/schemas/messageEvents","kind":"json-schema","title":"Message Events","data":{"type":"object","additionalProperties":false,"title":"Message Events","description":"SVAML commands to execute based on message playback outcomes.\n","properties":{"onFinish":{"description":"Commands to execute when all messages in the sequence have finished playing.\n","$ref":"#/components/schemas/svamlCommands"}}}},"components/schemas/callResult":{"id":"components/schemas/callResult","kind":"json-schema","title":"Call Result","data":{"title":"Call Result","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The outcome/state of the call."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This field includes both "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"transitional"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" states (during call setup and execution) and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"final"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" states (when the call has ended)."},"children":[]}]}]}],"type":"string","enum":["QUEUED","INITIATED","IN_PROGRESS","COMPLETED","REJECTED","NO_ANSWER","CANCEL","BUSY","FAILED"],"x-enumDescriptions":{"QUEUED":"The call is queued for initiation. This is a transitional state.","INITIATED":"The call is connecting but the recipient has not yet answered. This is a transitional state.","IN_PROGRESS":"The call has been answered and is in progress. This is a transitional state.","COMPLETED":"The call was answered and is ended. This is a final state.","REJECTED":"The call was rejected by the recipient.","NO_ANSWER":"The call was not answered by the recipient.","CANCEL":"The call was cancelled.","BUSY":"The call was not answered because the recipient was busy.","FAILED":"The call could not be completed."},"examples":["IN_PROGRESS"]}},"components/schemas/callReason":{"id":"components/schemas/callReason","kind":"json-schema","title":"Call Reason","data":{"title":"Call Reason","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Reason explaining "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"why"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" the call ended in the given "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"callResult"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"callResult"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" describes "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"what"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" happened (state/outcome). "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"callReason"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" provides additional context about the"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"underlying cause (for example, who terminated the call, routing issues, or validation errors)."},"children":[]}]}]}],"type":"string","enum":["OK","NOT_AVAILABLE","CALLER_HANGUP","CALLEE_HANGUP","MANAGER_HANGUP","DID_NOT_FOUND","INVALID_SCRIPT","UNKNOWN_PRODUCT","NO_MORE_ROUTES","ERROR"],"x-enumDescriptions":{"OK":"The call was completed successfully.","NOT_AVAILABLE":"The callee was not available.","CALLER_HANGUP":"The caller hung up the call.","CALLEE_HANGUP":"The callee hung up the call.","MANAGER_HANGUP":"The call was ended by the call manager.","DID_NOT_FOUND":"The DID number was not found.","INVALID_SCRIPT":"The SVAML script was invalid.","UNKNOWN_PRODUCT":"The product associated with the call is unknown.","NO_MORE_ROUTES":"There are no more routes to complete the call.","ERROR":"An error occurred during the call."},"examples":["OK"]}},"components/schemas/sessionStates":{"id":"components/schemas/sessionStates","kind":"json-schema","title":"Session States","data":{"title":"Session States","description":"The state of the current session. Sessions can either be in a \"transitional\" or \"final\" state.  Sessions in a transitional state are ongoing. Sessions in a final state have will not send any  more events.","readOnly":true,"type":"string","enum":["QUEUED","IN_PROGRESS","COMPLETED","EXPIRED"],"x-enumDescriptions":{"QUEUED":"The session is queued, no calls have been initiated for this session. This is a transitional state.","IN_PROGRESS":"At least one call has been initiated or received for this session. This is a transitional state.","COMPLETED":"The session was completed. This is a final state.","EXPIRED":"The call session was not initiated before the batch time-to-live (TTL) elapsed. This is a final state."},"examples":["COMPLETED"]}},"components/schemas/callId":{"id":"components/schemas/callId","kind":"json-schema","title":"Call ID","data":{"title":"Call ID","type":"string","format":"ulid","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The `Id`` of the call."},"children":[]}]}]}],"examples":["01ARZ3NDEKTSV4RRFFQ69G5FAA"]}},"components/schemas/projectId":{"id":"components/schemas/projectId","kind":"json-schema","title":"Project ID","data":{"title":"Project ID","type":"string","format":"uuid","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" of the project associated with the call."},"children":[]}]}]}],"examples":["5c5bf2b1-35ae-4825-ab89-457e07bb60e6"]}},"components/schemas/serviceId":{"id":"components/schemas/serviceId","kind":"json-schema","title":"Service ID","data":{"title":"Service ID","type":"string","format":"uuid","description":"The ID of the service used.","examples":["6e124178-c29d-46a5-943c-5c2ae544aade"]}},"components/schemas/phoneNumber":{"id":"components/schemas/phoneNumber","kind":"json-schema","title":"Phone Number","data":{"title":"Phone Number","type":"string","pattern":"^\\+[1-9]\\d{1,14}$","minLength":3,"maxLength":16,"description":"E.164 Phone number","examples":["+4673522488"]}},"components/schemas/sessionId":{"id":"components/schemas/sessionId","kind":"json-schema","title":"Session ID","data":{"title":"Session ID","type":"string","format":"ulid","description":"The ID of the session.","examples":["01BX5ZZKBKACTAV9WEVGEMMVRB"]}},"components/schemas/batchId":{"id":"components/schemas/batchId","kind":"json-schema","title":"Batch ID","data":{"title":"Batch ID","type":"string","format":"ulid","description":"The ID of the batch.","examples":["01BX5ZZKBKACTAV9WEVGEMMVRC"]}},"components/schemas/callHeaders":{"id":"components/schemas/callHeaders","kind":"json-schema","title":"callHeaders","data":{"type":"array","description":"Custom headers to be sent in the call setup.","maxItems":16,"items":{"type":"object","additionalProperties":false,"required":["key"],"properties":{"key":{"type":"string","minLength":1,"maxLength":255,"pattern":"[\\x20-\\x7e\\t]+$","description":"Name of the header.","example":"headerKey"},"value":{"type":"string","maxLength":255,"pattern":"[\\x20-\\x7e\\t]*$","description":"Value of the header.","example":"headerValue"}}},"examples":[[{"key":"headerKey","value":"headerValue"},{"key":"anotherKey","value":"anotherValue"}]]}},"components/schemas/sipCallHeaders":{"id":"components/schemas/sipCallHeaders","kind":"json-schema","title":"sipCallHeaders","data":{"type":"array","description":"Custom SIP headers to be sent in the call setup.","maxItems":16,"items":{"type":"object","additionalProperties":false,"required":["key"],"properties":{"key":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[-A-Za-z0-9.!%*_+`'~]+$","description":"Name of the SIP header.","example":"X-Correlation-Id"},"value":{"type":"string","maxLength":255,"description":"Value of the SIP header.","example":"12345"}}},"examples":[[{"key":"X-Correlation-Id","value":"12345"},{"key":"X-Call-Routing","value":"forwarded"}]]}},"components/schemas/batchOptions":{"id":"components/schemas/batchOptions","kind":"json-schema","title":"Batch Options","data":{"title":"Batch Options","type":"object","additionalProperties":false,"description":"Options for batch dialing","properties":{"maxCps":{"type":"integer","minimum":1,"maximum":1000,"default":1000,"description":"Requested maximum call initiation rate, in calls per second (CPS), for this batch.\nActual CPS may be lower depending on routing, carrier, and platform capacity, as well as account limitations."},"ttlSeconds":{"type":"integer","minimum":1,"maximum":10800,"default":10800,"description":"Batch time-to-live (TTL). The maximum amount of time the platform will keep attempting to start queued call sessions in this batch.\nWhen the TTL expires, any call sessions that have not yet been initiated will stop being processed (calls already in progress are not affected)."}},"examples":[{"maxCps":5,"ttlSeconds":90}]}},"components/schemas/from":{"id":"components/schemas/from","kind":"json-schema","title":"from","data":{"description":"Call origin - Phone Number or SIP endpoint","oneOf":[{"$ref":"#/components/schemas/phone"},{"$ref":"#/components/schemas/sipFrom"}],"discriminator":{"propertyName":"type","mapping":{"PHONE":"#/components/schemas/phone","SIP":"#/components/schemas/sipFrom"}}}},"components/schemas/to":{"id":"components/schemas/to","kind":"json-schema","title":"To","data":{"title":"To","description":"Call destination - Phone Number or Stream URI","oneOf":[{"$ref":"#/components/schemas/phone"},{"$ref":"#/components/schemas/sip"},{"$ref":"#/components/schemas/stream"},{"$ref":"#/components/schemas/voiceRelay"}],"discriminator":{"propertyName":"type","mapping":{"PHONE":"#/components/schemas/phone","SIP":"#/components/schemas/sip","STREAM":"#/components/schemas/stream","VOICE_RELAY":"#/components/schemas/voiceRelay"}}}},"components/schemas/phone":{"id":"components/schemas/phone","kind":"json-schema","title":"Phone","data":{"type":"object","additionalProperties":false,"title":"Phone","description":"Routes the call to a phone number on the Public Switched Telephone Network (PSTN).","required":["type","phone"],"properties":{"type":{"type":"string","const":"PHONE","description":"Routes the call to a phone number on the Public Switched Telephone Network (PSTN). The number must be in E.164 format."},"phone":{"type":"object","additionalProperties":false,"required":["number"],"properties":{"number":{"$ref":"#/components/schemas/phoneNumber"}}}},"examples":[{"type":"PHONE","phone":{"number":"+4673522488"}}]}},"components/schemas/sip":{"id":"components/schemas/sip","kind":"json-schema","title":"SIP Endpoint","data":{"type":"object","additionalProperties":false,"title":"SIP Endpoint","required":["type","sip"],"properties":{"type":{"type":"string","const":"SIP","description":"Routes the call to a SIP (Session Initiation Protocol) endpoint."},"sip":{"type":"object","additionalProperties":false,"required":["endpoint"],"properties":{"endpoint":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"SIP URI of the destination endpoint. Both "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"sip:"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (unencrypted) and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"sips:"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (TLS-encrypted) schemes are supported."},"children":[]}]}]}],"format":"uri","maxLength":256,"pattern":"^sips?:"},"transport":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Transport protocol to use for the SIP signalling channel."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If omitted, the platform selects a default based on the URI scheme: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"UDP"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"sip:"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"TLS"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"sips:"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Setting this explicitly overrides that default — for example, to force "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"TCP"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"sip:"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" URI or to use "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"TLS"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" without switching to the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"sips:"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" scheme."},"children":[]}]}]}],"enum":["UDP","TCP","TLS"],"x-enumDescriptions":{"UDP":"Connectionless transport. Lowest overhead; suitable for most standard SIP deployments.","TCP":"Connection-oriented transport. More reliable for large SIP messages or NAT traversal scenarios.","TLS":"Encrypted transport. Provides confidentiality and integrity for SIP signalling."}},"callHeaders":{"$ref":"#/components/schemas/sipCallHeaders"}}}},"examples":[{"type":"SIP","sip":{"endpoint":"sip:user@example.com","transport":"TCP","callHeaders":[{"key":"X-Correlation-Id","value":"12345"},{"key":"X-Call-Routing","value":"forwarded"}]}}]}},"components/schemas/sipFrom":{"id":"components/schemas/sipFrom","kind":"json-schema","title":"SIP Origin","data":{"type":"object","additionalProperties":false,"title":"SIP Origin","required":["type","sip"],"properties":{"type":{"type":"string","const":"SIP","description":"Indicates the call originated from a SIP (Session Initiation Protocol) endpoint."},"sip":{"type":"object","additionalProperties":false,"required":["endpoint"],"properties":{"endpoint":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"SIP URI of the originating endpoint. Both "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"sip:"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (unencrypted) and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"sips:"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (TLS-encrypted) schemes are supported."},"children":[]}]}]}],"format":"uri","pattern":"^sips?:","maxLength":192},"displayName":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Display name presented to the called party as the caller identity. Transmitted as the display name part of the SIP "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"From"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header (for example, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Alice <sip:alice@example.com>"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]}],"maxLength":64,"example":"Alice"}}}},"examples":[{"type":"SIP","sip":{"endpoint":"sip:user@example.com","displayName":"Alice"}}]}},"components/schemas/stream":{"id":"components/schemas/stream","kind":"json-schema","title":"Stream","data":{"type":"object","additionalProperties":false,"title":"Stream","description":"Routes the call to a WebSocket stream endpoint for real-time audio processing.","required":["type","stream"],"properties":{"type":{"type":"string","const":"STREAM","description":"Routes the call to a WebSocket stream endpoint for real-time audio processing."},"stream":{"type":"object","additionalProperties":false,"required":["endpoint"],"properties":{"endpoint":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"WebSocket endpoint that will accept the incoming connection for real-time audio streaming. Must be a valid WebSocket URL using either "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ws://"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"wss://"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (recommended). The URL must be reachable from the public internet and capable of handling the negotiated stream protocol."},"children":[]}]}]}],"example":"wss://example.com"},"streamOptions":{"type":"object","additionalProperties":false,"properties":{"version":{"type":"integer","description":"Defines the version of the stream protocol.","default":1,"example":1},"codec":{"type":"string","const":"PCM","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Defines the audio codec/format used for the stream audio payload."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Currently, only "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"PCM"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is supported (uncompressed raw audio). Use "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"sampleRate"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to configure the sampling rate for the stream."},"children":[]}]}]}]},"sampleRate":{"type":"integer","description":"Defines the audio sampling rate (Hz) used for the stream.\n\nFor calls that traverse the PSTN, audio is typically sampled at 8 kHz, so using a higher value will not improve perceived quality. \nHigher sample rates can be useful for non-PSTN scenarios (for example, SIP/streaming paths), but will increase bandwidth usage and processing load.","enum":[8000,16000,24000,44100,48000,96000],"x-enumDescriptions":{"8000":"8 kHz (standard for PSTN calls)","16000":"16 kHz (wideband audio)","24000":"24 kHz (super-wideband audio)","44100":"44.1 kHz (CD quality audio)","48000":"48 kHz (professional audio quality)","96000":"96 kHz (high-resolution audio)"},"default":8000,"example":16000}}},"callHeaders":{"$ref":"#/components/schemas/callHeaders"}},"examples":[{"endpoint":"wss://example.com","streamOptions":{"version":1,"codec":"PCM","sampleRate":8000},"callHeaders":[{"key":"my-key","value":"my-key-value"}]}]}},"examples":[{"type":"STREAM","stream":{"endpoint":"wss://example.com","streamOptions":{"version":1,"codec":"PCM","sampleRate":16000},"callHeaders":[{"key":"my-key","value":"my-key-value"}]}}]}},"components/schemas/voiceRelay":{"id":"components/schemas/voiceRelay","kind":"json-schema","title":"Voice Relay","data":{"type":"object","additionalProperties":false,"title":"Voice Relay","description":"Routes the call through the Voice Relay service, enabling real-time speech-to-text (STT) and text-to-speech (TTS) via a WebSocket connection to the application backend.","required":["type","voiceRelay"],"properties":{"type":{"type":"string","const":"VOICE_RELAY","description":"Connects to the Voice Relay service to enable STT and TTS services..."},"voiceRelay":{"type":"object","additionalProperties":false,"required":["endpoint","ttsVoice","sttLanguage"],"properties":{"endpoint":{"type":"string","format":"uri","description":"URL to the server that will accept the web-socket request","example":"wss://acme.com/agent"},"enableInterruptions":{"type":"boolean","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Allow \"barge-in\" during text-to-speech (TTS) playback."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", TTS playback is interrupted as soon as inbound speech is detected, unless the currently playing content is marked as uninterruptible."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"false"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", TTS playback continues uninterrupted, but an interruption signal is still sent over the WebSocket so the client application can choose to stop playback manually if needed."},"children":[]}]}]}],"default":true,"example":true},"ttsVoice":{"description":"Name of the voice to be used when synthesizing speech. \n\nThis is the default voice used, if no override voice is provided in the web-socket TTS message.","$ref":"#/components/schemas/voiceName"},"sttLanguage":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$","description":"BCP-47 language tag used for speech-to-text transcription of the inbound audio.\n\nThis value determines which language model is used for transcription.","example":"en-US"},"callHeaders":{"$ref":"#/components/schemas/callHeaders"}}}},"examples":[{"type":"VOICE_RELAY","voiceRelay":{"endpoint":"wss://acme.com/agent","enableInterruptions":true,"ttsVoice":"Emma","sttLanguage":"en-US","callHeaders":[{"key":"my-key","value":"my-key-value"}]}}]}},"components/schemas/typesOfMessages":{"id":"components/schemas/typesOfMessages","kind":"json-schema","title":"Message List","data":{"type":"array","title":"Message List","description":"Ordered list of messages to play.","minItems":1,"maxItems":10,"items":{"$ref":"#/components/schemas/message"}}},"components/schemas/message":{"id":"components/schemas/message","kind":"json-schema","title":"Message","data":{"type":"object","title":"Message","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A single message item. The required payload depends on "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"type"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"oneOf":[{"$ref":"#/components/schemas/messageSay"},{"$ref":"#/components/schemas/messagePlay"}],"discriminator":{"propertyName":"type","mapping":{"SAY":"#/components/schemas/messageSay","PLAY":"#/components/schemas/messagePlay"}}}},"components/schemas/messageSay":{"id":"components/schemas/messageSay","kind":"json-schema","title":"Say Message","data":{"type":"object","title":"Say Message","description":"A text-to-speech (TTS) message item. The platform synthesizes the provided text into speech and plays it on the call.","additionalProperties":false,"required":["type","say"],"properties":{"type":{"type":"string","const":"SAY","description":"Text-to-speech message to be played during the call."},"say":{"type":"object","additionalProperties":false,"title":"Say","required":["text","voiceName"],"properties":{"text":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The text to be synthesized into speech."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"format"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"TEXT"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (default), provide plain text."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"format"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"SSML"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", provide a valid SSML document (for example, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"<speak>...</speak>"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]}],"maxLength":600,"example":"Hello world"},"format":{"type":"string","description":"Format of the message","enum":["TEXT","SSML"],"x-enumDescriptions":{"TEXT":"Plain text format for the message.","SSML":"Speech Synthesis Markup Language format for advanced text-to-speech control."},"default":"TEXT"},"voiceName":{"description":"The name of the voice to use for text-to-speech synthesis.","$ref":"#/components/schemas/voiceName"}}}},"examples":[{"type":"SAY","say":{"text":"Hello, this is a test message","voiceName":"Emma"}},{"type":"SAY","say":{"text":"<speak><prosody volume=\"-6dB\">Hello, this is a test message</prosody></speak>","format":"SSML","voiceName":"Brian"}}]}},"components/schemas/messagePlay":{"id":"components/schemas/messagePlay","kind":"json-schema","title":"Play Message","data":{"type":"object","title":"Play Message","description":"An audio file playback message item. The platform fetches and plays the audio file at the provided URL on the call.","additionalProperties":false,"required":["type","play"],"properties":{"type":{"type":"string","const":"PLAY","description":"Audio file playback during the call."},"play":{"type":"object","additionalProperties":false,"title":"Play","required":["url"],"properties":{"url":{"type":"string","description":"URL of the media to send"}}}},"examples":[{"type":"PLAY","play":{"url":"https://example.com/media.mp3"}}]}},"components/schemas/requestParameters":{"id":"components/schemas/requestParameters","kind":"json-schema","title":"Command Parameter Sets","data":{"type":"array","title":"Command Parameter Sets","description":"An array of parameter objects that define values for dynamic placeholders in commands. Each object represents a set of parameters for a single queued call.\n\nUse these parameters to inject customer-defined values into your SVAML commands, enabling personalized call flows without modifying the base command structure.","items":{"$ref":"#/components/schemas/requestParameter"}}},"components/schemas/requestParameter":{"id":"components/schemas/requestParameter","kind":"json-schema","title":"Request Parameters","data":{"type":"object","maxProperties":10000,"propertyNames":{"type":"string","minLength":1,"maxLength":32},"additionalProperties":{"type":"string"},"title":"Request Parameters","description":"Dictionary of customer-defined parameters to be passed to the commands.","examples":[{"numberA":"+4564973655","numberB":"+4564973657"}]}},"components/schemas/svamlInput":{"id":"components/schemas/svamlInput","kind":"json-schema","title":"SVAML Input","data":{"type":"object","additionalProperties":false,"title":"SVAML Input","description":"A SVAML v2 (Sinch Voice Application Markup Language) document describing a call flow. Contains the ordered list of commands to execute, an optional call name, and optional event handlers.","required":["commands"],"properties":{"commands":{"allOf":[{"$ref":"#/components/schemas/svamlCommands"}],"minItems":1,"description":"The ordered list of SVAML commands to execute. Contains at least one command."},"callName":{"type":"string","minLength":1,"maxLength":32,"pattern":"^\\S+$","example":"incoming","description":"Name of the call."},"events":{"type":"object","description":"Commands to execute on specific events for this call.","properties":{"onHangup":{"$ref":"#/components/schemas/svamlCommands","description":"SVAML commands to be executed when the call is hung up."}}}}}},"components/schemas/svamlCommands":{"id":"components/schemas/svamlCommands","kind":"json-schema","title":"SVAML Commands","data":{"type":"array","title":"SVAML Commands","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"An ordered list of SVAML v2 (Sinch Voice Application Markup Language) commands that describe a call flow. Commands are executed sequentially in the order they are defined."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Blocking vs. non-blocking:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Some commands block execution until they complete ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pause"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"webhook"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"menu"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"gotoMenu"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"), while others return immediately and run in parallel ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"dial"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"messages"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"amd"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"answer"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"hangup"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"startRecording"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"stopRecording"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"bridgeCall"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"stopMessages"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"). Each command's description specifies its behavior."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Nesting scope:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Commands that appear inside event handlers (e.g., "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"dial.events.onAnswer"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"messages.events.onFinish"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") form independent sequences and execute in their own context — they are not continuations of the parent sequence."},"children":[]}]}]}],"items":{"$ref":"#/components/schemas/svamlCommand"}}},"components/schemas/svamlCommand":{"id":"components/schemas/svamlCommand","kind":"json-schema","title":"SVAML Command","data":{"title":"SVAML Command","type":"object","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A single SVAML (Sinch Voice Application Markup Language) command that controls call behavior."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"command"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" property acts as a discriminator and determines which command schema applies. When multiple commands appear in a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"svamlCommands"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" array, they execute sequentially in order."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Available commands:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"dial"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — Initiate an outbound call leg within the session."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"messages"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — Play one or more TTS or audio messages on the call."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"stopMessages"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — Stop a currently playing message sequence."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"webhook"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — Trigger a mid-call webhook to the application backend for dynamic call control."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"amd"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — Detect whether the call was answered by a human or an answering machine."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"hangup"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — End the call or a specific call leg within the session."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"answer"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — Explicitly answer an incoming call leg before executing further commands."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pause"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — Delay script execution without affecting call audio."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"startRecording"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — Begin recording the call."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"stopRecording"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — Stop an active call recording."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"bridgeCall"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — Add the call to a named bridge for multi-party audio."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"menu"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — Run menu-based input collection and route the call based on collected input."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"gotoMenu"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — Switch execution to another named menu within the current menu context."},"children":[]}]}]}]}],"oneOf":[{"$ref":"#/components/schemas/amd"},{"$ref":"#/components/schemas/dial"},{"$ref":"#/components/schemas/messages"},{"$ref":"#/components/schemas/stopMessages"},{"$ref":"#/components/schemas/webhook"},{"$ref":"#/components/schemas/hangup"},{"$ref":"#/components/schemas/answer"},{"$ref":"#/components/schemas/pause"},{"$ref":"#/components/schemas/startRecording"},{"$ref":"#/components/schemas/stopRecording"},{"$ref":"#/components/schemas/bridgeCall"},{"$ref":"#/components/schemas/menu"},{"$ref":"#/components/schemas/gotoMenu"}],"discriminator":{"propertyName":"command","mapping":{"amd":"#/components/schemas/amd","dial":"#/components/schemas/dial","messages":"#/components/schemas/messages","stopMessages":"#/components/schemas/stopMessages","webhook":"#/components/schemas/webhook","hangup":"#/components/schemas/hangup","answer":"#/components/schemas/answer","pause":"#/components/schemas/pause","startRecording":"#/components/schemas/startRecording","stopRecording":"#/components/schemas/stopRecording","bridgeCall":"#/components/schemas/bridgeCall","menu":"#/components/schemas/menu","gotoMenu":"#/components/schemas/gotoMenu"}}}},"components/schemas/dial":{"id":"components/schemas/dial","kind":"json-schema","title":"Dial","data":{"type":"object","additionalProperties":false,"title":"Dial","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Initiates a new outbound call leg within the current session."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a non-blocking command — the next command in the sequence executes immediately while the call is being established in parallel. Call lifecycle events (answer, busy, reject, timeout, hangup, failure) are handled via the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"events"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" property."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"from"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"to"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" endpoint types should ideally match. If they differ, the platform attempts to convert the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"from"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" value to be compatible with the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"to"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" type. For example, PSTN supports only E.164 phone numbers, so a SIP address such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"sip:46701234567@acme.se"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" can be converted to an E.164 number. If the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"from"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" value cannot be converted, it defaults to null (anonymous)."},"children":[]}]}]}],"required":["command","to"],"properties":{"command":{"type":"string","const":"dial","description":"Command to initiate a new call"},"callName":{"type":"string","minLength":1,"maxLength":32,"pattern":"^\\S+$","example":"outgoing","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Identifier for this call leg within the session. Must be unique across all active call legs in the session."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Other commands (e.g., "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"hangup"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") can reference this name to target this specific leg."},"children":[]}]}]}]},"from":{"$ref":"#/components/schemas/from"},"to":{"$ref":"#/components/schemas/to"},"dialTimeoutDurationSeconds":{"type":"integer","minimum":1,"maximum":60,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Maximum time in seconds to wait for the call to be answered. If the timeout expires without an answer, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"onTimeout"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" event is triggered."},"children":[]}]}]}],"example":15},"maxCallDurationSeconds":{"type":"integer","minimum":1,"maximum":14400,"description":"Maximum duration of the call in seconds. The call is terminated automatically when this limit is reached.","example":3600},"events":{"$ref":"#/components/schemas/callEvents"}},"examples":[{"command":"dial","callName":"destination","from":{"type":"PHONE","phone":{"number":"+15551234567"}},"to":{"type":"PHONE","phone":{"number":"+15559876543"}},"dialTimeoutDurationSeconds":30,"maxCallDurationSeconds":3600,"events":{"onAnswer":[{"command":"messages","messages":[{"type":"SAY","say":{"text":"Your call has connected.","voiceName":"Emma"}}]}]}}]}},"components/schemas/messages":{"id":"components/schemas/messages","kind":"json-schema","title":"Messages","data":{"type":"object","additionalProperties":false,"title":"Messages","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Plays one or more messages on the call. Multiple messages in the array are played sequentially in order."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a non-blocking command — the next command in the sequence executes immediately while messages play in parallel."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Playback outcomes are handled via the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"events"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" property. The "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"onFinish"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" event can be used to run a command after all messages complete."},"children":[]}]}]}],"required":["command","messages"],"properties":{"command":{"type":"string","const":"messages","description":"Command to play a message on the channel"},"messagesName":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Name of the message for identification and reference within the call session."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This name is used to uniquely identify the message and must be unique within the current call session."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This name can be referenced in other commands (e.g., "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"stopMessages"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") to control this specific message."},"children":[]}]}]}],"minLength":1,"maxLength":32,"pattern":"^\\S+$","example":"my-messages"},"messages":{"$ref":"#/components/schemas/typesOfMessages"},"events":{"$ref":"#/components/schemas/messageEvents"}},"examples":[{"command":"messages","messagesName":"greeting-sequence","messages":[{"type":"SAY","say":{"text":"Hello! Your call is being connected.","voiceName":"Emma"}},{"type":"PLAY","play":{"url":"https://example.com/audio/hold-music.mp3"}},{"type":"SAY","say":{"text":"<speak><prosody volume=\"-6dB\">Thank you for waiting.</prosody></speak>","format":"SSML","voiceName":"Emma"}}]}]}},"components/schemas/stopMessages":{"id":"components/schemas/stopMessages","kind":"json-schema","title":"Stop Messages","data":{"type":"object","additionalProperties":false,"title":"Stop Messages","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Stops a message sequence started by a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"messages"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" command. It will also cancel any messages with specified "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"messagesName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" that will appear in the call session in the future."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a non-blocking command."},"children":[]}]}]}],"required":["command","messagesName"],"properties":{"command":{"type":"string","const":"stopMessages","description":"Command to stop playing messages"},"messagesName":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Name of the message sequence to stop, as set by "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"messagesName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"messages"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" command."},"children":[]}]}]}],"minLength":1,"maxLength":32,"pattern":"^\\S+$"}},"examples":[{"command":"stopMessages","messagesName":"my-messages"}]}},"components/schemas/webhookFallbackUrl":{"id":"components/schemas/webhookFallbackUrl","kind":"json-schema","title":"Webhook Fallback URL","data":{"title":"Webhook Fallback URL","type":"string","format":"uri","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Fallback webhook URL used when the primary webhook URL fails."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A failed request is re-sent to this URL immediately. After repeated consecutive failures of the primary URL, requests are sent only here until the primary URL recovers."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"See "},"children":[]},{"$$mdtype":"Node","type":"em","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Timeouts and failover"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" in the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhooks"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" section for the authoritative algorithm."},"children":[]}]}]}],"examples":["https://example.com/fallback"]}},"components/schemas/webhookConfiguration":{"id":"components/schemas/webhookConfiguration","kind":"json-schema","title":"Webhook configuration","data":{"type":"object","additionalProperties":false,"title":"Webhook configuration","description":"Webhook configuration","required":["url"],"properties":{"url":{"type":"string","description":"Webhook URL","format":"uri"},"fallbackUrl":{"$ref":"#/components/schemas/webhookFallbackUrl"}},"examples":[{"url":"https://example.com/webhook","fallbackUrl":"https://example.com/fallback"}]}},"components/schemas/webhook":{"id":"components/schemas/webhook","kind":"json-schema","title":"Webhook","data":{"type":"object","additionalProperties":false,"title":"Webhook","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Triggers a mid-call webhook to the application backend, allowing it to return a new set of SVAML commands that control the remainder of the call flow."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a blocking command — execution pauses until a response is received from the webhook endpoint. The next command in the sequence runs only after the backend responds. Webhook requests use a 5-second timeout. If a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fallbackUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is provided, a failed request is re-sent to it — see "},"children":[]},{"$$mdtype":"Node","type":"em","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Timeouts and failover"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" in the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhooks"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" section for the authoritative algorithm."},"children":[]}]}]}],"required":["command","webhookName","url"],"properties":{"command":{"type":"string","const":"webhook","description":"Command to trigger a mid-call webhook"},"webhookName":{"type":"string","minLength":1,"maxLength":64,"pattern":"^\\S+$","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Name for this webhook event. When triggered, the webhook request's "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"event"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" property will contain this name prepended with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"call.webhook."},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"For example, if "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"webhookName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is set to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"my.custom.event\""},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", the event will be delivered as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"call.webhook.my.custom.event\""},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},"url":{"type":"string","description":"URL of the webhook endpoint to send the mid-call event to.","format":"uri"},"fallbackUrl":{"$ref":"#/components/schemas/webhookFallbackUrl"}},"examples":[{"command":"webhook","webhookName":"my.custom.event","url":"https://example.com/webhook","fallbackUrl":"https://example.com/fallback"}]}},"components/schemas/amd":{"id":"components/schemas/amd","kind":"json-schema","title":"Answering Machine Detection","data":{"type":"object","additionalProperties":false,"title":"Answering Machine Detection","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"AMD (Answering Machine Detection) command to detect what answered the call. Possible outcomes are: human, machine, beep, or unknown."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is a non-blocking command — the next command in the sequence executes immediately while detection runs in parallel. Results are delivered via the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"events"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" property."},"children":[]}]}]}],"required":["command"],"properties":{"command":{"type":"string","const":"amd","description":"Command to run Answering Machine Detection on the call"},"events":{"$ref":"#/components/schemas/amdEvents"}},"examples":[{"command":"amd","events":{"onHuman":[{"command":"pause","durationMilliseconds":1000},{"command":"bridgeCall","bridgeName":"my-bridge"}],"onBeep":[{"command":"messages","messagesName":"my-amd-messages","messages":[{"type":"SAY","say":{"text":"Hello, this is a test message","voiceName":"Emma"}}]}]}}]}},"components/schemas/hangup":{"id":"components/schemas/hangup","kind":"json-schema","title":"Hangup","data":{"type":"object","additionalProperties":false,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Ends a call leg. This is a non-blocking command — execution continues to the next command in the sequence even though the call has been ended. The "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"onHangup"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" event is triggered for the call leg that was ended."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Any subsequent commands that target the ended call leg (such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"messages"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or other media commands) are valid but will not be executed. Commands that operate independently — such as initiating a new call with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"dial"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — will execute normally. This makes it possible, for example, to end one call and immediately start another within the same sequence."},"children":[]}]}]}],"title":"Hangup","required":["command"],"properties":{"command":{"type":"string","const":"hangup","description":"Hangup call"},"callName":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Name of the call leg to end, as set by "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"callName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"dial"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" command."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If omitted, the current call leg is ended."},"children":[]}]}]}],"minLength":1,"maxLength":32,"pattern":"^\\S+$","example":"origin"}},"examples":[{"command":"hangup","callName":"origin"}]}},"components/schemas/answer":{"id":"components/schemas/answer","kind":"json-schema","title":"Answer","data":{"type":"object","additionalProperties":false,"title":"Answer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Answers an inbound call leg. This is a non-blocking command — execution continues to the next command in the sequence immediately after the answer is initiated."},"children":[]}]}]}],"required":["command"],"properties":{"command":{"type":"string","const":"answer","description":"Answer call"}},"examples":[{"command":"answer"}]}},"components/schemas/pause":{"id":"components/schemas/pause","kind":"json-schema","title":"Pause","data":{"type":"object","additionalProperties":false,"title":"Pause","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Delays execution of the next command in the sequence for a specified duration. This is a blocking command — no further commands execute until the pause completes."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The pause does not affect call audio; the call remains connected and audio continues uninterrupted."},"children":[]}]}]}],"required":["command","durationMilliseconds"],"properties":{"command":{"type":"string","const":"pause","description":"Pause execution."},"durationMilliseconds":{"type":"integer","minimum":1,"description":"Duration of the pause in milliseconds.","example":1000}},"examples":[{"command":"pause","durationMilliseconds":1500}]}},"components/schemas/startRecording":{"id":"components/schemas/startRecording","kind":"json-schema","title":"Start Recording","data":{"type":"object","additionalProperties":false,"title":"Start Recording","required":["command","recordingOptions"],"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Starts recording the call. This is a non-blocking command — execution continues to the next command in the sequence immediately after recording begins."},"children":[]}]}]}],"properties":{"command":{"type":"string","const":"startRecording","description":"Command to start recording on the channel"},"recordingName":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Identifier for this recording within the session. Must be unique across active recordings in the session."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Other commands (e.g., "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"stopRecording"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") reference this name to target a specific recording."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Setting the recording name is useful for stopping the recording using the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"stopRecording"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" command. If name is not set, recording can only be stopped when the call is disconnected."},"children":[]}]}]}],"minLength":1,"maxLength":32,"pattern":"^\\S+$","example":"my-recording"},"recordingOptions":{"$ref":"#/components/schemas/recordingOptions"},"events":{"$ref":"#/components/schemas/recordingEvents"}},"examples":[{"command":"startRecording","recordingName":"customer-support-recording","recordingOptions":{"format":"MP3","recordingType":"COMBINED","destination":"AWS","destinationUrl":"s3://voice-recordings-prod/calls","credentials":"accessKeyId:secretAccessKey:eu-central-1","transcriptionOptions":{"isEnabled":true,"locale":"en-US"}},"events":{"onFinish":[{"command":"hangup"}],"onFailure":[{"command":"messages","messages":[{"type":"SAY","say":{"text":"Recording could not be started for this call.","voiceName":"Emma"}}]}]}}]}},"components/schemas/recordingEvents":{"id":"components/schemas/recordingEvents","kind":"json-schema","title":"Recording Events","data":{"type":"object","additionalProperties":false,"title":"Recording Events","description":"SVAML commands to execute based on recording lifecycle outcomes.\n","properties":{"onFinish":{"description":"Commands to execute when the recording is successfully stopped. Note that this does not mean that the file is delivered to the configured destination yet.\n","$ref":"#/components/schemas/svamlCommands"},"onFailure":{"description":"Commands to execute if the recording fails to start. If omitted, failures are silently ignored and the call flow continues.\n","$ref":"#/components/schemas/svamlCommands"}}}},"components/schemas/recordingOptions":{"id":"components/schemas/recordingOptions","kind":"json-schema","title":"Recording Options","data":{"title":"Recording Options","type":"object","additionalProperties":false,"description":"Recording options for this recording.","required":["destination","destinationUrl","credentials"],"properties":{"format":{"$ref":"#/components/schemas/recordingFormat"},"recordingType":{"$ref":"#/components/schemas/recordingType"},"destination":{"$ref":"#/components/schemas/recordingDestination"},"destinationUrl":{"type":"string","description":"Destination URL for the recording.","example":"s3://voice-recordings-prod/calls"},"credentials":{"type":"string","description":"Credentials to third party storage.","example":"accessKeyId:secretAccessKey:eu-central-1"},"transcriptionOptions":{"$ref":"#/components/schemas/transcriptionOptions"}}}},"components/schemas/recordingDestination":{"id":"components/schemas/recordingDestination","kind":"json-schema","title":"Recording Destination","data":{"title":"Recording Destination","type":"string","description":"Select target service to receive recorded and transcribed files","enum":["AWS","GCP","AZURE"],"x-enumDescriptions":{"AWS":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Store recordings in Amazon Web Services S3 bucket. Use "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"s3"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" as schema for the URL."},"children":[]}]}]}],"GCP":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Store recordings in Google Cloud Platform Storage. Use "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"gs"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" as schema for the URL."},"children":[]}]}]}],"AZURE":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Store recordings in Microsoft Azure Blob Storage.  Use "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"azure"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" as schema for the URL."},"children":[]}]}]}]},"default":"AWS","examples":["AWS"]}},"components/schemas/recordingFormat":{"id":"components/schemas/recordingFormat","kind":"json-schema","title":"Recording Format","data":{"title":"Recording Format","description":"Audio format for this recording.","type":"string","enum":["MP3","WAV"],"x-enumDescriptions":{"MP3":"MPEG Audio Layer III compressed audio format.","WAV":"Waveform Audio File Format, uncompressed audio."},"default":"MP3","examples":["MP3"]}},"components/schemas/recordingType":{"id":"components/schemas/recordingType","kind":"json-schema","title":"Recording Type","data":{"title":"Recording Type","description":"The type of recording to perform.","type":"string","enum":["COMBINED","INBOUND","OUTBOUND"],"x-enumDescriptions":{"COMBINED":"Record inbound and outbound voice streams.","INBOUND":"Record inbound voice stream only.","OUTBOUND":"Record outbound voice stream only."},"default":"COMBINED"}},"components/schemas/transcriptionOptions":{"id":"components/schemas/transcriptionOptions","kind":"json-schema","title":"Transcription Options","data":{"title":"Transcription Options","description":"Configuration for automatic speech-to-text transcription of the recording.","type":"object","additionalProperties":false,"required":["isEnabled"],"properties":{"isEnabled":{"type":"boolean","description":"If true, the recording will be transcribed to text.","example":true},"locale":{"type":"string","description":"Language code in BCP-47 format.","default":"en-US","example":"en-US"}}}},"components/schemas/stopRecording":{"id":"components/schemas/stopRecording","kind":"json-schema","title":"Stop Recording","data":{"type":"object","additionalProperties":false,"title":"Stop Recording","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Stops a recording previously started by a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"startRecording"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" command. This is a non-blocking command — execution continues to the next command in the sequence immediately after the stop is initiated."},"children":[]}]}]}],"required":["command","recordingName"],"properties":{"command":{"type":"string","const":"stopRecording","description":"Command to stop recording on the channel"},"recordingName":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Name of the recording to stop, as set by "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"recordingName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"startRecording"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" command."},"children":[]}]}]}],"minLength":1,"maxLength":32,"pattern":"^\\S+$","example":"my-recording"}}}},"components/schemas/bridgeCall":{"id":"components/schemas/bridgeCall","kind":"json-schema","title":"Add call to bridge","data":{"type":"object","additionalProperties":false,"title":"Add call to bridge","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Adds the current call to a bridge, enabling bidirectional audio communication with other calls in the same session. This is a non-blocking command — execution continues to the next command in the sequence immediately after the call joins the bridge."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Bridges are created automatically when referenced by name. If a bridge with the specified name already exists, the call joins that bridge; otherwise, a new bridge is created."},"children":[]}]}]}],"required":["command","bridgeName"],"properties":{"command":{"type":"string","const":"bridgeCall","description":"Command to add the call to a bridge"},"bridgeName":{"type":"string","minLength":1,"maxLength":32,"pattern":"^\\S+$","description":"Name of the bridge to join. If no bridge with this name exists in the session, a new one is created automatically."}},"examples":[{"command":"bridgeCall","bridgeName":"my_bridge"}]}},"components/schemas/gotoMenu":{"id":"components/schemas/gotoMenu","kind":"json-schema","title":"Goto Menu","data":{"type":"object","additionalProperties":false,"title":"Goto Menu","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Switches execution to another menu within the current menu context. The menu name must be a menu defined in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"menu"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" command. This is a blocking command — execution waits for the menu to complete before proceeding to the next command."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Important"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": this command can only be called within a menu execution context."},"children":[]}]}]}],"required":["command","menuName"],"properties":{"command":{"type":"string","const":"gotoMenu","description":"Switch execution to another menu within the current menu context."},"menuName":{"type":"string","description":"Name of the target menu to execute next. Must match a key in menus.","minLength":1,"maxLength":16}}}},"components/schemas/menu":{"id":"components/schemas/menu","kind":"json-schema","title":"Run menus","data":{"type":"object","additionalProperties":false,"title":"Run menus","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Defines a set of named menus and executes them starting from startMenu. This is a blocking command — execution waits for the menu to complete before proceeding to the next command."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Each menu item configures prompts, input collection, timeout handling, and repeat behavior."},"children":[]}]}]}],"required":["command","startMenu","menus"],"properties":{"command":{"type":"string","const":"menu","description":"Executes menu-based input collection using the configured menu definitions."},"startMenu":{"type":"string","minLength":1,"maxLength":16,"description":"Name of the menu to execute first. Must match a key in menus."},"menus":{"type":"object","propertyNames":{"type":"string","maxLength":16},"description":"Map of menu definitions keyed by menu name.","additionalProperties":{"$ref":"#/components/schemas/menuItem"}}},"examples":[{"command":"menu","startMenu":"main","menus":{"main":{"prompt":{"allowBargeIn":true,"messages":[{"type":"SAY","say":{"text":"Press 1 for sales or 2 for support.","voiceName":"Emma"}}]},"repeatPrompt":{"allowBargeIn":true,"messages":[{"type":"SAY","say":{"text":"Invalid option. Press 1 for sales or 2 for support.","voiceName":"Emma"}}]},"inputTimeoutDurationSeconds":5,"repeatCount":2,"minimumInputLength":1,"maximumInputLength":1,"inputMethods":["DTMF"],"matches":{"1":[{"command":"messages","messages":[{"type":"SAY","say":{"text":"Connecting to sales.","voiceName":"Emma"}}]},{"command":"dial","callName":"sales","to":{"type":"PHONE","phone":{"number":"+15551234567"}}}],"2":[{"command":"messages","messages":[{"type":"SAY","say":{"text":"Connecting to support.","voiceName":"Emma"}}]},{"command":"dial","callName":"support","to":{"type":"PHONE","phone":{"number":"+15557654321"}}}]},"onFail":[{"command":"messages","messages":[{"type":"SAY","say":{"text":"Sorry, no valid selection was received.","voiceName":"Emma"}}]},{"command":"hangup"}]}}}]}},"components/schemas/menuPrompt":{"id":"components/schemas/menuPrompt","kind":"json-schema","title":"Menu Prompt","data":{"type":"object","additionalProperties":false,"title":"Menu Prompt","description":"Prompt configuration for menu playback, including prompt messages and barge-in behavior.","required":["messages"],"properties":{"allowBargeIn":{"type":"boolean","description":"Controls whether input can interrupt prompt playback.\n\nWhen enabled, playback stops as soon as input is detected and the input is evaluated immediately if matching conditions are met.\n\nWhen disabled, input is still collected during playback and evaluated after playback finishes.","default":true},"messages":{"$ref":"#/components/schemas/typesOfMessages"}}}},"components/schemas/menuItem":{"id":"components/schemas/menuItem","kind":"json-schema","title":"Menu Item","data":{"type":"object","additionalProperties":false,"title":"Menu Item","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Defines a single menu step, including prompts, input handling rules, input-to-command matches, and failure handling."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Each collected input is matched against the values in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"matches"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" property."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If no match succeeds, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"onFail"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" commands are executed."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If neither "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"matches"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" nor "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"onFail"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is defined and the service call behavior is set to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"WEBHOOK"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", a webhook request is sent including the collected input."},"children":[]}]}]}],"properties":{"prompt":{"$ref":"#/components/schemas/menuPrompt","description":"Prompt played when this menu starts.\n\nThis prompt is also used as the repeat prompt when repeatPrompt is not defined for the menu."},"repeatPrompt":{"$ref":"#/components/schemas/menuPrompt","description":"Prompt played when the menu is repeated.\n\nRepeats occur when input times out or when the provided input does not match any menu match item."},"inputTimeoutDurationSeconds":{"type":"integer","description":"Maximum number of seconds to wait for user input before the input attempt times out.","minimum":1,"maximum":60,"default":5,"example":10},"repeatCount":{"type":"integer","description":"Maximum number of times the menu is repeated.\n\nA repeat occurs when input times out or when the provided input does not match any menu match item.","minimum":0,"maximum":10,"default":2,"example":3},"minimumInputLength":{"type":"integer","description":"Minimum number of input characters required before the menu evaluates the collected input.","minimum":1,"maximum":100,"default":1,"example":3},"maximumInputLength":{"type":"integer","description":"Maximum number of input characters that triggers the menu to evaluate the collected input.","minimum":1,"maximum":100,"default":1,"example":10},"terminatingSequence":{"type":"string","pattern":"^[0-9*#]+$","description":"Character sequence that signals the end of input and triggers immediate evaluation.\n\nUseful when variable-length input is allowed and shorter valid options should be submitted without waiting for timeout or maximum length.\n\nThe terminating sequence value is included in the evaluated input.","maxLength":10},"inputMethods":{"type":"array","description":"Input methods accepted for this menu when collecting user input.","default":["DTMF"],"items":{"type":"string","enum":["DTMF"],"x-enumDescriptions":{"DTMF":"Collect input from keypad tones (Dual-Tone Multi-Frequency)."}}},"matches":{"type":"object","description":"Items matched against the collected input. Maximum number of allowed match expressions is 50.\n\nDefined as a dictionary where each property name is a literal or a regular expression string.\n\nValues are evaluated in the order they are defined.","maxProperties":50,"propertyNames":{"type":"string","minLength":1,"maxLength":256,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A regular expression or literal string to match against the collected user input. Must not be empty."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Property keys are evaluated sequentially in the order defined. The first key that matches the input will trigger its associated SVAML commands."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Note"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Use "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\\\\*"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to match the DTMF star tone (*)."},"children":[]}]}]}]},"additionalProperties":{"$ref":"#/components/schemas/svamlCommands"}},"onFail":{"$ref":"#/components/schemas/svamlCommands","description":"SVAML commands executed when the menu fails to collect a matching input.\n\nThis handler runs after the repeat limit is reached without any input matching a menu match item."}}}},"components/schemas/serviceResponse":{"id":"components/schemas/serviceResponse","kind":"json-schema","title":"Service Response","data":{"title":"Service Response","description":"Full representation of a voice service resource, including its configuration and call behavior.","type":"object","additionalProperties":false,"required":["serviceId","projectId","createTime","name","isDefault"],"properties":{"serviceId":{"$ref":"#/components/schemas/serviceId"},"projectId":{"$ref":"#/components/schemas/projectId"},"createTime":{"type":"string","readOnly":true,"format":"date-time","description":"Timestamp (RFC 3339) indicating when the service was created.","example":"2025-01-01 00:00:00+00:00"},"updateTime":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp (RFC 3339) indicating when the service was last updated.\n\nOmitted if no updates were performed on this service.","example":"2025-01-01 00:00:00+00:00"},"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^\\S+(\\s+\\S+)*$","description":"Voice service name. No leading or trailing whitespaces allowed.","example":"My Voice Service"},"description":{"type":"string","description":"Description of the service","example":"This is a description of my voice service"},"isDefault":{"$ref":"#/components/schemas/serviceIsDefault"},"callBehavior":{"$ref":"#/components/schemas/callBehaviors"}}}},"components/schemas/updateService":{"id":"components/schemas/updateService","kind":"json-schema","title":"Update Service","data":{"title":"Update Service","description":"Request body for updating an existing voice service. Only the fields provided will be modified; omitted fields remain unchanged.","type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^\\S+(\\s+\\S+)*$","description":"Voice service name. No leading or trailing whitespaces allowed.","example":"My Voice Service"},"description":{"type":"string","maxLength":255,"pattern":"^\\S+(\\s+\\S+)*$","description":"Description of the service","example":"This is a description of my voice service"},"isDefault":{"$ref":"#/components/schemas/serviceIsDefault"},"callBehavior":{"$ref":"#/components/schemas/callBehaviors"}},"examples":[{"description":"Updated service description","callBehavior":{"type":"WEBHOOK","webhook":{"url":"https://example.com/webhook","fallbackUrl":"https://example.com/fallback"}}}]}},"components/schemas/createService":{"id":"components/schemas/createService","kind":"json-schema","title":"Create Service","data":{"title":"Create Service","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Request body for creating a new voice service. Extends the update request with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"name"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" as a required field."},"children":[]}]}]}],"allOf":[{"$ref":"#/components/schemas/updateService"},{"type":"object","required":["name"],"examples":[{"name":"My test service","description":"New voice service","callBehavior":{"type":"WEBHOOK","webhook":{"url":"https://example.com/webhook","fallbackUrl":"https://example.com/fallback"}}}]}]}},"components/schemas/serviceIsDefault":{"id":"components/schemas/serviceIsDefault","kind":"json-schema","title":"Service Is Default","data":{"title":"Service Is Default","type":"boolean","description":"Indicates whether this service is set as the default for the project.\nThe default service is used when no specific service is specified in API requests.\nNote: when updating a service, this property cannot be set to false. In such case, a BadRequest will be returned by the API."}},"components/schemas/serviceListResponse":{"id":"components/schemas/serviceListResponse","kind":"json-schema","title":"Service List Response","data":{"type":"object","additionalProperties":false,"description":"List of available voice services in the project.","required":["services","links","meta"],"title":"Service List Response","properties":{"services":{"type":"array","items":{"$ref":"#/components/schemas/serviceShortResponse"}},"links":{"$ref":"#/components/schemas/paginationLinks"},"meta":{"$ref":"#/components/schemas/paginationMeta"}}}},"components/schemas/serviceShortResponse":{"id":"components/schemas/serviceShortResponse","kind":"json-schema","title":"Service Information","data":{"type":"object","additionalProperties":false,"description":"Abbreviated representation of a voice service, returned in list responses.","required":["serviceId","projectId","createTime","name","isDefault"],"title":"Service Information","properties":{"serviceId":{"$ref":"#/components/schemas/serviceId"},"projectId":{"$ref":"#/components/schemas/projectId"},"createTime":{"type":"string","readOnly":true,"format":"date-time","description":"Timestamp (RFC 3339) indicating when the service was created.","example":"2025-01-01 00:00:00+00:00"},"updateTime":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp (RFC 3339) indicating when the service was last updated.\n\nOmitted if no updates were performed on this service.","example":"2025-01-01 00:00:00+00:00"},"name":{"type":"string","minLength":1,"maxLength":64,"readOnly":true,"description":"Name of the service","example":"My Voice Service"},"description":{"type":"string","readOnly":true,"description":"Description of the service","example":"My Voice Service Description"},"isDefault":{"type":"boolean","readOnly":true,"description":"Indicates whether this service is set as the default for the project.\nThe default service is used when no specific service is specified in API requests.","example":true}}}},"components/schemas/validateSvamlRequest":{"id":"components/schemas/validateSvamlRequest","kind":"json-schema","title":"validateSvamlRequest","data":{"type":"object","additionalProperties":false,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Request payload for validating a SVAML document before using it in a call."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"validationType"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to control how strictly the payload is checked."},"children":[]}]}]}],"required":["svaml"],"properties":{"svaml":{"$ref":"#/components/schemas/svamlInput","description":"The SVAML payload to validate."},"validationType":{"type":"string","default":"NORMAL","description":"Controls how strictly the SVAML payload is validated.","enum":["NORMAL","STRICT"],"x-enumDescriptions":{"NORMAL":"Applies the same validation rules used when initiating a call. Unknown or extra properties are ignored.","STRICT":"Applies stricter validation rules. Returns errors for any properties that are not recognised or not expected in the given context."}}}}},"components/schemas/describeSvamlRequest":{"id":"components/schemas/describeSvamlRequest","kind":"json-schema","title":"describeSvamlRequest","data":{"type":"object","additionalProperties":false,"description":"Request payload for describing a SVAML document before using it in a call.","required":["svaml"],"properties":{"svaml":{"$ref":"#/components/schemas/svamlInput","description":"The SVAML payload to describe."}}}},"components/schemas/validateSvamlResponse":{"id":"components/schemas/validateSvamlResponse","kind":"json-schema","title":"validateSvamlResponse","data":{"type":"object","additionalProperties":false,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Result of a SVAML validation request."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The HTTP "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"200"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" status indicates the validation was successfully performed — not that the payload is valid."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Inspect "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"isValid"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to determine the outcome."},"children":[]}]}]}],"required":["isValid"],"properties":{"isValid":{"type":"boolean","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" if the submitted SVAML payload passed validation; "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"false"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" if one or more errors were found."},"children":[]}]}]}]},"errors":{"type":"array","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validation error messages describing why the SVAML payload is invalid."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Present only when "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"isValid"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"false"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Each entry identifies a specific problem, including the affected field or command where applicable."},"children":[]}]}]}],"items":{"type":"string","description":"A human-readable description of a single validation error."}}},"examples":[{"isValid":false,"errors":["Invalid dial command. Missing destination.","Invalid say command. Missing voice name.","Unknown command 'test'.","Invalid property 'test' in the dial command"]}]}},"components/schemas/svamlDescriptionResponse":{"id":"components/schemas/svamlDescriptionResponse","kind":"json-schema","title":"svamlDescriptionResponse","data":{"type":"object","additionalProperties":false,"description":"Response containing a human-readable description of the SVAML call flow.","properties":{"description":{"type":"string","description":"Human-readable description of the call flow."}},"examples":[{"description":"A new call with name 'pstn' will be initiated to number +46701234567 with max duration set to 45 minutes.\n * on answer:\n    1. A TTS message will be played using the voice Emily.\n    2. The call will be recorded.\n    3. The call will be added to the 'main' bridge\n    4. A new call with name 'stream' will be initiated to the stream endpoint wss://acme.se/\n      * on answer:\n          1. The call will be added to the 'main' bridge\n      * on hangup:\n          1. The call with name 'pstn' will be disconnected\n  * on hangup:\n      1. The call with name 'stream' will be disconnected"}]}},"components/schemas/callsList":{"id":"components/schemas/callsList","kind":"json-schema","title":"Calls List Response","data":{"type":"object","additionalProperties":false,"title":"Calls List Response","description":"List of calls.","x-category":"response","x-usage":"call","required":["calls","links","meta"],"properties":{"calls":{"type":"array","description":"Array of call resources","items":{"$ref":"#/components/schemas/call"}},"links":{"$ref":"#/components/schemas/paginationLinks"},"meta":{"$ref":"#/components/schemas/paginationMeta"}}}},"components/schemas/voiceName":{"id":"components/schemas/voiceName","kind":"json-schema","title":"voiceName","data":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Sinch Voice Name to use for text-to-speech. Each voice is tied to a specific language variant, gender, and pricing model (Free/Standard or Paid/Generative). See "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://developers.sinch.com/docs/voice-2.0/api-reference/text-to-speech-voices#currently-available-languages"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://developers.sinch.com/docs/voice-2.0/api-reference/text-to-speech-voices#text-to-speech-voices"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for details"},"children":[]}]}]}],"example":"Emma","enum":["Aarav","Aarav_2","Aarohi","Aarti","Aarti_2","Aarti_3","Aashi","Abbi","Abdullah","Abeo","Abril","Achara","Ada","Ada_2","Adam","Adam_2","Aditi","Adri","Adriano","Agnieszka","Ahmet","Aigul","Ainhoa","Alain","Alba","Aled","Aleksandar","Alessio","Alessio_2","Alex","Alfie","Ali","Alina","Alloy","Alloy_2","Alonso","Alvaro","Amal","Amala","Amanda","Amany","Amber","Ambre","Ameha","Amina","Amy","Amy_2","Amy_3","Ana","Anahit","Ananya","Ananya_2","Anbu","Ander","Andre","Andre_2","Andrea","Andres","Andrew","Andrew_2","Andrew_3","Andrew_4","Angelo","Anila","Annette","Antoine","Antonin","Antonio","Anu","Aoi","Arabella","Ardi","Aria","Aria_2","Ariane","Arjun","Arjun_2","Arjun_3","Arlet","Arnau","Arnaud","Arthur","Arya","Arya_2","Asad","Ashley","Asilia","Astrid","Athina","Ava","Ava_2","Ava_3","Avri","Ayanda","Ayanda_2","Aysha","Babek","Banu","Bashkar","Bassel","Bataa","Beatrice","Beatriz","Belkys","Bella","Benigno","Bernd","Bianca","Bianca_2","Bianca_3","Blessica","BongJin","Borislav","Brandon","Brandon_2","Bree","Brenda","Brian","Brian_2","Brian_3","Brigitte","Bryan","Bryan_2","Bryan_3","Burcu","Calimero","Camila","Camilla","Camilla_2","Camilla_3","Candela","Carla","Carlos","Carlota","Carly","Carmen","Cataldo","Catalina","Cecilio","Celeste","Celine","Celine_2","Chantal","Chanthavong","Charline","Chilemba","Christel","Christoph","Christopher","Christopher_2","Clara","Claude","Colette","Colm","Conchita","Connor","Conrad","Cora","Cora_2","Coralie","Cristiano","Daichi","Dalia","Dalia_2","Daniel","Daniel_2","Danielle","Danielle_2","Dario","Dariya","Darren","Daudi","Daulet","Davis","Davis_2","Davis_3","Dena","Denise","Derek","Dhwani","Diego","Dilara","Dimas","Dmitry","Donato","Dora","Duarte","Duncan","Dustin","Echo","Eka","Elena","Elias","Elimu","Elin","Elizabeth","Elke","Elliot","Eloise","Elsa","Elsie","Elvira","Elza","Emel","Emil","Emilio","Emily","Emma","Emma_2","Emma_3","Emma_4","Enric","Enrique","Eric","Estrella","Ethan","Evelyn","Everita","Ewa","Ewa_2","Ezinne","Fabio","Fabiola","Fable","Fabrice","Fahed","Farid","Fatima","Federico","Fenna","Fernanda","Fiamma","Filiz","Finn","Florian","Florian_2","Florin","Francisca","Freya","Gabrielle","Gabrielle_2","Gabrijela","Gadis","Gagan","Gemma","Gemma_2","Geraint","Gerard","Gerardo","Gianni","Giorgi","Giorgio","Giovanna","Gisela","Giuseppe","Giuseppe_2","Gonzalo","GookMin","Goran","Grace","Gregory","Gudrun","Gul","GulNawaz","Gunnar","Guy","Gwyneth","Hala","Hamdan","Hamed","Hannah","Hannah_2","Hans","Harri","Hayk","Hedi","Hemkala","Henri","Hila","Hillevi","HiuGaai","Hiujin","HiuMaan","HoaiMy","Hollie","HsiaoChen","HsiaoYu","Humberto","Hyunsu","Hyunsu_2","Hyunsu_3","Ida","Ilir","Iman","Imani","Imelda","Ines","Ines_2","Ingrid","InJoon","Irene","Irma","Isabella","Isabella_2","Isabella_3","Isabelle","Isabelle_2","Iselin","Isidora","Ismael","Ivy","Ivy_2","Jacek","Jacob","Jacqueline","Jajang","Jamal","James","Jan","Jane","Jane_2","Jann","Jasmine","Jasmine_2","Jason","Javier","Jean","Jenny","Jenny_2","Jenny_3","Jeppe","Jerome","Jihye","JiMin","Jimmie","Jitka","Joana","Joanna","Joanna_2","Joanna_3","Joanne","Joey","Joey_2","Jonas","Jorge","Jorge_2","Joseph","Josephine","Juan","Julio","Justin","Justin_2","Kai","Kajal","Kajal_2","Kalina","Kani","Karina","Karl","Karla","Kasper","Katja","Kavya","Kavya_2","Kazuha","Keita","Ken","Kendra","Kendra_2","Keomany","Kert","Kevin","Killian","Kim","Kimberly","Kimberly_2","Klarissa","Klaus","Kumar","Kunal","Kunal_2","Laia","Laila","Laith","Larissa","Latifa","Laura","Laura_2","Layla","Lea","Lea_2","Lea_3","Leah","Leila","Leni","Lennart","Leonas","Leticia","Lewis","Lia","Liam","Lian","Lian_2","Libby","Liberto","Lisa","Lisa_2","Lisandro","Liv","Livia","Livia_2","Lola","Lorena","Lorenzio","Lorenzo","Lotte","Louisa","Lucia","Lucia_2","Lucia_3","Luciano","Lucien","Luis","Lukas","Luke","Luna","Luna_2","Lupe","Lupe_2","Lupe_3","Maarten","Macerio","Macerio_2","Madhur","Madina","Mads","Maisie","Maja","Manohar","Manuel","Manuela","Marcello","Marcelo","Marek","Margarita","Maria","Marija","Marina","Mario","Marlene","Marta","Maryam","Masaru","Mateo","Mathieu","Matthew","Matthew_2","Matthew_3","Mattias","Maurice","Maxim","Maya","Mayu","Mekdes","Mia","Mia_2","Mia_3","Michelle","Midhun","Miguel","Mitchell","Mizuki","Moaz","Mohan","Molly","Monica","Mouna","Muuse","Nabanita","Naja","NamMinh","Nanami","Nanami_2","Nancy","Nancy_2","Naoki","Natasha","Neerja","Neerja_2","Neil","Nestoras","Nia","Niamh","Niamh_2","Nicholas","Nicholas_2","Nicolau","Nicole","Nil","Nilar","Nils","Niranjan","Niwat","Noah","Noemi","Noora","Noura","Nova","Nova_2","Nuria","Ojas","Ola","Ola_2","Oliver","Olivia","Ollie","Ollie_2","Omar","Ona","Onyx","Orla","Osman","Ostap","Pallavi","Palmira","Paloma","Paola","Pedro","Pedro_2","Pelayo","Penelope","Pernille","Petra","Phoebe","Phoebe_2","Pierina","Piseth","Polina","Prabhat","Prabhat_2","Pradeep","Premwadee","Priyom","Rafiki","Ralf","Rami","Ramona","Rana","Raquel","Raveena","Reem","Rehaan","Rehaan_2","Rehema","Remi","Remi_2","Remy","Remy_2","Renata","Ricardo","Rinaldo","Roberto","Rodrigo","Roger","Roi","Rok","Rosa","Ruben","Russell","Ruth","Ruth_2","Ryan","Ryan_2","Sabela","Sabrina","Sabrina_2","Sagar","Saleh","Salli","Salli_2","Salli_3","Salma","Salman","Salome","Sam","Sameera","Samuel","Sana","Sapna","Sara","Saranya","Sardor","Saul","Sebastian","Selma","SeoHyeon","Seoyeon","Seoyeon_2","Seoyeon_3","Seraphina","Seraphina_2","Serena","Serena_2","Sergio","Sergio_2","Shakir","Shimmer","Shiori","Shruti","Siqiniq","Siqiniq_2","Siti","Sobhana","Soffie","Sofia","Sofie","Sonia","SoonBok","Sophie","Sophie_2","Srecko","Sreymom","Steffan","Steffan_2","Steffan_3","Stephen","Stephen_2","Subhasini","Sukant","SunHi","SunHi_2","Surya","Suvi","Svetlana","Swara","Sylvie","Sylvie_2","Taim","Takumi","Takumi_2","Tamas","Tania","Tanishaa","Tanja","Taqqiq","Taqqiq_2","Tatyana","Teo","Teresa","Thalita","Thalita_2","Thalita_3","Thando","Themba","Thiago","Thierry","Thierry_2","Thiha","Thilini","Thomas","Tiana","Tiffany","Tim","Tina","Tomas","Tomoko","Tony","Triana","Tristan","Tristan_ES","Tristan_ES_2","Tuti","Tyler","Ubax","Uzma","Vaani","Valentina","Valerio","Valluvar","Venba","Vera","Vesna","Vicki","Vicki_2","Vicki_3","Victor","Viktoria","Vitoria","Vitoria_2","Vivienne","Vivienne_2","Vlasta","WanLung","Wayne","Willem","William","William_2","Xiaochen","Xiaochen_2","Xiaochen_3","Xiaochen_4","Xiaohan","Xiaohan_2","Xiaomeng","XiaoMin","Xiaomo","Xiaoqiu","Xiaorou","Xiaorui","Xiaoshuang","Xiaoshuang_2","Xiaoshuang_3","Xiaotong","Xiaoxiao","Xiaoxiao_2","Xiaoxiao_3","Xiaoxiao_4","Xiaoxiao_5","Xiaoyan","Xiaoyi","Xiaoyi_2","Xiaoyou","Xiaoyou_2","Xiaoyou_3","Xiaoyu","Xiaoyu_2","Xiaozhen","Ximena","Ximena_ES","Ximena_ES_2","Ximena_ES_3","Yago","Yan","Yara","Yashica","Yasmin","Yesui","Yolanda","YuJin","Yundeng","Yunfan","Yunfan_2","Yunfeng","Yunhan","Yunhao","YunJhe","Yunjian","Yunjie","YunSong","Yunxi","Yunxi_2","Yunxia","Yunxia_2","Yunxiang","Yunxiao","Yunxiao_2","Yunyang","Yunye","Yunye_2","Yunyi","Yunyi_2","Yunze","Yunzhe","Yves","Yvette","Zariyah","Zayd","Zeina","Zhiyu","Zhiyu_2","Zofia","Zuri"],"x-enumDescriptions":{"Aarav":"Male voice for Hindi (India) (Free voice)","Aarav_2":"Male voice for English (India) (Free voice)","Aarohi":"Female voice for Marathi (India) (Free voice)","Aarti":"Female voice for Hindi (India) (Free voice)","Aarti_2":"Female voice for English (India) (Free voice)","Aarti_3":"Female voice for English (India) (Free voice)","Aashi":"Female voice for English (India) (Free voice)","Abbi":"Female voice for English (United Kingdom) (Free voice)","Abdullah":"Male voice for Arabic (Oman) (Free voice)","Abeo":"Male voice for English (Nigeria) (Free voice)","Abril":"Female voice for Spanish (Spain) (Free voice)","Achara":"Female voice for Thai (Thailand) (Free voice)","Ada":"Female voice for English (United Kingdom) (Free voice)","Ada_2":"Female voice for English (United Kingdom) (Paid voice)","Adam":"Male voice for English (United States) (Free voice)","Adam_2":"Male voice for English (United States) (Paid voice)","Aditi":"Female voice for English (India) (Free voice)","Adri":"Female voice for Afrikaans (South Africa) (Free voice)","Adriano":"Male voice for Italian (Italy) (Free voice)","Agnieszka":"Female voice for Polish (Poland) (Free voice)","Ahmet":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Male voice for Turkish (Türkiye) (Free voice)"},"children":[]}]}]}],"Aigul":"Female voice for Kazakh (Kazakhstan) (Free voice)","Ainhoa":"Female voice for Basque (Free voice)","Alain":"Male voice for French (France) (Free voice)","Alba":"Female voice for Catalan (Free voice)","Aled":"Male voice for Welsh (United Kingdom) (Free voice)","Aleksandar":"Male voice for Macedonian (North Macedonia) (Free voice)","Alessio":"Male voice for Italian (Italy) (Free voice)","Alessio_2":"Male voice for Italian (Italy) (Paid voice)","Alex":"Male voice for Spanish (Peru) (Free voice)","Alfie":"Male voice for English (United Kingdom) (Free voice)","Ali":"Male voice for Arabic (Bahrain) (Free voice)","Alina":"Female voice for Romanian (Romania) (Free voice)","Alloy":"Male voice for English (United States) (Free voice)","Alloy_2":"Male voice for English (United States) (Paid voice)","Alonso":"Male voice for Spanish (United States) (Free voice)","Alvaro":"Male voice for Spanish (Spain) (Free voice)","Amal":"Female voice for Arabic (Qatar) (Free voice)","Amala":"Female voice for German (Germany) (Free voice)","Amanda":"Female voice for English (United States) (Free voice)","Amany":"Female voice for Arabic (Syria) (Free voice)","Amber":"Female voice for English (United States) (Free voice)","Ambre":"Female voice for French (France) (Paid voice)","Ameha":"Male voice for Amharic (Ethiopia) (Free voice)","Amina":"Female voice for Arabic (Algeria) (Free voice)","Amy":"Female voice for English (United Kingdom) (Free voice)","Amy_2":"Female voice for English (United Kingdom) (Free voice)","Amy_3":"Female voice for English (United Kingdom) (Paid voice)","Ana":"Female voice for English (United States) (Free voice)","Anahit":"Female voice for Armenian (Armenia) (Free voice)","Ananya":"Female voice for Hindi (India) (Free voice)","Ananya_2":"Female voice for English (India) (Free voice)","Anbu":"Male voice for Tamil (Singapore) (Free voice)","Ander":"Male voice for Basque (Free voice)","Andre":"Male voice for Spanish (Mexico) (Free voice)","Andre_2":"Male voice for Spanish (Mexico) (Paid voice)","Andrea":"Female voice for Spanish (Ecuador) (Free voice)","Andres":"Male voice for Spanish (Guatemala) (Free voice)","Andrew":"Male voice for English (United States) (Free voice)","Andrew_2":"Male voice for English (United States) (Free voice)","Andrew_3":"Male voice for English (United States) (Paid voice)","Andrew_4":"Male voice for English (United States) (Paid voice)","Angelo":"Male voice for Filipino (Philippines) (Free voice)","Anila":"Female voice for Albanian (Albania) (Free voice)","Annette":"Female voice for English (Australia) (Free voice)","Antoine":"Male voice for French (Canada) (Free voice)","Antonin":"Male voice for Czech (Czechia) (Free voice)","Antonio":"Male voice for Portuguese (Brazil) (Free voice)","Anu":"Female voice for Estonian (Estonia) (Free voice)","Aoi":"Female voice for Japanese (Japan) (Free voice)","Arabella":"Female voice for Spanish (Spain) (Free voice)","Ardi":"Male voice for Indonesian (Indonesia) (Free voice)","Aria":"Female voice for English (United States) (Free voice)","Aria_2":"Female voice for English (United States) (Paid voice)","Ariane":"Female voice for French (Switzerland) (Free voice)","Arjun":"Male voice for English (India) (Free voice)","Arjun_2":"Male voice for English (India) (Free voice)","Arjun_3":"Male voice for Hindi (India) (Free voice)","Arlet":"Female voice for Catalan (Free voice)","Arnau":"Male voice for Spanish (Spain) (Free voice)","Arnaud":"Male voice for Dutch (Belgium) (Free voice)","Arthur":"Male voice for English (United Kingdom) (Free voice)","Arya":"Female voice for English (New Zealand) (Free voice)","Arya_2":"Female voice for English (New Zealand) (Paid voice)","Asad":"Male voice for Urdu (Pakistan) (Free voice)","Ashley":"Female voice for English (United States) (Free voice)","Asilia":"Female voice for English (Kenya) (Free voice)","Astrid":"Female voice for Swedish (Sweden) (Free voice)","Athina":"Female voice for Greek (Greece) (Free voice)","Ava":"Female voice for English (United States) (Free voice)","Ava_2":"Female voice for English (United States) (Free voice)","Ava_3":"Female voice for English (United States) (Paid voice)","Avri":"Male voice for Hebrew (Israel) (Free voice)","Ayanda":"Female voice for English (South Africa) (Free voice)","Ayanda_2":"Female voice for English (South Africa) (Paid voice)","Aysha":"Female voice for Arabic (Oman) (Free voice)","Babek":"Male voice for Azerbaijani (Latin, Azerbaijan) (Free voice)","Banu":"Female voice for Azerbaijani (Latin, Azerbaijan) (Free voice)","Bashkar":"Male voice for Bengali (India) (Free voice)","Bassel":"Male voice for Arabic (Iraq) (Free voice)","Bataa":"Male voice for Mongolian (Mongolia) (Free voice)","Beatrice":"Female voice for Italian (Italy) (Paid voice)","Beatriz":"Female voice for Spanish (Mexico) (Free voice)","Belkys":"Female voice for Spanish (Cuba) (Free voice)","Bella":"Female voice for English (United Kingdom) (Free voice)","Benigno":"Male voice for Italian (Italy) (Free voice)","Bernd":"Male voice for German (Germany) (Free voice)","Bianca":"Female voice for Italian (Italy) (Free voice)","Bianca_2":"Female voice for Italian (Italy) (Free voice)","Bianca_3":"Female voice for Italian (Italy) (Paid voice)","Blessica":"Female voice for Filipino (Philippines) (Free voice)","BongJin":"Male voice for Korean (Korea) (Free voice)","Borislav":"Male voice for Bulgarian (Bulgaria) (Free voice)","Brandon":"Male voice for English (United States) (Free voice)","Brandon_2":"Male voice for English (United States) (Free voice)","Bree":"Female voice for English (United States) (Paid voice)","Brenda":"Female voice for Portuguese (Brazil) (Free voice)","Brian":"Male voice for English (United States) (Free voice)","Brian_2":"Male voice for English (United States) (Free voice)","Brian_3":"Male voice for English (United States) (Paid voice)","Brigitte":"Female voice for French (France) (Free voice)","Bryan":"Male voice for English (United Kingdom) (Free voice)","Bryan_2":"Male voice for English (United Kingdom) (Free voice)","Bryan_3":"Male voice for English (United Kingdom) (Paid voice)","Burcu":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Female voice for Turkish (Türkiye) (Free voice)"},"children":[]}]}]}],"Calimero":"Male voice for Italian (Italy) (Free voice)","Camila":"Female voice for Spanish (Peru) (Free voice)","Camilla":"Female voice for Portuguese (Brazil) (Free voice)","Camilla_2":"Female voice for Portuguese (Brazil) (Free voice)","Camilla_3":"Female voice for Portuguese (Brazil) (Paid voice)","Candela":"Female voice for Spanish (Mexico) (Free voice)","Carla":"Female voice for Italian (Italy) (Free voice)","Carlos":"Male voice for Spanish (Honduras) (Free voice)","Carlota":"Female voice for Spanish (Mexico) (Free voice)","Carly":"Female voice for English (Australia) (Free voice)","Carmen":"Female voice for Romanian (Romania) (Free voice)","Cataldo":"Male voice for Italian (Italy) (Free voice)","Catalina":"Female voice for Spanish (Chile) (Free voice)","Cecilio":"Male voice for Spanish (Mexico) (Free voice)","Celeste":"Female voice for French (France) (Free voice)","Celine":"Female voice for French (France) (Free voice)","Celine_2":"Female voice for French (France) (Paid voice)","Chantal":"Female voice for French (Canada) (Free voice)","Chanthavong":"Male voice for Lao (Laos) (Free voice)","Charline":"Female voice for French (Belgium) (Free voice)","Chilemba":"Male voice for English (Kenya) (Free voice)","Christel":"Female voice for Danish (Denmark) (Free voice)","Christoph":"Male voice for German (Germany) (Free voice)","Christopher":"Male voice for English (United States) (Free voice)","Christopher_2":"Male voice for English (United States) (Free voice)","Clara":"Female voice for English (Canada) (Free voice)","Claude":"Male voice for French (France) (Free voice)","Colette":"Female voice for Dutch (Netherlands) (Free voice)","Colm":"Male voice for Irish (Ireland) (Free voice)","Conchita":"Female voice for Spanish (Castilian) (Free voice)","Connor":"Male voice for English (Ireland) (Free voice)","Conrad":"Male voice for German (Germany) (Free voice)","Cora":"Female voice for English (United States) (Free voice)","Cora_2":"Female voice for English (United States) (Free voice)","Coralie":"Female voice for French (France) (Free voice)","Cristiano":"Male voice for Portuguese (Brazil) (Free voice)","Daichi":"Male voice for Japanese (Japan) (Free voice)","Dalia":"Female voice for Spanish (Mexico) (Free voice)","Dalia_2":"Female voice for Spanish (Mexico) (Free voice)","Daniel":"Male voice for German (Germany) (Free voice)","Daniel_2":"Male voice for German (Germany) (Paid voice)","Danielle":"Female voice for English (United States) (Free voice)","Danielle_2":"Female voice for English (United States) (Paid voice)","Dario":"Male voice for Spanish (Spain) (Free voice)","Dariya":"Female voice for Russian (Russia) (Free voice)","Darren":"Male voice for English (Australia) (Free voice)","Daudi":"Male voice for Swahili (Tanzania) (Free voice)","Daulet":"Male voice for Kazakh (Kazakhstan) (Free voice)","Davis":"Male voice for English (United States) (Free voice)","Davis_2":"Male voice for English (United States) (Free voice)","Davis_3":"Male voice for English (United States) (Paid voice)","Dena":"Female voice for Dutch (Belgium) (Free voice)","Denise":"Female voice for French (France) (Free voice)","Derek":"Male voice for English (United States) (Free voice)","Dhwani":"Female voice for Gujarati (India) (Free voice)","Diego":"Male voice for Italian (Italy) (Free voice)","Dilara":"Female voice for Persian (Iran) (Free voice)","Dimas":"Male voice for Javanese (Latin, Indonesia) (Free voice)","Dmitry":"Male voice for Russian (Russia) (Free voice)","Donato":"Male voice for Portuguese (Brazil) (Free voice)","Dora":"Female voice for Icelandic (Iceland) (Free voice)","Duarte":"Male voice for Portuguese (Portugal) (Free voice)","Duncan":"Male voice for English (Australia) (Free voice)","Dustin":"Male voice for English (United States) (Free voice)","Echo":"Male voice for English (United States) (Free voice)","Eka":"Female voice for Georgian (Georgia) (Free voice)","Elena":"Female voice for Spanish (Argentina) (Free voice)","Elias":"Male voice for Spanish (Spain) (Free voice)","Elimu":"Male voice for English (Tanzania) (Free voice)","Elin":"Female voice for Swedish (Sweden) (Free voice)","Elizabeth":"Female voice for English (United States) (Free voice)","Elke":"Female voice for German (Germany) (Free voice)","Elliot":"Male voice for English (United Kingdom) (Free voice)","Eloise":"Female voice for French (France) (Free voice)","Elsa":"Female voice for Italian (Italy) (Free voice)","Elsie":"Female voice for English (Australia) (Free voice)","Elvira":"Female voice for Spanish (Spain) (Free voice)","Elza":"Female voice for Portuguese (Brazil) (Free voice)","Emel":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Female voice for Turkish (Türkiye) (Free voice)"},"children":[]}]}]}],"Emil":"Male voice for Romanian (Romania) (Free voice)","Emilio":"Male voice for Spanish (Dominican Republic) (Free voice)","Emily":"Female voice for English (Ireland) (Free voice)","Emma":"Female voice for English (United States) (Free voice)","Emma_2":"Female voice for English (United States) (Free voice)","Emma_3":"Female voice for English (United States) (Paid voice)","Emma_4":"Female voice for English (United States) (Paid voice)","Enric":"Male voice for Catalan (Free voice)","Enrique":"Male voice for Spanish (Castilian) (Free voice)","Eric":"Male voice for English (United States) (Free voice)","Estrella":"Female voice for Spanish (Spain) (Free voice)","Ethan":"Male voice for English (United Kingdom) (Free voice)","Evelyn":"Female voice for English (United States) (Free voice)","Everita":"Female voice for Latvian (Latvia) (Free voice)","Ewa":"Female voice for Polish (Poland) (Free voice)","Ewa_2":"Female voice for Polish (Poland) (Paid voice)","Ezinne":"Female voice for English (Nigeria) (Free voice)","Fabio":"Male voice for Portuguese (Brazil) (Free voice)","Fabiola":"Female voice for Italian (Italy) (Free voice)","Fable":"Neutral voice for English (United States) (Free voice)","Fabrice":"Male voice for French (Switzerland) (Free voice)","Fahed":"Male voice for Arabic (Kuwait) (Free voice)","Farid":"Male voice for Persian (Iran) (Free voice)","Fatima":"Female voice for Arabic (United Arab Emirates) (Free voice)","Federico":"Male voice for Spanish (Nicaragua) (Free voice)","Fenna":"Female voice for Dutch (Netherlands) (Free voice)","Fernanda":"Female voice for Portuguese (Portugal) (Free voice)","Fiamma":"Female voice for Italian (Italy) (Free voice)","Filiz":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Female voice for Turkish (Türkiye) (Free voice)"},"children":[]}]}]}],"Finn":"Male voice for Norwegian (Norway) (Free voice)","Florian":"Male voice for German (Germany) (Free voice)","Florian_2":"Male voice for German (Germany) (Paid voice)","Florin":"Male voice for French (France) (Paid voice)","Francisca":"Female voice for Portuguese (Brazil) (Free voice)","Freya":"Female voice for English (Australia) (Free voice)","Gabrielle":"Female voice for French (Canada) (Free voice)","Gabrielle_2":"Female voice for French (Canada) (Paid voice)","Gabrijela":"Female voice for Croatian (Croatia) (Free voice)","Gadis":"Female voice for Indonesian (Indonesia) (Free voice)","Gagan":"Male voice for Kannada (India) (Free voice)","Gemma":"Female voice for English (United Kingdom) (Free voice)","Gemma_2":"Female voice for English (United Kingdom) (Free voice)","Geraint":"Male voice for Welsh (United Kingdom) (Free voice)","Gerard":"Male voice for French (Belgium) (Free voice)","Gerardo":"Male voice for Spanish (Mexico) (Free voice)","Gianni":"Male voice for Italian (Italy) (Free voice)","Giorgi":"Male voice for Georgian (Georgia) (Free voice)","Giorgio":"Male voice for Italian (Italy) (Free voice)","Giovanna":"Female voice for Portuguese (Brazil) (Free voice)","Gisela":"Female voice for German (Germany) (Free voice)","Giuseppe":"Male voice for Italian (Italy) (Free voice)","Giuseppe_2":"Male voice for Italian (Italy) (Free voice)","Gonzalo":"Male voice for Spanish (Colombia) (Free voice)","GookMin":"Male voice for Korean (Korea) (Free voice)","Goran":"Male voice for Bosnian (Bosnia and Herzegovina) (Free voice)","Grace":"Female voice for Maltese (Malta) (Free voice)","Gregory":"Male voice for English (United States) (Free voice)","Gudrun":"Female voice for Icelandic (Iceland) (Free voice)","Gul":"Female voice for Urdu (India) (Free voice)","GulNawaz":"Male voice for Pashto (Afghanistan) (Free voice)","Gunnar":"Male voice for Icelandic (Iceland) (Free voice)","Guy":"Male voice for English (United States) (Free voice)","Gwyneth":"Female voice for Welsh (United Kingdom) (Free voice)","Hala":"Female voice for Arabic (Saudi Arabia) (Free voice)","Hamdan":"Male voice for Arabic (United Arab Emirates) (Free voice)","Hamed":"Male voice for Arabic (Saudi Arabia) (Free voice)","Hannah":"Female voice for German (Austria) (Free voice)","Hannah_2":"Female voice for German (Austria) (Paid voice)","Hans":"Male voice for German (Germany) (Free voice)","Harri":"Male voice for Finnish (Finland) (Free voice)","Hayk":"Male voice for Armenian (Armenia) (Free voice)","Hedi":"Male voice for Arabic (Tunisia) (Free voice)","Hemkala":"Female voice for Nepali (Nepal) (Free voice)","Henri":"Male voice for French (France) (Free voice)","Hila":"Female voice for Hebrew (Israel) (Free voice)","Hillevi":"Female voice for Swedish (Sweden) (Free voice)","HiuGaai":"Female voice for Chinese (Cantonese, Traditional) (Free voice)","Hiujin":"Female voice for Chinese (Cantonese) (Free voice)","HiuMaan":"Female voice for Chinese (Cantonese, Traditional) (Free voice)","HoaiMy":"Female voice for Vietnamese (Vietnam) (Free voice)","Hollie":"Female voice for English (United Kingdom) (Free voice)","HsiaoChen":"Female voice for Chinese (Taiwanese Mandarin, Traditional) (Free voice)","HsiaoYu":"Female voice for Chinese (Taiwanese Mandarin, Traditional) (Free voice)","Humberto":"Male voice for Portuguese (Brazil) (Free voice)","Hyunsu":"Male voice for Korean (Korea) (Free voice)","Hyunsu_2":"Male voice for Korean (Korea) (Free voice)","Hyunsu_3":"Male voice for Korean (Korea) (Paid voice)","Ida":"Female voice for Norwegian (Norway) (Free voice)","Ilir":"Male voice for Albanian (Albania) (Free voice)","Iman":"Female voice for Arabic (Libya) (Free voice)","Imani":"Female voice for English (Tanzania) (Free voice)","Imelda":"Female voice for Italian (Italy) (Free voice)","Ines":"Female voice for Portuguese (Brazil) (Free voice)","Ines_2":"Female voice for Portuguese (Brazil) (Free voice)","Ingrid":"Female voice for German (Austria) (Free voice)","InJoon":"Male voice for Korean (Korea) (Free voice)","Irene":"Female voice for Spanish (Spain) (Free voice)","Irma":"Female voice for Italian (Italy) (Free voice)","Isabella":"Female voice for Italian (Italy) (Free voice)","Isabella_2":"Female voice for Italian (Italy) (Free voice)","Isabella_3":"Female voice for Italian (Italy) (Paid voice)","Isabelle":"Female voice for French (Belgium) (Free voice)","Isabelle_2":"Female voice for French (Belgium) (Paid voice)","Iselin":"Female voice for Norwegian (Norway) (Free voice)","Isidora":"Female voice for Spanish (Spain) (Free voice)","Ismael":"Male voice for Arabic (Algeria) (Free voice)","Ivy":"Female voice for English (United States) (Free voice)","Ivy_2":"Female voice for English (United States) (Free voice)","Jacek":"Male voice for Polish (Poland) (Free voice)","Jacob":"Male voice for English (United States) (Free voice)","Jacqueline":"Female voice for French (France) (Free voice)","Jajang":"Male voice for Sundanese (Indonesia) (Free voice)","Jamal":"Male voice for Arabic (Morocco) (Free voice)","James":"Male voice for English (Philippines) (Free voice)","Jan":"Male voice for German (Switzerland) (Free voice)","Jane":"Female voice for English (United States) (Free voice)","Jane_2":"Female voice for English (United States) (Paid voice)","Jann":"Male voice for Polish (Poland) (Free voice)","Jasmine":"Female voice for English (Singapore) (Free voice)","Jasmine_2":"Female voice for English (Singapore) (Paid voice)","Jason":"Male voice for English (United States) (Free voice)","Javier":"Male voice for Spanish (Equatorial Guinea) (Free voice)","Jean":"Male voice for French (Canada) (Free voice)","Jenny":"Female voice for English (United States) (Free voice)","Jenny_2":"Female voice for English (United States) (Free voice)","Jenny_3":"Female voice for English (United States) (Paid voice)","Jeppe":"Male voice for Danish (Denmark) (Free voice)","Jerome":"Male voice for French (France) (Free voice)","Jihye":"Female voice for Korean (Korea) (Free voice)","JiMin":"Female voice for Korean (Korea) (Free voice)","Jimmie":"Male voice for English (United States) (Free voice)","Jitka":"Female voice for Czech (Czechia) (Free voice)","Joana":"Female voice for Catalan (Free voice)","Joanna":"Female voice for English (United States) (Free voice)","Joanna_2":"Female voice for English (United States) (Free voice)","Joanna_3":"Female voice for English (United States) (Paid voice)","Joanne":"Female voice for English (Australia) (Free voice)","Joey":"Male voice for English (United States) (Free voice)","Joey_2":"Male voice for English (United States) (Free voice)","Jonas":"Male voice for German (Austria) (Free voice)","Jorge":"Male voice for Spanish (Mexico) (Free voice)","Jorge_2":"Male voice for Spanish (Mexico) (Free voice)","Joseph":"Male voice for Maltese (Malta) (Free voice)","Josephine":"Female voice for French (France) (Free voice)","Juan":"Male voice for Spanish (Costa Rica) (Free voice)","Julio":"Male voice for Portuguese (Brazil) (Free voice)","Justin":"Male voice for English (United States) (Free voice)","Justin_2":"Male voice for English (United States) (Free voice)","Kai":"Male voice for English (United States) (Free voice)","Kajal":"Female voice for English (India) (Free voice)","Kajal_2":"Female voice for English (India) (Paid voice)","Kalina":"Female voice for Bulgarian (Bulgaria) (Free voice)","Kani":"Female voice for Tamil (Malaysia) (Free voice)","Karina":"Female voice for Spanish (Puerto Rico) (Free voice)","Karl":"Male voice for Icelandic (Iceland) (Free voice)","Karla":"Female voice for Spanish (Honduras) (Free voice)","Kasper":"Male voice for German (Germany) (Free voice)","Katja":"Female voice for German (Germany) (Free voice)","Kavya":"Female voice for Hindi (India) (Free voice)","Kavya_2":"Female voice for English (India) (Free voice)","Kazuha":"Female voice for Japanese (Japan) (Free voice)","Keita":"Male voice for Japanese (Japan) (Free voice)","Ken":"Male voice for English (Australia) (Free voice)","Kendra":"Female voice for English (United States) (Free voice)","Kendra_2":"Female voice for English (United States) (Free voice)","Keomany":"Female voice for Lao (Laos) (Free voice)","Kert":"Male voice for Estonian (Estonia) (Free voice)","Kevin":"Male voice for English (United States) (Free voice)","Killian":"Male voice for German (Germany) (Free voice)","Kim":"Female voice for English (Australia) (Free voice)","Kimberly":"Female voice for English (United States) (Free voice)","Kimberly_2":"Female voice for English (United States) (Free voice)","Klarissa":"Female voice for German (Germany) (Free voice)","Klaus":"Male voice for German (Germany) (Free voice)","Kumar":"Male voice for Tamil (Sri Lanka) (Free voice)","Kunal":"Male voice for Hindi (India) (Free voice)","Kunal_2":"Male voice for English (India) (Free voice)","Laia":"Female voice for Spanish (Spain) (Free voice)","Laila":"Female voice for Arabic (Bahrain) (Free voice)","Laith":"Male voice for Arabic (Syria) (Free voice)","Larissa":"Female voice for Spanish (Mexico) (Free voice)","Latifa":"Female voice for Pashto (Afghanistan) (Free voice)","Laura":"Female voice for Dutch (Netherlands) (Free voice)","Laura_2":"Female voice for Dutch (Netherlands) (Paid voice)","Layla":"Female voice for Arabic (Lebanon) (Free voice)","Lea":"Female voice for French (France) (Free voice)","Lea_2":"Female voice for French (France) (Free voice)","Lea_3":"Female voice for French (France) (Paid voice)","Leah":"Female voice for English (South Africa) (Free voice)","Leila":"Female voice for Portuguese (Brazil) (Free voice)","Leni":"Female voice for German (Switzerland) (Free voice)","Lennart":"Male voice for German (Germany) (Paid voice)","Leonas":"Male voice for Lithuanian (Lithuania) (Free voice)","Leticia":"Female voice for Portuguese (Brazil) (Free voice)","Lewis":"Male voice for English (United States) (Free voice)","Lia":"Female voice for Spanish (Spain) (Free voice)","Liam":"Male voice for English (Canada) (Free voice)","Lian":"Male voice for French (Canada) (Free voice)","Lian_2":"Male voice for French (Canada) (Paid voice)","Libby":"Female voice for English (United Kingdom) (Free voice)","Liberto":"Male voice for Spanish (Mexico) (Free voice)","Lisa":"Female voice for Dutch (Belgium) (Free voice)","Lisa_2":"Female voice for Dutch (Belgium) (Paid voice)","Lisandro":"Male voice for Italian (Italy) (Free voice)","Liv":"Female voice for Norwegian (Norway) (Free voice)","Livia":"Female voice for English (Australia) (Free voice)","Livia_2":"Female voice for English (Australia) (Paid voice)","Lola":"Female voice for English (United States) (Free voice)","Lorena":"Female voice for Spanish (El Salvador) (Free voice)","Lorenzio":"Male voice for Italian (Italy) (Paid voice)","Lorenzo":"Male voice for Spanish (Chile) (Free voice)","Lotte":"Female voice for Dutch (Netherlands) (Free voice)","Louisa":"Female voice for German (Germany) (Free voice)","Lucia":"Female voice for Spanish (Castilian) (Free voice)","Lucia_2":"Female voice for Spanish (Castilian) (Free voice)","Lucia_3":"Female voice for Spanish (Castilian) (Paid voice)","Luciano":"Male voice for Spanish (Mexico) (Free voice)","Lucien":"Male voice for French (France) (Free voice)","Luis":"Male voice for Spanish (Ecuador) (Free voice)","Lukas":"Male voice for Slovak (Slovakia) (Free voice)","Luke":"Male voice for English (South Africa) (Free voice)","Luna":"Female voice for English (Singapore) (Free voice)","Luna_2":"Female voice for English (United States) (Free voice)","Lupe":"Female voice for Spanish (United States) (Free voice)","Lupe_2":"Female voice for Spanish (United States) (Free voice)","Lupe_3":"Female voice for Spanish (United States) (Paid voice)","Maarten":"Male voice for Dutch (Netherlands) (Free voice)","Macerio":"Male voice for Portuguese (Brazil) (Free voice)","Macerio_2":"Male voice for Portuguese (Brazil) (Paid voice)","Madhur":"Male voice for Hindi (India) (Free voice)","Madina":"Female voice for Uzbek (Latin, Uzbekistan) (Free voice)","Mads":"Male voice for Danish (Denmark) (Free voice)","Maisie":"Female voice for English (United Kingdom) (Free voice)","Maja":"Female voice for German (Germany) (Free voice)","Manohar":"Male voice for Marathi (India) (Free voice)","Manuel":"Male voice for Spanish (Cuba) (Free voice)","Manuela":"Female voice for Portuguese (Brazil) (Free voice)","Marcello":"Male voice for Italian (Italy) (Free voice)","Marcelo":"Male voice for Spanish (Bolivia) (Free voice)","Marek":"Male voice for Polish (Poland) (Free voice)","Margarita":"Female voice for Spanish (Panama) (Free voice)","Maria":"Female voice for Spanish (Costa Rica) (Free voice)","Marija":"Female voice for Macedonian (North Macedonia) (Free voice)","Marina":"Female voice for Spanish (Mexico) (Free voice)","Mario":"Male voice for Spanish (Paraguay) (Free voice)","Marlene":"Female voice for German (Germany) (Free voice)","Marta":"Female voice for Spanish (Guatemala) (Free voice)","Maryam":"Female voice for Arabic (Yemen) (Free voice)","Masaru":"Male voice for Japanese (Japan) (Paid voice)","Mateo":"Male voice for Spanish (Uruguay) (Free voice)","Mathieu":"Male voice for French (France) (Free voice)","Matthew":"Male voice for English (United States) (Free voice)","Matthew_2":"Male voice for English (United States) (Free voice)","Matthew_3":"Male voice for English (United States) (Paid voice)","Mattias":"Male voice for Swedish (Sweden) (Free voice)","Maurice":"Male voice for French (France) (Free voice)","Maxim":"Male voice for Russian (Russia) (Free voice)","Maya":"Female voice for Polish (Poland) (Free voice)","Mayu":"Female voice for Japanese (Japan) (Free voice)","Mekdes":"Female voice for Amharic (Ethiopia) (Free voice)","Mia":"Female voice for Spanish (Mexico) (Free voice)","Mia_2":"Female voice for Spanish (Mexico) (Free voice)","Mia_3":"Female voice for Spanish (Mexico) (Paid voice)","Michelle":"Female voice for English (United States) (Free voice)","Midhun":"Male voice for Malayalam (India) (Free voice)","Miguel":"Male voice for Spanish (United States) (Free voice)","Mitchell":"Male voice for English (New Zealand) (Free voice)","Mizuki":"Female voice for Japanese (Japan) (Free voice)","Moaz":"Male voice for Arabic (Qatar) (Free voice)","Mohan":"Male voice for Telugu (India) (Free voice)","Molly":"Female voice for English (New Zealand) (Free voice)","Monica":"Female voice for English (United States) (Free voice)","Mouna":"Female voice for Arabic (Morocco) (Free voice)","Muuse":"Male voice for Somali (Somalia) (Free voice)","Nabanita":"Female voice for Bangla (Bangladesh) (Free voice)","Naja":"Female voice for Danish (Denmark) (Free voice)","NamMinh":"Male voice for Vietnamese (Vietnam) (Free voice)","Nanami":"Female voice for Japanese (Japan) (Free voice)","Nanami_2":"Female voice for Japanese (Japan) (Paid voice)","Nancy":"Female voice for English (United States) (Free voice)","Nancy_2":"Female voice for English (United States) (Free voice)","Naoki":"Male voice for Japanese (Japan) (Free voice)","Natasha":"Female voice for English (Australia) (Free voice)","Neerja":"Female voice for English (India) (Free voice)","Neerja_2":"Female voice for English (India) (Free voice)","Neil":"Male voice for English (Australia) (Free voice)","Nestoras":"Male voice for Greek (Greece) (Free voice)","Nia":"Female voice for Welsh (United Kingdom) (Free voice)","Niamh":"Female voice for English (Ireland) (Free voice)","Niamh_2":"Female voice for English (Ireland) (Paid voice)","Nicholas":"Male voice for Serbian (Cyrillic, Serbia) (Free voice)","Nicholas_2":"Male voice for Serbian (Latin, Serbia) (Free voice)","Nicolau":"Male voice for Portuguese (Brazil) (Free voice)","Nicole":"Female voice for English (Australia) (Free voice)","Nil":"Male voice for Spanish (Spain) (Free voice)","Nilar":"Female voice for Burmese (Myanmar) (Free voice)","Nils":"Male voice for Latvian (Latvia) (Free voice)","Niranjan":"Male voice for Gujarati (India) (Free voice)","Niwat":"Male voice for Thai (Thailand) (Free voice)","Noah":"Male voice for English (United Kingdom) (Free voice)","Noemi":"Female voice for Hungarian (Hungary) (Free voice)","Noora":"Female voice for Finnish (Finland) (Free voice)","Noura":"Female voice for Arabic (Kuwait) (Free voice)","Nova":"Female voice for English (United States) (Free voice)","Nova_2":"Female voice for English (United States) (Paid voice)","Nuria":"Female voice for Spanish (Mexico) (Free voice)","Ojas":"Male voice for Punjabi (India) (Free voice)","Ola":"Female voice for Polish (Poland) (Free voice)","Ola_2":"Female voice for Polish (Poland) (Paid voice)","Oliver":"Male voice for English (United Kingdom) (Free voice)","Olivia":"Female voice for English (United Kingdom) (Free voice)","Ollie":"Male voice for English (United Kingdom) (Free voice)","Ollie_2":"Male voice for English (United Kingdom) (Paid voice)","Omar":"Male voice for Arabic (Libya) (Free voice)","Ona":"Female voice for Lithuanian (Lithuania) (Free voice)","Onyx":"Male voice for English (United States) (Free voice)","Orla":"Female voice for Irish (Ireland) (Free voice)","Osman":"Male voice for Malay (Malaysia) (Free voice)","Ostap":"Male voice for Ukrainian (Ukraine) (Free voice)","Pallavi":"Female voice for Tamil (India) (Free voice)","Palmira":"Female voice for Italian (Italy) (Free voice)","Paloma":"Female voice for Spanish (United States) (Free voice)","Paola":"Female voice for Spanish (Venezuela) (Free voice)","Pedro":"Male voice for Spanish (United States) (Free voice)","Pedro_2":"Male voice for Spanish (United States) (Paid voice)","Pelayo":"Male voice for Spanish (Mexico) (Free voice)","Penelope":"Female voice for Spanish (United States) (Free voice)","Pernille":"Female voice for Norwegian (Norway) (Free voice)","Petra":"Female voice for Slovenian (Slovenia) (Free voice)","Phoebe":"Female voice for English (United States) (Free voice)","Phoebe_2":"Female voice for English (United States) (Paid voice)","Pierina":"Female voice for Italian (Italy) (Free voice)","Piseth":"Male voice for Khmer (Cambodia) (Free voice)","Polina":"Female voice for Ukrainian (Ukraine) (Free voice)","Prabhat":"Male voice for English (India) (Free voice)","Prabhat_2":"Male voice for English (India) (Free voice)","Pradeep":"Male voice for Bangla (Bangladesh) (Free voice)","Premwadee":"Female voice for Thai (Thailand) (Free voice)","Priyom":"Male voice for Assamese (India) (Free voice)","Rafiki":"Male voice for Swahili (Kenya) (Free voice)","Ralf":"Male voice for German (Germany) (Free voice)","Rami":"Male voice for Arabic (Lebanon) (Free voice)","Ramona":"Female voice for Spanish (Dominican Republic) (Free voice)","Rana":"Female voice for Arabic (Iraq) (Free voice)","Raquel":"Female voice for Portuguese (Portugal) (Free voice)","Raveena":"Female voice for English (India) (Free voice)","Reem":"Female voice for Arabic (Tunisia) (Free voice)","Rehaan":"Male voice for Hindi (India) (Free voice)","Rehaan_2":"Male voice for English (India) (Free voice)","Rehema":"Female voice for Swahili (Tanzania) (Free voice)","Remi":"Male voice for French (France) (Free voice)","Remi_2":"Male voice for French (France) (Paid voice)","Remy":"Male voice for French (France) (Free voice)","Remy_2":"Male voice for French (France) (Paid voice)","Renata":"Female voice for Spanish (Mexico) (Free voice)","Ricardo":"Male voice for Portuguese (Brazil) (Free voice)","Rinaldo":"Male voice for Italian (Italy) (Free voice)","Roberto":"Male voice for Spanish (Panama) (Free voice)","Rodrigo":"Male voice for Spanish (El Salvador) (Free voice)","Roger":"Male voice for English (United States) (Free voice)","Roi":"Male voice for Galician (Free voice)","Rok":"Male voice for Slovenian (Slovenia) (Free voice)","Rosa":"Female voice for English (Philippines) (Free voice)","Ruben":"Male voice for Dutch (Netherlands) (Free voice)","Russell":"Male voice for English (Australia) (Free voice)","Ruth":"Female voice for English (United States) (Free voice)","Ruth_2":"Female voice for English (United States) (Paid voice)","Ryan":"Male voice for English (United States) (Free voice)","Ryan_2":"Male voice for English (United Kingdom) (Free voice)","Sabela":"Female voice for Galician (Free voice)","Sabrina":"Female voice for German (Switzerland) (Free voice)","Sabrina_2":"Female voice for German (Switzerland) (Paid voice)","Sagar":"Male voice for Nepali (Nepal) (Free voice)","Saleh":"Male voice for Arabic (Yemen) (Free voice)","Salli":"Female voice for English (United States) (Free voice)","Salli_2":"Female voice for English (United States) (Free voice)","Salli_3":"Female voice for English (United States) (Paid voice)","Salma":"Female voice for Arabic (Egypt) (Free voice)","Salman":"Male voice for Urdu (India) (Free voice)","Salome":"Female voice for Spanish (Colombia) (Free voice)","Sam":"Male voice for English (Hong Kong SAR) (Free voice)","Sameera":"Male voice for Sinhala (Sri Lanka) (Free voice)","Samuel":"Male voice for English (United States) (Free voice)","Sana":"Female voice for Arabic (Jordan) (Free voice)","Sapna":"Female voice for Kannada (India) (Free voice)","Sara":"Female voice for English (United States) (Free voice)","Saranya":"Female voice for Tamil (Sri Lanka) (Free voice)","Sardor":"Male voice for Uzbek (Latin, Uzbekistan) (Free voice)","Saul":"Male voice for Spanish (Spain) (Free voice)","Sebastian":"Male voice for Spanish (Venezuela) (Free voice)","Selma":"Female voice for Finnish (Finland) (Free voice)","SeoHyeon":"Female voice for Korean (Korea) (Free voice)","Seoyeon":"Female voice for Korean (Korea) (Free voice)","Seoyeon_2":"Female voice for Korean (Korea) (Free voice)","Seoyeon_3":"Female voice for Korean (Korea) (Paid voice)","Seraphina":"Female voice for German (Germany) (Free voice)","Seraphina_2":"Female voice for German (Germany) (Paid voice)","Serena":"Female voice for English (United States) (Free voice)","Serena_2":"Female voice for English (United States) (Paid voice)","Sergio":"Male voice for Spanish (Castilian) (Free voice)","Sergio_2":"Male voice for Spanish (Castilian) (Paid voice)","Shakir":"Male voice for Arabic (Egypt) (Free voice)","Shimmer":"Female voice for English (United States) (Free voice)","Shiori":"Female voice for Japanese (Japan) (Free voice)","Shruti":"Female voice for Telugu (India) (Free voice)","Siqiniq":"Female voice for Inuktitut (Syllabics, Canada) (Free voice)","Siqiniq_2":"Female voice for Inuktitut (Latin, Canada) (Free voice)","Siti":"Female voice for Javanese (Latin, Indonesia) (Free voice)","Sobhana":"Female voice for Malayalam (India) (Free voice)","Soffie":"Female voice for Danish (Denmark) (Free voice)","Sofia":"Female voice for Spanish (Bolivia) (Free voice)","Sofie":"Female voice for Swedish (Sweden) (Free voice)","Sonia":"Female voice for English (United Kingdom) (Free voice)","SoonBok":"Female voice for Korean (Korea) (Free voice)","Sophie":"Female voice for Serbian (Cyrillic, Serbia) (Free voice)","Sophie_2":"Female voice for Serbian (Latin, Serbia) (Free voice)","Srecko":"Male voice for Croatian (Croatia) (Free voice)","Sreymom":"Female voice for Khmer (Cambodia) (Free voice)","Steffan":"Male voice for English (United States) (Free voice)","Steffan_2":"Male voice for English (United States) (Free voice)","Steffan_3":"Male voice for English (United States) (Paid voice)","Stephen":"Male voice for English (United States) (Free voice)","Stephen_2":"Male voice for English (United States) (Paid voice)","Subhasini":"Female voice for Odia (India) (Free voice)","Sukant":"Male voice for Odia (India) (Free voice)","SunHi":"Female voice for Korean (Korea) (Free voice)","SunHi_2":"Female voice for Korean (Korea) (Paid voice)","Surya":"Male voice for Tamil (Malaysia) (Free voice)","Suvi":"Female voice for Finnish (Finland) (Free voice)","Svetlana":"Female voice for Russian (Russia) (Free voice)","Swara":"Female voice for Hindi (India) (Free voice)","Sylvie":"Female voice for French (Canada) (Free voice)","Sylvie_2":"Female voice for French (Canada) (Paid voice)","Taim":"Male voice for Arabic (Jordan) (Free voice)","Takumi":"Male voice for Japanese (Japan) (Free voice)","Takumi_2":"Male voice for Japanese (Japan) (Free voice)","Tamas":"Male voice for Hungarian (Hungary) (Free voice)","Tania":"Female voice for Spanish (Paraguay) (Free voice)","Tanishaa":"Female voice for Bengali (India) (Free voice)","Tanja":"Female voice for German (Germany) (Free voice)","Taqqiq":"Male voice for Inuktitut (Syllabics, Canada) (Free voice)","Taqqiq_2":"Male voice for Inuktitut (Latin, Canada) (Free voice)","Tatyana":"Female voice for Russian (Russia) (Free voice)","Teo":"Male voice for Spanish (Spain) (Free voice)","Teresa":"Female voice for Spanish (Equatorial Guinea) (Free voice)","Thalita":"Female voice for Portuguese (Brazil) (Free voice)","Thalita_2":"Female voice for Portuguese (Brazil) (Free voice)","Thalita_3":"Female voice for Portuguese (Brazil) (Paid voice)","Thando":"Female voice for Zulu (South Africa) (Free voice)","Themba":"Male voice for Zulu (South Africa) (Free voice)","Thiago":"Male voice for Portuguese (Brazil) (Free voice)","Thierry":"Male voice for French (Canada) (Free voice)","Thierry_2":"Male voice for French (Canada) (Paid voice)","Thiha":"Male voice for Burmese (Myanmar) (Free voice)","Thilini":"Female voice for Sinhala (Sri Lanka) (Free voice)","Thomas":"Male voice for English (United Kingdom) (Free voice)","Tiana":"Female voice for English (United States) (Free voice)","Tiffany":"Female voice for English (United States) (Paid voice)","Tim":"Male voice for English (Australia) (Free voice)","Tina":"Female voice for English (Australia) (Free voice)","Tomas":"Male voice for Spanish (Argentina) (Free voice)","Tomoko":"Female voice for Japanese (Japan) (Free voice)","Tony":"Male voice for English (United States) (Free voice)","Triana":"Female voice for Spanish (Spain) (Free voice)","Tristan":"Male voice for Spanish (Mexico) (Paid voice)","Tristan_ES":"Male voice for Spanish (Spain) (Free voice)","Tristan_ES_2":"Male voice for Spanish (Spain) (Paid voice)","Tuti":"Female voice for Sundanese (Indonesia) (Free voice)","Tyler":"Male voice for English (United States) (Free voice)","Ubax":"Female voice for Somali (Somalia) (Free voice)","Uzma":"Female voice for Urdu (Pakistan) (Free voice)","Vaani":"Female voice for Punjabi (India) (Free voice)","Valentina":"Female voice for Spanish (Uruguay) (Free voice)","Valerio":"Male voice for Portuguese (Brazil) (Free voice)","Valluvar":"Male voice for Tamil (India) (Free voice)","Venba":"Female voice for Tamil (Singapore) (Free voice)","Vera":"Female voice for Spanish (Spain) (Free voice)","Vesna":"Female voice for Bosnian (Bosnia and Herzegovina) (Free voice)","Vicki":"Female voice for German (Germany) (Free voice)","Vicki_2":"Female voice for German (Germany) (Free voice)","Vicki_3":"Female voice for German (Germany) (Paid voice)","Victor":"Male voice for Spanish (Puerto Rico) (Free voice)","Viktoria":"Female voice for Slovak (Slovakia) (Free voice)","Vitoria":"Female voice for Portuguese (Brazil) (Free voice)","Vitoria_2":"Female voice for Portuguese (Brazil) (Free voice)","Vivienne":"Female voice for French (France) (Free voice)","Vivienne_2":"Female voice for French (France) (Paid voice)","Vlasta":"Female voice for Czech (Czechia) (Free voice)","WanLung":"Male voice for Chinese (Cantonese, Traditional) (Free voice)","Wayne":"Male voice for English (Singapore) (Free voice)","Willem":"Male voice for Afrikaans (South Africa) (Free voice)","William":"Male voice for English (Australia) (Free voice)","William_2":"Male voice for English (Australia) (Free voice)","Xiaochen":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaochen_2":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaochen_3":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaochen_4":"Female voice for Chinese (Mandarin, Simplified) (Paid voice)","Xiaohan":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaohan_2":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaomeng":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","XiaoMin":"Female voice for Chinese (Cantonese, Simplified) (Free voice)","Xiaomo":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoqiu":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaorou":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaorui":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoshuang":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoshuang_2":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoshuang_3":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaotong":"Female voice for Chinese (Wu, Simplified) (Free voice)","Xiaoxiao":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoxiao_2":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoxiao_3":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoxiao_4":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoxiao_5":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoyan":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoyi":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoyi_2":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoyou":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoyou_2":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoyou_3":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoyu":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaoyu_2":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Xiaozhen":"Female voice for Chinese (Mandarin, Simplified) (Free voice)","Ximena":"Female voice for Spanish (Mexico) (Paid voice)","Ximena_ES":"Female voice for Spanish (Spain) (Free voice)","Ximena_ES_2":"Female voice for Spanish (Spain) (Free voice)","Ximena_ES_3":"Female voice for Spanish (Spain) (Paid voice)","Yago":"Male voice for Spanish (Mexico) (Free voice)","Yan":"Female voice for English (Hong Kong SAR) (Free voice)","Yara":"Female voice for Portuguese (Brazil) (Free voice)","Yashica":"Female voice for Assamese (India) (Free voice)","Yasmin":"Female voice for Malay (Malaysia) (Free voice)","Yesui":"Female voice for Mongolian (Mongolia) (Free voice)","Yolanda":"Female voice for Spanish (Nicaragua) (Free voice)","YuJin":"Female voice for Korean (Korea) (Free voice)","Yundeng":"Male voice for Chinese (Zhongyuan Mandarin Henan, Simplified) (Free voice)","Yunfan":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunfan_2":"Male voice for Chinese (Mandarin, Simplified) (Paid voice)","Yunfeng":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunhan":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunhao":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","YunJhe":"Male voice for Chinese (Taiwanese Mandarin, Traditional) (Free voice)","Yunjian":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunjie":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","YunSong":"Male voice for Chinese (Cantonese, Simplified) (Free voice)","Yunxi":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunxi_2":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunxia":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunxia_2":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunxiang":"Male voice for Chinese (Jilu Mandarin, Simplified) (Free voice)","Yunxiao":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunxiao_2":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunyang":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunye":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunye_2":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunyi":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunyi_2":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunze":"Male voice for Chinese (Mandarin, Simplified) (Free voice)","Yunzhe":"Male voice for Chinese (Wu, Simplified) (Free voice)","Yves":"Male voice for French (France) (Free voice)","Yvette":"Female voice for French (France) (Free voice)","Zariyah":"Female voice for Arabic (Saudi Arabia) (Free voice)","Zayd":"Male voice for Arabic (Saudi Arabia) (Free voice)","Zeina":"Female voice for Arabic (Saudi Arabia) (Free voice)","Zhiyu":"Female voice for Chinese (Mandarin) (Free voice)","Zhiyu_2":"Female voice for Chinese (Mandarin) (Free voice)","Zofia":"Female voice for Polish (Poland) (Free voice)","Zuri":"Female voice for Swahili (Kenya) (Free voice)"}}},"schema_1035":{"kind":"json-schema","data":{"$ref":"#/components/schemas/projectId"},"id":"schema_1035"},"schema_1036":{"kind":"json-schema","data":{"$ref":"#/components/schemas/serviceId"},"id":"schema_1036"},"schema_1037":{"kind":"json-schema","data":{"type":"string","example":"+15551234567"},"id":"schema_1037"},"schema_1038":{"kind":"json-schema","data":{"type":"string","example":"+15551234568"},"id":"schema_1038"},"schema_1039":{"kind":"json-schema","data":{"$ref":"#/components/schemas/callType"},"id":"schema_1039"},"schema_1040":{"kind":"json-schema","data":{"type":"string","format":"date-time","example":"2025-02-01T14:00:00Z"},"id":"schema_1040"},"schema_1041":{"kind":"json-schema","data":{"type":"string","format":"date-time","example":"2025-03-01T14:00:00Z"},"id":"schema_1041"},"schema_1042":{"kind":"json-schema","data":{"$ref":"#/components/schemas/callResult"},"id":"schema_1042"},"schema_1043":{"kind":"json-schema","data":{"$ref":"#/components/schemas/callReason"},"id":"schema_1043"},"schema_1044":{"kind":"json-schema","data":{"type":"integer","minimum":1,"maximum":100,"default":20},"id":"schema_1044"},"schema_1045":{"kind":"json-schema","data":{"type":"integer","minimum":1,"default":1},"id":"schema_1045"},"schema_1046":{"kind":"json-schema","data":{"type":"object","properties":{"WWW-Authenticate":{"type":"string","example":"Bearer realm=\"sinch\", error=\"invalid_token\", error_description=\"Token has expired\"","description":"RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint."}}},"id":"schema_1046"},"schema_1047":{"kind":"json-schema","data":{"type":"object","properties":{"Retry-After":{"type":"integer","example":60,"description":"Number of seconds to wait before retrying the request."}}},"id":"schema_1047"},"schema_1048":{"kind":"json-schema","data":{"type":"string","minLength":16,"maxLength":128},"id":"schema_1048"},"schema_1049":{"kind":"json-schema","data":{"$ref":"#/components/schemas/callId"},"id":"schema_1049"},"schema_1050":{"kind":"json-schema","data":{"$ref":"#/components/schemas/sessionId"},"id":"schema_1050"},"schema_1051":{"kind":"json-schema","data":{"type":"string","example":"origin"},"id":"schema_1051"},"schema_1052":{"kind":"json-schema","data":{"$ref":"#/components/schemas/batchId"},"id":"schema_1052"},"schema_1053":{"kind":"json-schema","data":{"type":"string","const":"1.0"},"id":"schema_1053"},"schema_1054":{"kind":"json-schema","data":{"type":"string","const":"com.sinch.voice.call.control.v1"},"id":"schema_1054"},"schema_1055":{"kind":"json-schema","data":{"type":"string","example":"projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/services/6e124178-c29d-46a5-943c-5c2ae544aade"},"id":"schema_1055"},"schema_1056":{"kind":"json-schema","data":{"type":"string","format":"uuid","example":"cb0c6a68-53de-4590-94a1-6e95df89fbac"},"id":"schema_1056"},"schema_1057":{"kind":"json-schema","data":{"type":"string","format":"date-time","example":"2026-04-01T12:00:00+00:00"},"id":"schema_1057"},"schema_1058":{"kind":"json-schema","data":{"type":"string","example":"2026-04-01T12:00:00.0000000Z"},"id":"schema_1058"},"schema_1059":{"kind":"json-schema","data":{"type":"string"},"id":"schema_1059"},"schema_1060":{"kind":"json-schema","data":{"type":"boolean","example":true},"id":"schema_1060"}},"exampleStore":{"paths/~1v2~1projects~1{projectId}~1calls/get/responses/200/content/application~1json/example":{"value":{"calls":[{"callId":"01ARZ3NDEKTSV4RRFFQ69G5FAA","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"6e124178-c29d-46a5-943c-5c2ae544aade","sessionId":"01BX5ZZKBKACTAV9WEVGEMMVRB","direction":"OUTBOUND","originationType":"SERVER","callType":"PHONE","callResult":"COMPLETED","callReason":"CALLEE_HANGUP","startTime":"2025-02-10T09:00:00Z","answerTime":"2025-02-10T09:00:05Z","endTime":"2025-02-10T09:00:47Z","callDurationSeconds":42,"from":{"type":"PHONE","phone":{"number":"+15551234567"}},"to":{"type":"PHONE","phone":{"number":"+15551234568"}},"callRate":{"currencyCode":"USD","amount":"0.0123"},"callResourceUrl":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA"},{"callId":"01BX5ZZKBKACTAV9WEVGEMMVRD","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"6e124178-c29d-46a5-943c-5c2ae544aade","sessionId":"01BX5ZZKBKACTAV9WEVGEMMVRE","direction":"INBOUND","originationType":"PHONE","callType":"PHONE","callResult":"IN_PROGRESS","startTime":"2025-02-10T09:05:00Z","answerTime":"2025-02-10T09:05:08Z","from":{"type":"PHONE","phone":{"number":"+15559876543"}},"to":{"type":"PHONE","phone":{"number":"+15551234567"}},"callRate":{"currencyCode":"USD","amount":"0.0100"},"callResourceUrl":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01BX5ZZKBKACTAV9WEVGEMMVRD"}],"links":{"first":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls?page=1&pageSize=20","last":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls?page=5&pageSize=20","prev":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls?page=1&pageSize=20","self":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls?page=2&pageSize=20","next":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls?page=3&pageSize=20"},"meta":{"totalCount":100,"pageCount":5}},"id":"paths/~1v2~1projects~1{projectId}~1calls/get/responses/200/content/application~1json/example"},"paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/simpleDial":{"value":{"commands":[{"command":"dial","callName":"origin","from":{"type":"PHONE","phone":{"number":"+15551234567"}},"to":{"type":"PHONE","phone":{"number":"+15559876543"}},"dialTimeoutDurationSeconds":30,"maxCallDurationSeconds":3600,"events":{"onAnswer":[{"command":"messages","messages":[{"type":"SAY","say":{"text":"Hello, your call is now connected.","voiceName":"Emma"}}]}],"onHangup":[{"command":"hangup"}]}}]},"key":"simpleDial","summary":"Outbound call to a phone number","id":"paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/simpleDial"},"paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/dialToStream":{"value":{"commands":[{"command":"dial","callName":"origin","from":{"type":"PHONE","phone":{"number":"+15551234567"}},"to":{"type":"STREAM","stream":{"endpoint":"wss://myapp.example.com/audio","streamOptions":{"codec":"PCM","sampleRate":16000}}},"dialTimeoutDurationSeconds":30,"events":{"onHangup":[{"command":"hangup"}]}}]},"key":"dialToStream","summary":"Outbound call to a WebSocket stream endpoint","id":"paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/dialToStream"},"paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/batchDial":{"value":{"commands":[{"command":"dial","callName":"origin","from":{"type":"PHONE","phone":{"number":"+15551234567"}},"to":{"type":"PHONE","phone":{"number":"@numberB"}},"dialTimeoutDurationSeconds":30,"events":{"onAnswer":[{"command":"messages","messages":[{"type":"SAY","say":{"text":"Hello, this is an automated reminder.","voiceName":"Emma"}}]}],"onHangup":[{"command":"hangup"}]}}],"parameters":[{"numberB":"+15559876543"},{"numberB":"+15559876544"},{"numberB":"+15559876545"}],"batchOptions":{"maxCps":10,"ttlSeconds":3600}},"key":"batchDial","summary":"Batch of outbound calls with parameters","id":"paths/~1v2~1projects~1{projectId}~1calls/post/requestBody/content/application~1json/examples/batchDial"},"paths/~1v2~1projects~1{projectId}~1calls/post/responses/201/content/application~1json/examples/singleCallCreated":{"value":{"projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"6e124178-c29d-46a5-943c-5c2ae544aade","sessionId":"01BX5ZZKBKACTAV9WEVGEMMVRB"},"key":"singleCallCreated","summary":"Single outbound call created","id":"paths/~1v2~1projects~1{projectId}~1calls/post/responses/201/content/application~1json/examples/singleCallCreated"},"paths/~1v2~1projects~1{projectId}~1calls/post/responses/201/content/application~1json/examples/batchCallCreated":{"value":{"projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"6e124178-c29d-46a5-943c-5c2ae544aade","sessionId":"01BX5ZZKBKACTAV9WEVGEMMVRB","batchId":"01BX5ZZKBKACTAV9WEVGEMMVRC"},"key":"batchCallCreated","summary":"Batch of outbound calls created","id":"paths/~1v2~1projects~1{projectId}~1calls/post/responses/201/content/application~1json/examples/batchCallCreated"},"paths/~1v2~1projects~1{projectId}~1calls~1{callId}/get/responses/200/content/application~1json/example":{"value":{"callId":"01ARZ3NDEKTSV4RRFFQ69G5FAA","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"6e124178-c29d-46a5-943c-5c2ae544aade","sessionId":"01BX5ZZKBKACTAV9WEVGEMMVRB","callName":"origin","direction":"OUTBOUND","originationType":"SERVER","callType":"PHONE","callResult":"COMPLETED","callReason":"CALLEE_HANGUP","startTime":"2025-02-10T09:00:00Z","answerTime":"2025-02-10T09:00:05Z","endTime":"2025-02-10T09:00:47Z","callDurationSeconds":42,"from":{"type":"PHONE","phone":{"number":"+15551234567"}},"to":{"type":"PHONE","phone":{"number":"+15559876543"}},"callRate":{"currencyCode":"USD","amount":"0.0123"},"callResourceUrl":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA"},"id":"paths/~1v2~1projects~1{projectId}~1calls~1{callId}/get/responses/200/content/application~1json/example"},"paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}/get/responses/200/content/application~1json/example":{"value":{"sessionId":"01BX5ZZKBKACTAV9WEVGEMMVRB","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"6e124178-c29d-46a5-943c-5c2ae544aade","state":"COMPLETED","createTime":"2025-02-10T09:00:00Z","updateTime":"2025-02-10T09:00:47Z","endTime":"2025-02-10T09:00:47Z","calls":[{"callId":"01ARZ3NDEKTSV4RRFFQ69G5FAA","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"6e124178-c29d-46a5-943c-5c2ae544aade","sessionId":"01BX5ZZKBKACTAV9WEVGEMMVRB","direction":"OUTBOUND","originationType":"SERVER","callType":"PHONE","callResult":"COMPLETED","callReason":"CALLEE_HANGUP","startTime":"2025-02-10T09:00:00Z","answerTime":"2025-02-10T09:00:05Z","endTime":"2025-02-10T09:00:47Z","callDurationSeconds":42,"from":{"type":"PHONE","phone":{"number":"+15551234567"}},"to":{"type":"PHONE","phone":{"number":"+15559876543"}},"callRate":{"currencyCode":"USD","amount":"0.0123"},"callResourceUrl":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA"}]},"id":"paths/~1v2~1projects~1{projectId}~1sessions~1{sessionId}/get/responses/200/content/application~1json/example"},"paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/delete/responses/202/content/application~1json/example":{"value":{"result":"STOP_REQUESTED"},"id":"paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/delete/responses/202/content/application~1json/example"},"paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/get/responses/200/content/application~1json/example":{"value":{"batchId":"01BX5ZZKBKACTAV9WEVGEMMVRC","sessionCount":3,"queued":1,"inProgress":1,"completed":1,"expired":0,"requestedCps":10,"ttlSeconds":3600},"id":"paths/~1v2~1projects~1{projectId}~1batches~1{batchId}/get/responses/200/content/application~1json/example"},"paths/~1v2~1projects~1{projectId}~1batches~1{batchId}~1details/get/responses/200/content/application~1json/example":{"value":{"sessions":[{"id":"01F8Z5J4X2G9Y3J4X2G9Y3J4X2G9","state":"COMPLETED"},{"id":"01F8Z5J4X2G9Y3J4X2G9Y3J4X5YJ","state":"IN_PROGRESS"},{"id":"01F8Z5J4X2G9Y3J4X2G9Y3J4X9QK","state":"QUEUED"}]},"id":"paths/~1v2~1projects~1{projectId}~1batches~1{batchId}~1details/get/responses/200/content/application~1json/example"},"paths/call.webhook/post/requestBody/content/application~1json/examples/callIncoming":{"value":{"event":"call.incoming","call":{"callId":"01AN4Z07BY79KA1307SR9X4MV3","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"a74b1566-0f18-4f8e-9c23-8e6b5df8fd3e","sessionId":"01AN4Z07BY79KA1307SR9X4MV2","direction":"INBOUND","originationType":"PHONE","callType":"PHONE","from":{"type":"PHONE","phone":{"number":"+14155552671"}},"to":{"type":"PHONE","phone":{"number":"+46735224800"}},"callResult":"INITIATED","startTime":"2025-06-01T10:00:00Z","callRate":{"currencyCode":"USD","amount":"0.0060"},"callResourceUrl":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01AN4Z07BY79KA1307SR9X4MV3"}},"key":"callIncoming","summary":"Inbound call arriving on the service","id":"paths/call.webhook/post/requestBody/content/application~1json/examples/callIncoming"},"paths/call.webhook/post/requestBody/content/application~1json/examples/callAnswered":{"value":{"event":"call.answered","call":{"callId":"01AN4Z07BY79KA1307SR9X4MV3","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"a74b1566-0f18-4f8e-9c23-8e6b5df8fd3e","sessionId":"01AN4Z07BY79KA1307SR9X4MV2","direction":"OUTBOUND","originationType":"SERVER","callType":"PHONE","from":{"type":"PHONE","phone":{"number":"+46735224800"}},"to":{"type":"PHONE","phone":{"number":"+14155552671"}},"callResult":"IN_PROGRESS","startTime":"2025-06-01T10:00:00Z","answerTime":"2025-06-01T10:00:05Z","callRate":{"currencyCode":"USD","amount":"0.0060"},"callResourceUrl":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01AN4Z07BY79KA1307SR9X4MV3"}},"key":"callAnswered","summary":"Outbound call answered by the recipient","id":"paths/call.webhook/post/requestBody/content/application~1json/examples/callAnswered"},"paths/call.webhook/post/requestBody/content/application~1json/examples/callBusy":{"value":{"event":"call.busy","call":{"callId":"01AN4Z07BY79KA1307SR9X4MV3","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"a74b1566-0f18-4f8e-9c23-8e6b5df8fd3e","sessionId":"01AN4Z07BY79KA1307SR9X4MV2","direction":"OUTBOUND","originationType":"SERVER","callType":"PHONE","from":{"type":"PHONE","phone":{"number":"+46735224800"}},"to":{"type":"PHONE","phone":{"number":"+14155552671"}},"callResult":"BUSY","callReason":"NOT_AVAILABLE","startTime":"2025-06-01T10:00:00Z","endTime":"2025-06-01T10:00:04Z","callRate":{"currencyCode":"USD","amount":"0.0060"},"callResourceUrl":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01AN4Z07BY79KA1307SR9X4MV3"}},"key":"callBusy","summary":"Outbound call recipient was busy","id":"paths/call.webhook/post/requestBody/content/application~1json/examples/callBusy"},"paths/call.webhook/post/requestBody/content/application~1json/examples/callRejected":{"value":{"event":"call.rejected","call":{"callId":"01AN4Z07BY79KA1307SR9X4MV3","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"a74b1566-0f18-4f8e-9c23-8e6b5df8fd3e","sessionId":"01AN4Z07BY79KA1307SR9X4MV2","direction":"OUTBOUND","originationType":"SERVER","callType":"PHONE","from":{"type":"PHONE","phone":{"number":"+46735224800"}},"to":{"type":"PHONE","phone":{"number":"+14155552671"}},"callResult":"REJECTED","callReason":"NOT_AVAILABLE","startTime":"2025-06-01T10:00:00Z","endTime":"2025-06-01T10:00:06Z","callRate":{"currencyCode":"USD","amount":"0.0060"},"callResourceUrl":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01AN4Z07BY79KA1307SR9X4MV3"}},"key":"callRejected","summary":"Outbound call rejected by the recipient","id":"paths/call.webhook/post/requestBody/content/application~1json/examples/callRejected"},"paths/call.webhook/post/requestBody/content/application~1json/examples/callTimeout":{"value":{"event":"call.timeout","call":{"callId":"01AN4Z07BY79KA1307SR9X4MV3","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"a74b1566-0f18-4f8e-9c23-8e6b5df8fd3e","sessionId":"01AN4Z07BY79KA1307SR9X4MV2","direction":"OUTBOUND","originationType":"SERVER","callType":"PHONE","from":{"type":"PHONE","phone":{"number":"+46735224800"}},"to":{"type":"PHONE","phone":{"number":"+14155552671"}},"callResult":"NO_ANSWER","callReason":"NOT_AVAILABLE","startTime":"2025-06-01T10:00:00Z","endTime":"2025-06-01T10:00:30Z","callRate":{"currencyCode":"USD","amount":"0.0060"},"callResourceUrl":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01AN4Z07BY79KA1307SR9X4MV3"}},"key":"callTimeout","summary":"Outbound call not answered within the dial timeout","id":"paths/call.webhook/post/requestBody/content/application~1json/examples/callTimeout"},"paths/call.webhook/post/requestBody/content/application~1json/examples/callHangup":{"value":{"event":"call.hangup","call":{"callId":"01AN4Z07BY79KA1307SR9X4MV3","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"a74b1566-0f18-4f8e-9c23-8e6b5df8fd3e","sessionId":"01AN4Z07BY79KA1307SR9X4MV2","direction":"OUTBOUND","originationType":"SERVER","callType":"PHONE","from":{"type":"PHONE","phone":{"number":"+46735224800"}},"to":{"type":"PHONE","phone":{"number":"+14155552671"}},"callResult":"COMPLETED","callReason":"CALLEE_HANGUP","startTime":"2025-06-01T10:00:00Z","answerTime":"2025-06-01T10:00:05Z","endTime":"2025-06-01T10:01:47Z","callDurationSeconds":102,"callRate":{"currencyCode":"USD","amount":"0.0060"},"callResourceUrl":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01AN4Z07BY79KA1307SR9X4MV3"}},"key":"callHangup","summary":"Call ended after being answered","id":"paths/call.webhook/post/requestBody/content/application~1json/examples/callHangup"},"paths/call.webhook/post/requestBody/content/application~1json/examples/callFailed":{"value":{"event":"call.failed","call":{"callId":"01AN4Z07BY79KA1307SR9X4MV3","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"a74b1566-0f18-4f8e-9c23-8e6b5df8fd3e","sessionId":"01AN4Z07BY79KA1307SR9X4MV2","direction":"OUTBOUND","originationType":"SERVER","callType":"PHONE","from":{"type":"PHONE","phone":{"number":"+46735224800"}},"to":{"type":"PHONE","phone":{"number":"+14155552671"}},"callResult":"FAILED","callReason":"ERROR","startTime":"2025-06-01T10:00:00Z","callRate":{"currencyCode":"USD","amount":"0.0060"},"callResourceUrl":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01AN4Z07BY79KA1307SR9X4MV3"}},"key":"callFailed","summary":"Call could not be set up","id":"paths/call.webhook/post/requestBody/content/application~1json/examples/callFailed"},"paths/call.webhook/post/requestBody/content/application~1json/examples/callWebhookDynamic":{"value":{"event":"call.webhook.menu-selection","call":{"callId":"01AN4Z07BY79KA1307SR9X4MV3","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","serviceId":"a74b1566-0f18-4f8e-9c23-8e6b5df8fd3e","sessionId":"01AN4Z07BY79KA1307SR9X4MV2","direction":"INBOUND","originationType":"PHONE","callType":"PHONE","from":{"type":"PHONE","phone":{"number":"+14155552671"}},"to":{"type":"PHONE","phone":{"number":"+46735224800"}},"callResult":"IN_PROGRESS","startTime":"2025-06-01T10:00:00Z","answerTime":"2025-06-01T10:00:03Z","callRate":{"currencyCode":"USD","amount":"0.0060"},"callResourceUrl":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01AN4Z07BY79KA1307SR9X4MV3"}},"key":"callWebhookDynamic","summary":"Mid-call event triggered by the webhook SVAML command","id":"paths/call.webhook/post/requestBody/content/application~1json/examples/callWebhookDynamic"},"paths/call.webhook/post/responses/200/content/application~1json/examples/incomingCall":{"value":{"callName":"incoming","commands":[{"command":"messages","messages":[{"type":"SAY","say":{"text":"Thank you for calling. Goodbye.","voiceName":"Emma"}}],"events":{"onFinish":[{"command":"hangup"}]}}]},"key":"incomingCall","summary":"Accept an incoming call and play a greeting (call.incoming), then hangup","id":"paths/call.webhook/post/responses/200/content/application~1json/examples/incomingCall"},"paths/call.webhook/post/responses/200/content/application~1json/examples/playMessageAndHangup":{"value":{"commands":[{"command":"messages","messages":[{"type":"SAY","say":{"text":"Hello! Your verification code is 4 2 7 8. Goodbye.","voiceName":"Emma"}}],"events":{"onFinish":[{"command":"hangup"}]}}]},"key":"playMessageAndHangup","summary":"Play a message then hang up (call.answered)","id":"paths/call.webhook/post/responses/200/content/application~1json/examples/playMessageAndHangup"},"paths/~1v2~1projects~1{projectId}~1services/get/responses/200/content/application~1json/example":{"value":{"services":[{"serviceId":"6e124178-c29d-46a5-943c-5c2ae544aade","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","createTime":"2025-01-01T00:00:00Z","name":"Primary Service","description":"Main service with webhook call behavior","isDefault":true},{"serviceId":"7f235289-d3ae-57b6-a54d-6d3bf655bbdf","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","createTime":"2025-02-15T10:30:00Z","name":"Secondary Service","isDefault":false}],"links":{"first":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/services?page=1&pageSize=20","last":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/services?page=1&pageSize=20","self":"https://voice.api.sinch.com/v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/services?page=1&pageSize=20"},"meta":{"totalCount":2,"pageCount":1}},"id":"paths/~1v2~1projects~1{projectId}~1services/get/responses/200/content/application~1json/example"},"paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/webhooksExample":{"value":{"description":"Service with webhooks","name":"Example service","callBehavior":{"type":"WEBHOOK","webhook":{"url":"https://example.com/webhook","fallbackUrl":"https://example.com/fallback"}}},"key":"webhooksExample","summary":"Adding webhook callback behavior","id":"paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/webhooksExample"},"paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/staticExample":{"value":{"description":"Service with static SVAML","name":"Example service","callBehavior":{"type":"STATIC","static":{"callName":"incoming","commands":[{"command":"answer"},{"command":"messages","messages":[{"type":"SAY","say":{"text":"Your call is working fine! This call will be disconnected.","voiceName":"Emma"}}],"events":{"onFinish":[{"command":"hangup"}]}}]}}},"key":"staticExample","summary":"Adding static SVAML callback behavior","id":"paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/staticExample"},"paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/noneExample":{"value":{"description":"Service with no callback behavior","name":"Example service","callBehavior":{"type":"NONE"}},"key":"noneExample","summary":"Removing callback behavior","id":"paths/~1v2~1projects~1{projectId}~1services/post/requestBody/content/application~1json/examples/noneExample"},"paths/~1v2~1projects~1{projectId}~1services/post/responses/201/content/application~1json/example":{"value":{"serviceId":"6e124178-c29d-46a5-943c-5c2ae544aade","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","createTime":"2025-01-01T00:00:00Z","name":"Example service","description":"Service with webhooks","isDefault":false,"callBehavior":{"type":"WEBHOOK","webhook":{"url":"https://example.com/webhook","fallbackUrl":"https://example.com/fallback"}}},"id":"paths/~1v2~1projects~1{projectId}~1services/post/responses/201/content/application~1json/example"},"paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/get/responses/200/content/application~1json/example":{"value":{"serviceId":"6e124178-c29d-46a5-943c-5c2ae544aade","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","createTime":"2025-01-01T00:00:00Z","updateTime":"2025-06-01T09:15:00Z","name":"My Voice Service","description":"Service with webhook call behavior","isDefault":true,"callBehavior":{"type":"WEBHOOK","webhook":{"url":"https://example.com/webhook","fallbackUrl":"https://example.com/fallback"}}},"id":"paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/get/responses/200/content/application~1json/example"},"paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/webhooksExample":{"value":{"description":"Service with webhooks","callBehavior":{"type":"WEBHOOK","webhook":{"url":"https://example.com/webhook","fallbackUrl":"https://example.com/fallback"}}},"key":"webhooksExample","summary":"Adding webhook callback behavior","id":"paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/webhooksExample"},"paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/staticExample":{"value":{"description":"Service with static SVAML","callBehavior":{"type":"STATIC","static":{"callName":"incoming","commands":[{"command":"answer"},{"command":"messages","messages":[{"type":"SAY","say":{"text":"Your call is working fine! This call will be disconnected.","voiceName":"Emma"}}],"events":{"onFinish":[{"command":"hangup"}]}}]}}},"key":"staticExample","summary":"Adding static SVAML callback behavior","id":"paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/staticExample"},"paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/noneExample":{"value":{"description":"Service with no callback behavior","callBehavior":{"type":"NONE"}},"key":"noneExample","summary":"Removing callback behavior","id":"paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/requestBody/content/application~1json/examples/noneExample"},"paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/responses/200/content/application~1json/example":{"value":{"serviceId":"6e124178-c29d-46a5-943c-5c2ae544aade","projectId":"5c5bf2b1-35ae-4825-ab89-457e07bb60e6","createTime":"2025-01-01T00:00:00Z","updateTime":"2025-06-01T09:15:00Z","name":"My Voice Service","description":"Updated service description","isDefault":true,"callBehavior":{"type":"WEBHOOK","webhook":{"url":"https://example.com/webhook","fallbackUrl":"https://example.com/fallback"}}},"id":"paths/~1v2~1projects~1{projectId}~1services~1{serviceId}/patch/responses/200/content/application~1json/example"},"paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/requestBody/content/application~1json/examples/basicFlow":{"value":{"svaml":{"callName":"incoming","commands":[{"command":"answer"},{"command":"messages","messages":[{"type":"SAY","say":{"text":"Welcome to ACME support.","voiceName":"Emma"}}]}]}},"key":"basicFlow","summary":"Describe a simple SVAML flow","id":"paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/requestBody/content/application~1json/examples/basicFlow"},"paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/responses/200/content/application~1json/example":{"value":{"description":"The call is answered and a TTS message is played using the voice Emma."},"id":"paths/~1v2~1projects~1{projectId}~1svaml~1describe/post/responses/200/content/application~1json/example"},"paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/requestBody/content/application~1json/examples/strictValidation":{"value":{"validationType":"STRICT","svaml":{"callName":"incoming","commands":[{"command":"answer"},{"command":"messages","messages":[{"type":"SAY","say":{"text":"Welcome to ACME support.","voiceName":"Emma"}}]}]}},"key":"strictValidation","summary":"Validate a SVAML flow using strict mode","id":"paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/requestBody/content/application~1json/examples/strictValidation"},"paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/responses/200/content/application~1json/examples/validPayload":{"value":{"isValid":true},"key":"validPayload","summary":"Validation successful","id":"paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/responses/200/content/application~1json/examples/validPayload"},"paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/responses/200/content/application~1json/examples/invalidPayload":{"value":{"isValid":false,"errors":["Invalid dial command. Missing destination."]},"key":"invalidPayload","summary":"Validation failed","id":"paths/~1v2~1projects~1{projectId}~1svaml~1validate/post/responses/200/content/application~1json/examples/invalidPayload"}},"securitySchemeStore":{"BasicAuth":{"id":"BasicAuth","type":"http","scheme":"basic","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use HTTP Basic authentication."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Username"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Password"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Send credentials in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization: Basic <base64(AccessKeyId:AccessKeySecret)>"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create and manage access keys in the Dashboard:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}]},"SinchOAuth2":{"id":"SinchOAuth2","type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth 2.0 "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client Credentials"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" grant (recommended for production)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Exchange the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") and "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access Key Secret"},"children":[]}]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":") for a short-lived Bearer token."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Tokens typically expire after "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3600 seconds"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". When the token expires,"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"request a new one using the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tokenUrl"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no separate"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"refresh token in the client credentials flow — simply re-authenticate."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access keys are managed in the Dashboard: https://dashboard.sinch.com/settings/access-keys"},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://auth.sinch.com/oauth2/token","refreshUrl":"https://auth.sinch.com/oauth2/token","scopes":{}}}}},"servers":[{"url":"https://voice.api.sinch.com","description":"Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region."},{"url":"https://us1.voice.api.sinch.com","description":"North America 1 - East"},{"url":"https://br1.voice.api.sinch.com","description":"South America 1 - East"},{"url":"https://eu1.voice.api.sinch.com","description":"Europe 1 - Central"},{"url":"https://sg1.voice.api.sinch.com","description":"Asia Pacific 1 - Southeast"},{"url":"https://au1.voice.api.sinch.com"}],"specType":"openapi"},"options":{"sortRequiredPropsFirst":true,"mockServer":{"url":"/_mock/docs/voice-2.0/api-reference/voice","position":"off","description":"Mock server"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/docs/voice-2.0/api-reference/voice.json?download"},{"url":"/_bundle/docs/voice-2.0/api-reference/voice.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Voice API v2","description":"# Core Concepts\n\nThe Voice API enables embedding voice calling into applications for virtually limitless use cases. From **number masking** for privacy, automated **appointment reminders**, and **outreach campaigns** with answering machine detection, to **bridging calls** between PSTN and SIP endpoints, the API offers the flexibility and control needed for modern communications.\n\n## Call Model\n\n{% table %}\n\n- Concept \n- Description\n\n---\n\n- **Session**\n- A session initiates as soon as the first call is created. It serves as a container for all related calls and their connections, maintaining context and state throughout the interaction. The session persists until all associated calls are terminated.\n\n---\n\n- **Call**\n- A single participant's connection in a session (e.g., caller or callee).\n- **Inbound Call:** A call initiated from an external source (PSTN, SIP, etc.) into the service.\n- **Outbound Call:** A call initiated by the service to an external destination.\n\n---\n\n- **Bridge**\n- A mechanism to connect one or more calls, so that participants can communicate with each other.\n![session bridge chart](/images/voicev2/voicev2-session-chart.png)\n\n{% /table %}\n\n### Initiating Calls\n\nThere are a few ways to create a call:\n\n1. **Inbound Calls:** Triggered by incoming traffic from PSTN, SIP, or other sources.\n2. **Outbound Calls (via Dial):** Initiated from within an existing call session using the `dial` command.\n3. **Outbound Calls (via API):** Created directly by sending an API request to the Voice API.\n4. **Call Queuing:** Calls can be queued and processed based on parameters such as priority, time, or custom logic.\n\n### Call Pacing (Batch)\n\nThe new Voice API v2 supports Call pacing via batch calling to efficiently manage high volumes of outbound calls. This is especially useful for scenarios like appointment reminders, notifications, or campaigns where customers need to reach multiple recipients in a controlled and scalable way.\n\n#### How To Initiate Batch Calls\n\nTo initiate several calls in a batch, send a POST request to the `/v2/projects/{projectId}/calls` endpoint. The request body contains a SVAML payload describing the call flow and a list of parameters for each call in the batch. The API queues and triggers calls according to the provided configuration, such as maximum calls per second (`maxCps`) and time-to-live (`ttlSeconds`).\n\n```json\n{\n  \"commands\": [\n    {\n      \"command\": \"dial\",\n      \"callName\": \"batch-notification\",\n      \"from\": { \n        \"type\": \"PHONE\",\n        \"phone\": { \"number\": \"@from\" } \n      },\n      \"to\": { \n        \"type\": \"PHONE\",\n        \"phone\": { \"number\": \"@to\" } \n      },\n      \"events\": {\n        \"onAnswer\": [\n          {\n            \"command\": \"messages\",\n            \"messages\": [\n              {\n                \"type\": \"SAY\",\n                \"say\": {\n                  \"text\": \"Hello @name, you have an appointment tomorrow at 10 AM.\",\n                  \"voiceName\": \"Emma\"\n                }\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ],\n  \"parameters\": [\n    { \"from\": \"+46712345678\", \"to\": \"+46787654321\", \"name\": \"Alice\" },\n    { \"from\": \"+46712345678\", \"to\": \"+46781234567\", \"name\": \"Bob\" }\n  ],\n  \"batchOptions\": {\n    \"maxCps\": 10,\n    \"ttlSeconds\": 60\n  }\n}\n```\n\n- **commands:** SVAML commands describing the call flow for each call in the batch. Parameter placeholders start with `@` and can be used as variables for each call. They can be used alone as in `@from` or in combination with text in a say message (e.g., `Hello @name, your appointment is at @time`).\n- **parameters:** An array of objects, each specifying the values for the placeholders in the commands. Each object represents a call to be queued and triggered.\n- **batchOptions:** Controls how the batch is processed:\n  - `maxCps`: Maximum number of calls per second to be initiated.\n  - `ttlSeconds`: Time-to-live for the batch in seconds; calls not initiated within this time window will be skipped.\n\nThe API responds with metadata for the queued calls:\n\n- **sessionIds:** Each call in the batch is assigned a unique sessionId, which can be used to track the state and progress of individual calls.\n- **batchId:** The batchId identifies the entire batch operation, allowing batch state and summaries to be queried, or the batch to be managed as a whole (e.g., cancel unprocessed calls).\n- **Other properties:** The response may also include other Ids, timestamps, and state related information.\n\n\n#### How Calls Are Triggered\n\nWhen a batch request is submitted:\n1. The API validates the SVAML commands and parameters.\n2. Calls are queued and triggered according to `maxCps` and `ttlSeconds` settings.\n3. Each call is processed independently, using the provided parameters to personalize the call flow.\n4. The API tracks the state of each call (e.g., `QUEUED`, `INITIATED`, `IN_PROGRESS`, `COMPLETED`).\n5. Batch progress can be monitored and summaries can be retrieved via the [GET] `/v2/projects/{projectId}/batches/{batchId}` endpoint.\n\n## Call Lifecycle\n\nA call progresses through several states from creation to completion.\n\n**Call States**\n\n{% table %}\n\n- State\n- Description\n\n---\n\n- `QUEUED` \n- Call is waiting to be processed.\n\n---\n\n- `INITIATED`\n- Call setup is in progress (ringing).\n\n---\n\n- `IN_PROGRESS`\n- Call is answered and active.\n\n---\n\n- `COMPLETED`\n- Call ended normally.\n\n---\n\n- `REJECTED`\n- Recipient rejected the call.\n\n---\n\n- `NO_ANSWER`\n- Recipient did not answer.\n\n---\n\n- `CANCEL`\n- Call was cancelled before being answered.\n\n---\n\n- `BUSY`\n- Recipient was busy.\n\n---\n\n- `FAILED`\n- Call could not be set up.\n\n{% /table %}\n\n**Call Transitions**\n\n![transition states flowchart](/images/voicev2/voicev2-transition-states.png)\n\nThis diagram shows how a call moves between states. Typically, most calls start at `QUEUED`, progress to `INITIATED`, and either get answered (`IN_PROGRESS`) or end in a final state (`COMPLETED`, `NO_ANSWER`, etc.).\n\n## Handling Events with Webhooks\n\nWhen a specific event occurs (for example, a call is answered), the Voice API v2 sends an HTTP request (usually POST) to the webhook URL configured in service settings. The request contains details about the event, such as call identifiers and timestamps. The application can then respond with [SVAML commands](/docs/voice-2.0/api-reference/svaml) to control the ongoing call or perform other actions.\n\n### Typical Request-Response Cycle\n\n1. An event (e.g., call.answered) occurs in the Voice API.\n2. The API sends a POST request to the configured webhook endpoint with event details.\n3. The server processes the event and responds with SVAML commands (e.g., play a message, gather input).\n4. The API executes the commands and updates the call state.\n\n```mermaid\nsequenceDiagram\n  participant VoiceAPI as Voice API\n  participant Backend as Application Backend\n  VoiceAPI ->> Backend: POST webhook (event details)\n  Backend ->> VoiceAPI: SVAML commands (response)\n  VoiceAPI ->> Backend: Further webhooks (if needed)\n  Backend ->> VoiceAPI: Additional SVAML commands\n```\n\nWebhook endpoints must respond within 5 seconds. If the endpoint fails or times out and a `fallbackUrl` is configured, the request is re-sent to the fallback URL. See *Timeouts and failover* in the **Webhooks** section for the algorithm and its effect on delivery guarantees.\n\n### Webhooks vs. Events\n\n- **Webhooks:** External HTTP notifications sent to the application when specific events occur.\n- **Events:** Internal API notifications about call state changes; can be exposed via webhooks for external handling or internally by predefining event handlers in SVAML commands.\n\n### Event Naming Convention\n\nEvents are named using the pattern `resource.command.event`.\n\nFor example:\n- `call.answered`: Indicates that a call was answered.\n- `call.amd.machine`: Indicates that the Answering Machine Detection (AMD) on a call detected a machine.\n\nThis convention helps clearly identify the resource, the command involved, and the specific event that occurred.\n\n#### Common Webhook Events\n\n- `call.incoming`: Triggered when a call is received from PSTN, SIP, etc.\n- `call.answered`: Triggered when a call is answered.\n- `call.hangup`: Triggered when a call is hung up.\n\n### Precedence Rules\n\nWhen handling events in call flows, the Voice API applies the following precedence rules to determine which SVAML commands are executed:\n\n- **Command-Level Event Handlers:**  \n  If an event handler (e.g., `on_answer`, `on_machine`) is defined directly within a SVAML command, the commands specified in that handler are executed first for that event.\n\n- **Service Configuration Fallback:**  \n  If the event handler is not defined in the SVAML command, the API falls back to the event handler defined in the service configuration. This allows default behaviors for events to be set at the service level.\n\n- **Execution Order:**  \n  - Command-level event handlers always take priority over service-level handlers.\n  - If neither is defined, the event is ignored and no commands are executed for that event.\n\n**Best Practice:**  \nDefine event handlers in SVAML commands for custom, per-call logic. Use service configuration event handlers for default or global behaviors across all calls.\n\n\n### Webhook Request Example\n\nWhen a call is answered, the API sends a POST request to the configured webhook endpoint that includes the event type and the current call details.\n\nThe webhook endpoint should return a valid SVAML payload specifying which commands to execute on the call. For example, the response below synthesizes a welcome message and then ends the call.\n\n```json\n{\n  \"commands\": [\n    {\n      \"command\": \"messages\",\n      \"messages\": [\n        {\n          \"type\": \"SAY\",\n          \"say\": {\n            \"text\": \"Welcome to our service!\",\n            \"voiceName\": \"Emma\"\n          }\n        }\n      ],\n      \"events\": {\n        \"onFinish\": [\n          {\n            \"command\": \"hangup\"\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n\n### Regions\n\nThe following table displays the servers available for each region.\n\n| Region | Server |\n| ------ | ------ |\n| Global endpoint - Redirected by Sinch to the closest region. | `https://voice.api.sinch.com` |\n| North America 1 - East | `https://us1.voice.api.sinch.com` |\n| South America 1 - East | `https://br1.voice.api.sinch.com` |\n| Europe 1 - Central | `https://eu1.voice.api.sinch.com` |\n| Asia Pacific 1 - Southeast | `https://sg1.voice.api.sinch.com` |\n| Australia & Oceania 1 - Southeast | `https://au1.voice.api.sinch.com` |\n\n### Best Practices\n\n- **Respond Quickly:** Webhook requests should be processed and responded to as quickly as possible to avoid call delays.\n- **Idempotency:** A failed request is re-sent to the fallback URL, so the same event can arrive more than once. Make the handler idempotent and deduplicate on the `ce-id` and `ce-source` headers — see *Timeouts and failover* in the **Webhooks** section.\n- **Logging:** Log incoming webhook requests and responses for troubleshooting and auditing.\n- **Validation:** Validate incoming requests to ensure they are from the Voice API (see Security below).\n\n### Security\n\nTo safeguard a webhook endpoint, verify that incoming requests are genuinely sent by the Voice API and have not been altered in transit. This prevents unauthorized access and mitigates risks such as man-in-the-middle attacks.\n\n1. Each service has an identifier and a secret.\n2. When a webhook arrives, use the secret to compute a signature over the canonical request string.\n3. Compare the computed signature to the one in the request authorization header.\n4. Only process the webhook if the signatures match.\n\nFor the exact `Authorization` header format, the canonical string that is signed, the signature algorithm and a worked example, see *Request signing* on the **Call webhook** operation in the **Webhooks** section.\n\nAccess to the webhook endpoint may also be restricted by IP address, and HTTPS can be used to encrypt traffic.\n","summary":"Make and receive voice calls with Sinch's RESTful Voice API interface."}},"baseSlug":"/docs/voice-2.0/api-reference/voice","routesMapping":{}}