SignalWire · Schema
SWML Object
CompanyCommunicationsCPaaSVoiceMessagingSMSVideoWebRTCSIPTelephonyFaxAI AgentsConversational AIContact Center
Properties
| Name | Type | Description |
|---|---|---|
| version | string | |
| sections | object |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "SWMLObject.json",
"type": "object",
"properties": {
"version": {
"type": "string",
"const": "1.0.0"
},
"sections": {
"$ref": "#/$defs/Section"
}
},
"required": [
"sections"
],
"unevaluatedProperties": {
"not": {}
},
"title": "SWML Object",
"$defs": {
"Section": {
"type": "object",
"properties": {
"main": {
"type": "array",
"items": {
"$ref": "#/$defs/SWMLMethod"
}
}
},
"required": [
"main"
],
"unevaluatedProperties": {
"type": "array",
"items": {
"$ref": "#/$defs/SWMLMethod"
}
},
"title": "SWML section"
},
"SWMLMethod": {
"anyOf": [
{
"$ref": "#/$defs/Answer"
},
{
"$ref": "#/$defs/AI"
},
{
"$ref": "#/$defs/AmazonBedrock"
},
{
"$ref": "#/$defs/Cond"
},
{
"$ref": "#/$defs/Connect"
},
{
"$ref": "#/$defs/Denoise"
},
{
"$ref": "#/$defs/EnterQueue"
},
{
"$ref": "#/$defs/Execute"
},
{
"$ref": "#/$defs/Goto"
},
{
"$ref": "#/$defs/Label"
},
{
"$ref": "#/$defs/LiveTranscribe"
},
{
"$ref": "#/$defs/LiveTranslate"
},
{
"$ref": "#/$defs/Hangup"
},
{
"$ref": "#/$defs/JoinRoom"
},
{
"$ref": "#/$defs/JoinConference"
},
{
"$ref": "#/$defs/Play"
},
{
"$ref": "#/$defs/Prompt"
},
{
"$ref": "#/$defs/ReceiveFax"
},
{
"$ref": "#/$defs/Record"
},
{
"$ref": "#/$defs/RecordCall"
},
{
"$ref": "#/$defs/Request"
},
{
"$ref": "#/$defs/Return"
},
{
"$ref": "#/$defs/SendDigits"
},
{
"$ref": "#/$defs/SendFax"
},
{
"$ref": "#/$defs/SendSMS"
},
{
"$ref": "#/$defs/Set"
},
{
"$ref": "#/$defs/Sleep"
},
{
"$ref": "#/$defs/SIPRefer"
},
{
"$ref": "#/$defs/StopDenoise"
},
{
"$ref": "#/$defs/StopRecordCall"
},
{
"$ref": "#/$defs/StopTap"
},
{
"$ref": "#/$defs/Switch"
},
{
"$ref": "#/$defs/Tap"
},
{
"$ref": "#/$defs/Transfer"
},
{
"$ref": "#/$defs/Unset"
},
{
"$ref": "#/$defs/Pay"
},
{
"$ref": "#/$defs/DetectMachine"
},
{
"$ref": "#/$defs/UserEvent"
}
],
"title": "SWML methods"
},
"Answer": {
"type": "object",
"properties": {
"answer": {
"type": "object",
"properties": {
"max_duration": {
"anyOf": [
{
"type": "integer"
},
{
"$ref": "#/$defs/SWMLVar"
}
],
"default": 14400,
"examples": [
3600
],
"description": "Maximum duration in seconds for the call. Defaults to `14400` seconds (4 hours)."
},
"codecs": {
"type": "string",
"examples": [
"PCMU,PCMA,OPUS"
],
"description": "Comma-separated string of codecs to offer. Valid codecs are: PCMU, PCMA, G722, G729, AMR-WB, OPUS, VP8, H264."
},
"username": {
"type": "string",
"examples": [
"user123"
],
"description": "Username to use for SIP authentication."
},
"password": {
"type": "string",
"examples": [
"securepassword"
],
"description": "Password to use for SIP authentication."
}
},
"unevaluatedProperties": {
"not": {}
},
"description": "Answer incoming call and set an optional maximum duration.",
"title": "answer"
}
},
"required": [
"answer"
],
"unevaluatedProperties": {
"not": {}
},
"title": "answer Method"
},
"AI": {
"type": "object",
"properties": {
"ai": {
"$ref": "#/$defs/AIObject",
"description": "Creates an AI agent that conducts voice conversations using automatic speech recognition (ASR),\nlarge language models (LLMs), and text-to-speech (TTS) synthesis.\nThe agent processes caller speech in real-time, generates contextually appropriate responses,\nand can execute custom functions to interact with external systems through SignalWire AI Gateway (SWAIG).",
"title": "ai"
}
},
"required": [
"ai"
],
"unevaluatedProperties": {
"not": {}
},
"title": "ai Method"
},
"AmazonBedrock": {
"type": "object",
"properties": {
"amazon_bedrock": {
"$ref": "#/$defs/AmazonBedrockObject",
"description": "Creates a new Bedrock AI Agent"
}
},
"required": [
"amazon_bedrock"
],
"unevaluatedProperties": {
"not": {}
},
"title": "amazon_bedrock Method"
},
"Cond": {
"type": "object",
"properties": {
"cond": {
"type": "array",
"items": {
"$ref": "#/$defs/CondParams"
},
"description": "Execute a sequence of instructions depending on the value of a JavaScript condition.",
"title": "cond"
}
},
"required": [
"cond"
],
"unevaluatedProperties": {
"not": {}
},
"title": "cond Method"
},
"Connect": {
"type": "object",
"properties": {
"connect": {
"oneOf": [
{
"$ref": "#/$defs/ConnectDeviceSingle"
},
{
"$ref": "#/$defs/ConnectDeviceSerial"
},
{
"$ref": "#/$defs/ConnectDeviceParallel"
},
{
"$ref": "#/$defs/ConnectDeviceSerialParallel"
}
],
"description": "Connect to a phone number, SIP URI, Call Fabric resource, queue, or WebSocket stream."
}
},
"required": [
"connect"
],
"unevaluatedProperties": {
"not": {}
},
"title": "connect Method"
},
"Denoise": {
"type": "object",
"properties": {
"denoise": {
"type": "object",
"properties": {},
"unevaluatedProperties": {
"not": {}
},
"examples": [
{}
],
"description": "Start noise reduction. You can stop it at any time using `stop_denoise`."
}
},
"required": [
"denoise"
],
"unevaluatedProperties": {
"not": {}
},
"title": "denoise Method"
},
"EnterQueue": {
"type": "object",
"properties": {
"enter_queue": {
"$ref": "#/$defs/EnterQueueObject",
"description": "Place the current call in a named queue where it will wait to be connected to an available agent or resource.\nWhile waiting, callers will hear music or custom audio.\nWhen an agent connects to the queue (using the connect method), the caller and agent are bridged together.\nAfter the bridge completes, execution continues with the SWML script specified in transfer_after_bridge.",
"title": "enter_queue"
}
},
"required": [
"enter_queue"
],
"unevaluatedProperties": {
"not": {}
},
"title": "enter_queue Method"
},
"Execute": {
"type": "object",
"properties": {
"execute": {
"type": "object",
"properties": {
"dest": {
"type": "string",
"examples": [
"https://example.com/swml-handler"
],
"description": "Specifies what to execute. The value can be one of:\n- `<section_name>` - section in the current document to execute\n- A URL (http or https) that returns a SWML document - Sends HTTP POST\n- An inline SWML document (as a JSON string)"
},
"params": {
"type": "object",
"properties": {},
"unevaluatedProperties": {},
"examples": [
{
"caller_id": "+15551234567",
"language": "en-US"
}
],
"description": "Named parameters to send to section or URL"
},
"meta": {
"type": "object",
"properties": {},
"unevaluatedProperties": {},
"examples": [
{
"request_id": "req_abc123",
"source": "ivr"
}
],
"description": "User-defined metadata, ignored by SignalWire"
},
"on_return": {
"type": "array",
"items": {
"$ref": "#/$defs/SWMLMethod"
},
"description": "The list of SWML instructions to be executed when the executed section or URL returns"
},
"result": {
"anyOf": [
{
"$ref": "#/$defs/ExecuteSwitch"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/CondParams"
},
"description": "Execute a sequence of instructions depending on the value of a JavaScript condition.",
"title": "cond"
}
],
"description": "Action to take based on the result of the call. This will run once the peer leg of the call has ended.\nWill use the switch method when the return_value is an object, and will use the cond method when the return_value is an array."
}
},
"required": [
"dest"
],
"unevaluatedProperties": {
"not": {}
},
"description": "Execute a specified section or URL as a subroutine, and upon completion, return to the current document.\nUse the return statement to pass any return values or objects back to the current document."
}
},
"required": [
"execute"
],
"unevaluatedProperties": {
"not": {}
},
"title": "execute Method"
},
"Goto": {
"type": "object",
"properties": {
"goto": {
"type": "object",
"properties": {
"label": {
"type": "string",
"examples": [
"greeting"
],
"description": "Mark any point of the SWML section with a label so that goto can jump to it."
},
"when": {
"type": "string",
"examples": [
"vars.retry_count < 3"
],
"description": "A JavaScript condition that determines whether to perform the jump. If the condition evaluates to true, the jump is executed. If omitted, the jump is unconditional."
},
"max": {
"anyOf": [
{
"type": "integer"
},
{
"$ref": "#/$defs/SWMLVar"
}
],
"default": 100,
"examples": [
3
],
"minimum": 1,
"maximum": 100,
"description": "The maximum number of times to perform the jump. Must be a number between 1 and 100. Default `100`."
}
},
"required": [
"label"
],
"unevaluatedProperties": {
"not": {}
},
"description": "Jump to a label within the current section, optionally based on a condition.\nThe goto method will only navigate to a label within the same section."
}
},
"required": [
"goto"
],
"unevaluatedProperties": {
"not": {}
},
"title": "goto Method"
},
"Label": {
"type": "object",
"properties": {
"label": {
"type": "string",
"examples": [
"greeting"
],
"description": "Mark any point of the SWML section with a label so that goto can jump to it."
}
},
"required": [
"label"
],
"unevaluatedProperties": {
"not": {}
},
"title": "label Method"
},
"LiveTranscribe": {
"type": "object",
"properties": {
"live_transcribe": {
"type": "object",
"properties": {
"action": {
"$ref": "#/$defs/TranscribeAction",
"description": "The action to perform during live transcription."
}
},
"required": [
"action"
],
"unevaluatedProperties": {
"not": {}
},
"description": "Start live transcription of the call. The transcription will be sent to the specified webhook URL.",
"title": "live_transcribe"
}
},
"required": [
"live_transcribe"
],
"unevaluatedProperties": {
"not": {}
},
"title": "live_transcribe Method"
},
"LiveTranslate": {
"type": "object",
"properties": {
"live_translate": {
"type": "object",
"properties": {
"action": {
"$ref": "#/$defs/TranslateAction",
"description": "The action to perform during live translation."
}
},
"required": [
"action"
],
"unevaluatedProperties": {
"not": {}
},
"description": "Start live translation of the call. The translation will be sent to the specified webhook URL.",
"title": "live_translate"
}
},
"required": [
"live_translate"
],
"unevaluatedProperties": {
"not": {}
},
"title": "live_translate Method"
},
"Hangup": {
"type": "object",
"properties": {
"hangup": {
"type": "object",
"properties": {
"reason": {
"anyOf": [
{
"type": "string",
"const": "hangup"
},
{
"type": "string",
"const": "busy"
},
{
"type": "string",
"const": "decline"
}
],
"examples": [
"busy"
],
"description": "The reason for hanging up the call."
}
},
"unevaluatedProperties": {
"not": {}
},
"description": "End the call with an optional reason.",
"title": "hangup"
}
},
"required": [
"hangup"
],
"unevaluatedProperties": {
"not": {}
},
"title": "hangup Method"
},
"JoinRoom": {
"type": "object",
"properties": {
"join_room": {
"type": "object",
"properties": {
"name": {
"type": "string",
"examples": [
"my-video-room"
],
"description": "Name of the room to join. Allowed characters: A-Z, a-z, 0-9, underscore, and hyphen."
}
},
"required": [
"name"
],
"unevaluatedProperties": {
"not": {}
},
"description": "Join a Relay room. If the room doesn't exist, it creates a new room.",
"title": "join_room"
}
},
"required": [
"join_room"
],
"unevaluatedProperties": {
"not": {}
},
"title": "join_room Method"
},
"JoinConference": {
"type": "object",
"properties": {
"join_conference": {
"$ref": "#/$defs/JoinConferenceObject",
"description": "Join an ad-hoc audio conference started on either the SignalWire or Compatibility API.\nThis method allows you to connect the current call to a named conference where multiple participants can communicate simultaneously.",
"title": "join_conference"
}
},
"required": [
"join_conference"
],
"unevaluatedProperties": {
"not": {}
},
"title": "join_conference Method"
},
"Play": {
"type": "object",
"properties": {
"play": {
"oneOf": [
{
"$ref": "#/$defs/PlayWithURL"
},
{
"$ref": "#/$defs/PlayWithURLS"
}
],
"description": "Play file(s), ringtones, speech or silence.",
"title": "play"
}
},
"required": [
"play"
],
"unevaluatedProperties": {
"not": {}
},
"title": "play Method"
},
"Prompt": {
"type": "object",
"properties": {
"prompt": {
"type": "object",
"properties": {
"play": {
"anyOf": [
{
"$ref": "#/$defs/play_url"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/play_url"
}
},
{
"$ref": "#/$defs/SWMLVar"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/SWMLVar"
}
}
],
"examples": [
"say:Please press 1 for sales or 2 for support"
],
"description": "URL or array of URLs to play.\nAllowed URLs are:\n http:// or https:// - audio file to GET\n ring:[duration:]<country code> - ring tone to play. For example: ring:us to play single ring or ring:20.0:us to play ring for 20 seconds.\n say:<text to speak> - Sentence to say\n silence: <duration> - seconds of silence to play"
},
"volume": {
"type": "number",
"default": 0,
"examples": [
0
],
"minimum": -40,
"maximum": 40,
"description": "Volume level for the audio file.\nDefault is `0`.\nValid range is -40 to 40."
},
"say_voice": {
"type": "string",
"default": "Polly.Salli",
"examples": [
"Polly.Joanna"
],
"description": "The voice to use for the text to speech."
},
"say_language": {
"type": "string",
"default": "en-US",
"examples": [
"en-US"
],
"description": "The language to use for the text to speech."
},
"say_gender": {
"type": "string",
"default": "female",
"examples": [
"female"
],
"description": "The gender to use for the text to speech."
},
"max_digits": {
"anyOf": [
{
"type": "integer"
},
{
"$ref": "#/$defs/SWMLVar"
}
],
"default": 1,
"examples": [
4
],
"description": "Number of digits to collect.\nDefault is `1`."
},
"terminators": {
"type": "string",
"examples": [
"#"
],
"description": "Digits that terminate digit collection.\nDefault is not set."
},
"digit_timeout": {
"anyOf": [
{
"type": "number"
},
{
"$ref": "#/$defs/SWMLVar"
}
],
"default": 5,
"examples": [
5
],
"description": "Time in seconds to wait for next digit.\nDefault is `5.0` seconds."
},
"initial_timeout": {
"anyOf": [
{
"type": "number"
},
{
"$ref": "#/$defs/SWMLVar"
}
],
"default": 5,
"examples": [
10
],
"description": "Time in seconds to wait for start of input.\nDefault is `5.0` seconds."
},
"speech_timeout": {
"anyOf": [
{
"type": "number"
},
{
"$ref": "#/$defs/SWMLVar"
}
],
"examples": [
15
],
"description": "Max time in seconds to wait for speech result."
},
"speech_end_timeout": {
"anyOf": [
{
"type": "number"
},
{
"$ref": "#/$defs/SWMLVar"
}
],
"examples": [
2
],
"description": "Time in seconds to wait for end of speech utterance."
},
"speech_language": {
"type": "string",
"examples": [
"en-US"
],
"description": "Language to detect speech in."
},
"speech_hints": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "array",
"items": {
"$ref": "#/$defs/SWMLVar"
}
}
],
"examples": [
[
"sales",
"support",
"billing"
]
],
"description": "Expected words or phrases to help the speech recognition."
},
"speech_engine": {
"type": "string",
"examples": [
"Deepgram"
],
"description": "The engine that is selected for speech recognition. The engine must support the specified language.\n[Deepgram|Google| etc...] Default is not set (SignalWire picks the engine)."
},
"status_url": {
"type"
# --- truncated at 32 KB (500 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/signalwire/refs/heads/main/json-schema/signalwire-swml.json
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/signalwire-swml"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.