{
  "openapi": "3.1.0",
  "info": {
    "title": "Ruut Voice API",
    "version": "1.0.0",
    "description": "Build calls and messaging with the account API, or manage infrastructure with the carrier API. Use account-scoped credentials for /2010-04-01 endpoints and carrier credentials for /carrier endpoints. IDs are the resource identifiers returned by your workspace. The reference covers the documented public endpoints; deployment capabilities depend on your carrier configuration."
  },
  "servers": [
    {
      "url": "/",
      "description": "This Ruut Voice deployment"
    }
  ],
  "tags": [
    {
      "name": "Carrier accounts"
    },
    {
      "name": "Carrier agent extensions"
    },
    {
      "name": "Carrier balances"
    },
    {
      "name": "Carrier events"
    },
    {
      "name": "Carrier messages"
    },
    {
      "name": "Carrier phone calls"
    },
    {
      "name": "Carrier phone numbers"
    },
    {
      "name": "Carrier rates"
    },
    {
      "name": "Carrier ring groups"
    },
    {
      "name": "Carrier SIP trunks"
    },
    {
      "name": "Carrier TTS events"
    },
    {
      "name": "Agent extensions API"
    },
    {
      "name": "AvailablePhoneNumbers API"
    },
    {
      "name": "Calls API"
    },
    {
      "name": "IncomingPhoneNumbers API"
    },
    {
      "name": "Messages API"
    },
    {
      "name": "Recordings API"
    }
  ],
  "paths": {
    "/carrier/v1/accounts": {
      "post": {
        "tags": [
          "Carrier accounts"
        ],
        "summary": "Create an account",
        "operationId": "post__carrier_v1_accounts",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "account"
                      },
                      "attributes": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Account name."
                          },
                          "default_tts_voice": {
                            "type": "string",
                            "description": "Default TTS voice."
                          },
                          "metadata": {
                            "type": "object",
                            "description": "Arbitrary key/value metadata."
                          }
                        }
                      }
                    },
                    "required": [
                      "type",
                      "attributes"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Carrier accounts"
        ],
        "summary": "List accounts",
        "operationId": "get__carrier_v1_accounts",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return all accounts on the carrier."
      }
    },
    "/carrier/v1/accounts/{id}": {
      "get": {
        "tags": [
          "Carrier accounts"
        ],
        "summary": "Fetch an account",
        "operationId": "get__carrier_v1_accounts_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return a single account."
      },
      "patch": {
        "tags": [
          "Carrier accounts"
        ],
        "summary": "Update an account",
        "operationId": "patch__carrier_v1_accounts_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "account"
                      },
                      "id": {
                        "type": "string",
                        "description": "The account ID."
                      },
                      "attributes": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Account name."
                          },
                          "status": {
                            "type": "string",
                            "description": "active or suspended."
                          },
                          "default_tts_voice": {
                            "type": "string",
                            "description": "Default TTS voice."
                          },
                          "metadata": {
                            "type": "object",
                            "description": "Arbitrary key/value metadata."
                          }
                        }
                      }
                    },
                    "required": [
                      "type",
                      "attributes"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Carrier accounts"
        ],
        "summary": "Delete an account",
        "operationId": "delete__carrier_v1_accounts_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Permanently delete the account and its resources. This cannot be undone."
      }
    },
    "/carrier/v1/accounts/{account_id}/agent_extensions": {
      "post": {
        "tags": [
          "Carrier agent extensions"
        ],
        "summary": "Create an extension",
        "operationId": "post__carrier_v1_accounts_account_id_agent_extensions",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "agent_extension"
                      },
                      "attributes": {
                        "type": "object",
                        "properties": {
                          "agent_name": {
                            "type": "string",
                            "description": "Agent's name."
                          },
                          "extension": {
                            "type": "string",
                            "description": "Optional explicit extension number."
                          }
                        }
                      }
                    },
                    "required": [
                      "type",
                      "attributes"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Carrier agent extensions"
        ],
        "summary": "List extensions",
        "operationId": "get__carrier_v1_accounts_account_id_agent_extensions",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return an account's extensions."
      }
    },
    "/carrier/v1/accounts/{account_id}/agent_extensions/{id}": {
      "get": {
        "tags": [
          "Carrier agent extensions"
        ],
        "summary": "Fetch an extension",
        "operationId": "get__carrier_v1_accounts_account_id_agent_extensions_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return a single extension."
      },
      "patch": {
        "tags": [
          "Carrier agent extensions"
        ],
        "summary": "Update an extension",
        "operationId": "patch__carrier_v1_accounts_account_id_agent_extensions_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Update the agent name or status.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "agent_extension"
                      },
                      "id": {
                        "type": "string",
                        "description": "The extension ID."
                      },
                      "attributes": {
                        "type": "object",
                        "properties": {
                          "agent_name": {
                            "type": "string",
                            "description": "Agent's name."
                          },
                          "status": {
                            "type": "string",
                            "description": "online, offline, busy, away, dnd."
                          }
                        }
                      }
                    },
                    "required": [
                      "type",
                      "attributes"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Carrier agent extensions"
        ],
        "summary": "Delete an extension",
        "operationId": "delete__carrier_v1_accounts_account_id_agent_extensions_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Permanently delete the extension. The agent can no longer register or receive calls."
      }
    },
    "/carrier/v1/accounts/{account_id}/balances": {
      "get": {
        "tags": [
          "Carrier balances"
        ],
        "summary": "Read balances",
        "operationId": "get__carrier_v1_accounts_account_id_balances",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return the account's wallet balance."
      }
    },
    "/carrier/v1/accounts/{account_id}/balances/top_up": {
      "post": {
        "tags": [
          "Carrier balances"
        ],
        "summary": "Top up",
        "operationId": "post__carrier_v1_accounts_account_id_balances_top_up",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Add credit to the account wallet.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "category": {
                    "type": "string",
                    "description": "Product line for the ledger (voice, sms, ai, ...). The credit always lands in the single wallet."
                  },
                  "amount_cents": {
                    "type": "integer",
                    "description": "Amount to add in minor units."
                  },
                  "description": {
                    "type": "string",
                    "description": "Optional memo."
                  }
                },
                "required": [
                  "category",
                  "amount_cents"
                ]
              }
            }
          }
        }
      }
    },
    "/carrier/v1/accounts/{account_id}/balances/debit": {
      "post": {
        "tags": [
          "Carrier balances"
        ],
        "summary": "Debit",
        "operationId": "post__carrier_v1_accounts_account_id_balances_debit",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Manually deduct from the account wallet (e.g. for a refund or correction).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "category": {
                    "type": "string",
                    "description": "Product line for the ledger (voice, sms, ai, ...)."
                  },
                  "amount_cents": {
                    "type": "integer",
                    "description": "Amount to deduct in minor units."
                  },
                  "description": {
                    "type": "string",
                    "description": "Optional memo."
                  }
                },
                "required": [
                  "category",
                  "amount_cents"
                ]
              }
            }
          }
        }
      }
    },
    "/carrier/v1/accounts/{account_id}/balances/transactions": {
      "get": {
        "tags": [
          "Carrier balances"
        ],
        "summary": "Transactions",
        "operationId": "get__carrier_v1_accounts_account_id_balances_transactions",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Restrict to a product-line category."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Max transactions to return (default 50)."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "List the account's balance transactions."
      }
    },
    "/carrier/v1/events": {
      "get": {
        "tags": [
          "Carrier events"
        ],
        "summary": "List events",
        "operationId": "get__carrier_v1_events",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "filter[account_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Restrict to an account."
            }
          },
          {
            "name": "filter[type]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by event type."
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "0-indexed page."
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records per page."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return events across the carrier."
      }
    },
    "/carrier/v1/events/{id}": {
      "get": {
        "tags": [
          "Carrier events"
        ],
        "summary": "Fetch an event",
        "operationId": "get__carrier_v1_events_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return a single event."
      }
    },
    "/carrier/v1/messages": {
      "get": {
        "tags": [
          "Carrier messages"
        ],
        "summary": "List messages",
        "operationId": "get__carrier_v1_messages",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "filter[account_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Restrict to an account."
            }
          },
          {
            "name": "filter[to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by destination."
            }
          },
          {
            "name": "filter[from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by sender."
            }
          },
          {
            "name": "filter[status]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by status."
            }
          },
          {
            "name": "filter[message_type]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by type (e.g. sms)."
            }
          },
          {
            "name": "filter[created_at]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by creation time."
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "0-indexed page."
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records per page."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return messages across the carrier, filterable."
      }
    },
    "/carrier/v1/messages/{id}": {
      "get": {
        "tags": [
          "Carrier messages"
        ],
        "summary": "Fetch a message",
        "operationId": "get__carrier_v1_messages_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return a single message."
      },
      "patch": {
        "tags": [
          "Carrier messages"
        ],
        "summary": "Update a message",
        "operationId": "patch__carrier_v1_messages_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Update billing data on a message (e.g. set a manual price).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "message"
                      },
                      "id": {
                        "type": "string",
                        "description": "The message ID."
                      },
                      "attributes": {
                        "type": "object",
                        "properties": {
                          "price": {
                            "type": "string",
                            "description": "Override the message price."
                          }
                        }
                      }
                    },
                    "required": [
                      "type",
                      "attributes"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        }
      }
    },
    "/carrier/v1/phone_calls": {
      "get": {
        "tags": [
          "Carrier phone calls"
        ],
        "summary": "List phone calls",
        "operationId": "get__carrier_v1_phone_calls",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "filter[account_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Restrict to an account."
            }
          },
          {
            "name": "filter[status]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by status."
            }
          },
          {
            "name": "filter[direction]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by direction."
            }
          },
          {
            "name": "filter[from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by origin."
            }
          },
          {
            "name": "filter[to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by destination."
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "0-indexed page."
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records per page."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return calls across the carrier, filterable."
      }
    },
    "/carrier/v1/phone_calls/{id}": {
      "get": {
        "tags": [
          "Carrier phone calls"
        ],
        "summary": "Fetch a call",
        "operationId": "get__carrier_v1_phone_calls_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return a single call."
      },
      "patch": {
        "tags": [
          "Carrier phone calls"
        ],
        "summary": "Update a call",
        "operationId": "patch__carrier_v1_phone_calls_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Update billing data on a call (e.g. to set a manual price).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "phone_call"
                      },
                      "id": {
                        "type": "string",
                        "description": "The call ID."
                      },
                      "attributes": {
                        "type": "object",
                        "properties": {
                          "price": {
                            "type": "string",
                            "description": "Override the call price."
                          }
                        }
                      }
                    },
                    "required": [
                      "type",
                      "attributes"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        }
      }
    },
    "/carrier/v1/phone_numbers": {
      "post": {
        "tags": [
          "Carrier phone numbers"
        ],
        "summary": "Create / provision a number",
        "operationId": "post__carrier_v1_phone_numbers",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "phone_number"
                      },
                      "attributes": {
                        "type": "object",
                        "properties": {
                          "number": {
                            "type": "string",
                            "description": "The E.164 number to provision."
                          },
                          "visibility": {
                            "type": "string",
                            "description": "public or private."
                          },
                          "country": {
                            "type": "string",
                            "description": "ISO country code (e.g. NG)."
                          },
                          "price": {
                            "type": "string",
                            "description": "Monthly price customers are charged."
                          },
                          "region": {
                            "type": "string",
                            "description": "Region / area code."
                          },
                          "locality": {
                            "type": "string",
                            "description": "Locality name."
                          },
                          "rate_center": {
                            "type": "string",
                            "description": "Rate center."
                          },
                          "lata": {
                            "type": "string",
                            "description": "Local access transport area."
                          },
                          "latitude": {
                            "type": "number",
                            "description": "Latitude."
                          },
                          "longitude": {
                            "type": "number",
                            "description": "Longitude."
                          },
                          "metadata": {
                            "type": "object",
                            "description": "Arbitrary metadata."
                          }
                        }
                      }
                    },
                    "required": [
                      "type",
                      "attributes"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Carrier phone numbers"
        ],
        "summary": "List phone numbers",
        "operationId": "get__carrier_v1_phone_numbers",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "filter[visibility]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by visibility."
            }
          },
          {
            "name": "filter[country]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by country code."
            }
          },
          {
            "name": "filter[number]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by number."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return all numbers, with optional filters."
      }
    },
    "/carrier/v1/phone_numbers/stats": {
      "get": {
        "tags": [
          "Carrier phone numbers"
        ],
        "summary": "Number stats",
        "operationId": "get__carrier_v1_phone_numbers_stats",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "from_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Start date for the stats window."
            }
          },
          {
            "name": "to_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "End date for the stats window."
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Restrict to one account."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return aggregate statistics across the carrier's numbers."
      }
    },
    "/carrier/v1/phone_numbers/{id}": {
      "get": {
        "tags": [
          "Carrier phone numbers"
        ],
        "summary": "Fetch a number",
        "operationId": "get__carrier_v1_phone_numbers_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return a single phone number."
      },
      "patch": {
        "tags": [
          "Carrier phone numbers"
        ],
        "summary": "Update a number",
        "operationId": "patch__carrier_v1_phone_numbers_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Update price, visibility, metadata, and other attributes."
      },
      "delete": {
        "tags": [
          "Carrier phone numbers"
        ],
        "summary": "Release a number",
        "operationId": "delete__carrier_v1_phone_numbers_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Release the number back to the inventory."
      }
    },
    "/carrier/v1/rates": {
      "post": {
        "tags": [
          "Carrier rates"
        ],
        "summary": "Create a rate",
        "operationId": "post__carrier_v1_rates",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "rate"
                      },
                      "attributes": {
                        "type": "object",
                        "properties": {
                          "event_type": {
                            "type": "string",
                            "description": "The event type being priced."
                          },
                          "rate_cents": {
                            "type": "string",
                            "description": "Price in minor units (e.g. kobo/cents)."
                          },
                          "unit": {
                            "type": "string",
                            "description": "Billing unit (minute, message, char)."
                          },
                          "currency": {
                            "type": "string",
                            "description": "ISO currency code (e.g. NGN)."
                          }
                        }
                      }
                    },
                    "required": [
                      "type",
                      "attributes"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Carrier rates"
        ],
        "summary": "List rates",
        "operationId": "get__carrier_v1_rates",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Restrict to one account's rates."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return all rates, optionally scoped to an account."
      }
    },
    "/carrier/v1/rates/{id}": {
      "get": {
        "tags": [
          "Carrier rates"
        ],
        "summary": "Fetch a rate",
        "operationId": "get__carrier_v1_rates_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return a single rate."
      },
      "patch": {
        "tags": [
          "Carrier rates"
        ],
        "summary": "Update a rate",
        "operationId": "patch__carrier_v1_rates_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Change the rate or unit for an event type."
      },
      "delete": {
        "tags": [
          "Carrier rates"
        ],
        "summary": "Delete a rate",
        "operationId": "delete__carrier_v1_rates_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Remove the rate. Future usage of the event type will fall back to the carrier default."
      }
    },
    "/carrier/v1/accounts/{account_id}/ring_groups": {
      "post": {
        "tags": [
          "Carrier ring groups"
        ],
        "summary": "Create a ring group",
        "operationId": "post__carrier_v1_accounts_account_id_ring_groups",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "ring_group"
                      },
                      "attributes": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Human-readable name."
                          },
                          "strategy": {
                            "type": "string",
                            "description": "Routing strategy (see table)."
                          },
                          "timeout": {
                            "type": "integer",
                            "description": "Seconds to ring before giving up (default 30)."
                          }
                        }
                      }
                    },
                    "required": [
                      "type",
                      "attributes"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Carrier ring groups"
        ],
        "summary": "List ring groups",
        "operationId": "get__carrier_v1_accounts_account_id_ring_groups",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return an account's ring groups."
      }
    },
    "/carrier/v1/accounts/{account_id}/ring_groups/{id}": {
      "get": {
        "tags": [
          "Carrier ring groups"
        ],
        "summary": "Fetch a ring group",
        "operationId": "get__carrier_v1_accounts_account_id_ring_groups_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return a single ring group with its members."
      },
      "patch": {
        "tags": [
          "Carrier ring groups"
        ],
        "summary": "Update a ring group",
        "operationId": "patch__carrier_v1_accounts_account_id_ring_groups_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Change the name, strategy, or timeout."
      },
      "delete": {
        "tags": [
          "Carrier ring groups"
        ],
        "summary": "Delete a ring group",
        "operationId": "delete__carrier_v1_accounts_account_id_ring_groups_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Delete the ring group. Numbers assigned to it will stop routing through it."
      }
    },
    "/carrier/v1/accounts/{account_id}/ring_groups/{id}/add_agent": {
      "post": {
        "tags": [
          "Carrier ring groups"
        ],
        "summary": "Add an agent",
        "operationId": "post__carrier_v1_accounts_account_id_ring_groups_id_add_agent",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Add an agent extension to the ring group.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "ring_group_member"
                      },
                      "attributes": {
                        "type": "object",
                        "properties": {
                          "agent_extension_id": {
                            "type": "string",
                            "description": "The agent extension to add."
                          }
                        }
                      }
                    },
                    "required": [
                      "type",
                      "attributes"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        }
      }
    },
    "/carrier/v1/accounts/{account_id}/ring_groups/{id}/remove_agent": {
      "post": {
        "tags": [
          "Carrier ring groups"
        ],
        "summary": "Remove an agent",
        "operationId": "post__carrier_v1_accounts_account_id_ring_groups_id_remove_agent",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Remove an agent extension from the ring group.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "ring_group_member"
                      },
                      "attributes": {
                        "type": "object",
                        "properties": {
                          "agent_extension_id": {
                            "type": "string",
                            "description": "The agent extension to remove."
                          }
                        }
                      }
                    },
                    "required": [
                      "type",
                      "attributes"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        }
      }
    },
    "/carrier/v1/sip_trunks": {
      "post": {
        "tags": [
          "Carrier SIP trunks"
        ],
        "summary": "Create a trunk",
        "operationId": "post__carrier_v1_sip_trunks",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "sip_trunk"
                      },
                      "attributes": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Trunk name."
                          },
                          "region": {
                            "type": "string",
                            "description": "Platform region."
                          },
                          "inbound_source_ips": {
                            "type": "array",
                            "description": "Allowed source IPs for inbound traffic.",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "type",
                      "attributes"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Carrier SIP trunks"
        ],
        "summary": "List trunks",
        "operationId": "get__carrier_v1_sip_trunks",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return all trunks on the carrier."
      }
    },
    "/carrier/v1/sip_trunks/{id}": {
      "get": {
        "tags": [
          "Carrier SIP trunks"
        ],
        "summary": "Fetch a trunk",
        "operationId": "get__carrier_v1_sip_trunks_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return a single trunk."
      },
      "patch": {
        "tags": [
          "Carrier SIP trunks"
        ],
        "summary": "Update a trunk",
        "operationId": "patch__carrier_v1_sip_trunks_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Change the name, region, or inbound source IPs."
      },
      "delete": {
        "tags": [
          "Carrier SIP trunks"
        ],
        "summary": "Delete a trunk",
        "operationId": "delete__carrier_v1_sip_trunks_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Delete the trunk. Accounts assigned to it fall back to automatic routing."
      }
    },
    "/carrier/v1/sip_trunks/{id}/test_call": {
      "post": {
        "tags": [
          "Carrier SIP trunks"
        ],
        "summary": "Test call",
        "operationId": "post__carrier_v1_sip_trunks_id_test_call",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Place a test call through the trunk to verify routing and media.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "string",
                    "description": "Destination number."
                  },
                  "from": {
                    "type": "string",
                    "description": "Caller ID to use."
                  }
                },
                "required": [
                  "to",
                  "from"
                ]
              }
            }
          }
        }
      }
    },
    "/carrier/v1/tts_events": {
      "get": {
        "tags": [
          "Carrier TTS events"
        ],
        "summary": "List TTS events",
        "operationId": "get__carrier_v1_tts_events",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "filter[account_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Restrict to an account."
            }
          },
          {
            "name": "filter[created_at]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by creation time."
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "0-indexed page."
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records per page."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return TTS events, filterable."
      }
    },
    "/carrier/v1/tts_events/{id}": {
      "get": {
        "tags": [
          "Carrier TTS events"
        ],
        "summary": "Fetch an event",
        "operationId": "get__carrier_v1_tts_events_id_",
        "security": [
          {
            "carrierToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return a single TTS event."
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/agent_extensions": {
      "post": {
        "tags": [
          "Agent extensions API"
        ],
        "summary": "Create an extension",
        "operationId": "post__2010_04_01_Accounts_AccountSid_agent_extensions",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "AgentName": {
                    "type": "string",
                    "description": "Human-readable agent name."
                  },
                  "Extension": {
                    "type": "string",
                    "description": "Optional explicit extension number."
                  },
                  "Ttl": {
                    "type": "integer",
                    "description": "Credential TTL in seconds (default 86400)."
                  }
                },
                "required": [
                  "AgentName"
                ]
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Agent extensions API"
        ],
        "summary": "List extensions",
        "operationId": "get__2010_04_01_Accounts_AccountSid_agent_extensions",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return all extensions for the account."
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/agent_extensions/{AgentExtensionSid}/credentials": {
      "post": {
        "tags": [
          "Agent extensions API"
        ],
        "summary": "Get credentials",
        "operationId": "post__2010_04_01_Accounts_AccountSid_agent_extensions_AgentExtensionSid_credentials",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "AgentExtensionSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return ephemeral SIP credentials for the browser device. Expires after the TTL."
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/{Type}": {
      "get": {
        "tags": [
          "AvailablePhoneNumbers API"
        ],
        "summary": "Search available numbers",
        "operationId": "get__2010_04_01_Accounts_AccountSid_AvailablePhoneNumbers_CountryCode_Type_",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "CountryCode",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "Type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "AreaCode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by area code / prefix."
            }
          },
          {
            "name": "Contains",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by digits contained in the number."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "0-indexed page."
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records per page (max 1000)."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return numbers available in a country. {CountryCode} is an ISO 3166-1 alpha-2 code (e.g. NG). {Type} is local, mobile, or toll_free."
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/Calls": {
      "post": {
        "tags": [
          "Calls API"
        ],
        "summary": "Create a call",
        "operationId": "post__2010_04_01_Accounts_AccountSid_Calls",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Create an outbound call. Provide either Twiml (inline) or Url (fetched at answer time).",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "To": {
                    "type": "string",
                    "description": "The number to call in E.164 (e.g. +234…), or a SIP URI like sip:agent-1001@sip.ruut.chat."
                  },
                  "From": {
                    "type": "string",
                    "description": "Your caller ID — an E.164 number you own, or an agent extension identifier."
                  },
                  "Twiml": {
                    "type": "string",
                    "description": "Inline TwiML instructions (max 4000 chars). Ignored if Url is present."
                  },
                  "Url": {
                    "type": "string",
                    "description": "Absolute URL returning TwiML. Fetched when the call connects."
                  },
                  "Method": {
                    "type": "string",
                    "description": "HTTP method for Url: GET or POST. Default POST."
                  },
                  "StatusCallback": {
                    "type": "string",
                    "description": "URL to receive call status webhooks."
                  },
                  "StatusCallbackMethod": {
                    "type": "string",
                    "description": "HTTP method for the callback: GET or POST. Default POST."
                  },
                  "Channel": {
                    "type": "string",
                    "enum": [
                      "pstn",
                      "whatsapp"
                    ],
                    "default": "pstn",
                    "description": "Call transport. WhatsApp requires a linked instance bound to the caller number."
                  }
                },
                "required": [
                  "To",
                  "From"
                ]
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Calls API"
        ],
        "summary": "List calls",
        "operationId": "get__2010_04_01_Accounts_AccountSid_Calls",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "To",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by destination number."
            }
          },
          {
            "name": "From",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by caller ID."
            }
          },
          {
            "name": "Status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by call status."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "0-indexed page. Default 0."
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records per page (max 1000). Default 50."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return calls for the account, optionally filtered."
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}": {
      "get": {
        "tags": [
          "Calls API"
        ],
        "summary": "Fetch a call",
        "operationId": "get__2010_04_01_Accounts_AccountSid_Calls_CallSid_",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "CallSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return a single call resource."
      },
      "post": {
        "tags": [
          "Calls API"
        ],
        "summary": "Update a call",
        "operationId": "post__2010_04_01_Accounts_AccountSid_Calls_CallSid_",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "CallSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Modify a live call — end it, cancel it, or redirect it to new TwiML.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Status": {
                    "type": "string",
                    "description": "Set to completed to end the call, or canceled to cancel while ringing."
                  },
                  "Url": {
                    "type": "string",
                    "description": "Redirect the call to a new TwiML URL."
                  },
                  "Twiml": {
                    "type": "string",
                    "description": "Redirect with inline TwiML."
                  },
                  "Method": {
                    "type": "string",
                    "description": "HTTP method for Url: GET or POST."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers": {
      "post": {
        "tags": [
          "IncomingPhoneNumbers API"
        ],
        "summary": "Provision a number",
        "operationId": "post__2010_04_01_Accounts_AccountSid_IncomingPhoneNumbers",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Buy an available number and assign it to an account. Only carrier administrators can provision numbers.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "PhoneNumber": {
                    "type": "string",
                    "description": "The E.164 number to provision."
                  },
                  "FriendlyName": {
                    "type": "string",
                    "description": "A human-friendly label."
                  },
                  "VoiceUrl": {
                    "type": "string",
                    "description": "Inbound call handler (returns TwiML)."
                  },
                  "VoiceMethod": {
                    "type": "string",
                    "description": "HTTP method for VoiceUrl."
                  },
                  "StatusCallbackUrl": {
                    "type": "string",
                    "description": "Call status webhook URL."
                  },
                  "StatusCallbackMethod": {
                    "type": "string",
                    "description": "HTTP method for the callback."
                  },
                  "SmsUrl": {
                    "type": "string",
                    "description": "Inbound SMS handler."
                  },
                  "SmsMethod": {
                    "type": "string",
                    "description": "HTTP method for SmsUrl."
                  }
                },
                "required": [
                  "PhoneNumber"
                ]
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "IncomingPhoneNumbers API"
        ],
        "summary": "List numbers",
        "operationId": "get__2010_04_01_Accounts_AccountSid_IncomingPhoneNumbers",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "Page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "0-indexed page."
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records per page (max 1000)."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        }
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{IncomingPhoneNumberSid}": {
      "post": {
        "tags": [
          "IncomingPhoneNumbers API"
        ],
        "summary": "Update a number",
        "operationId": "post__2010_04_01_Accounts_AccountSid_IncomingPhoneNumbers_IncomingPhoneNumberSid_",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "IncomingPhoneNumberSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Reconfigure the number's handlers (VoiceUrl, SmsUrl, callbacks, friendly name).",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "FriendlyName": {
                    "type": "string",
                    "description": "A human-friendly label."
                  },
                  "VoiceUrl": {
                    "type": "string",
                    "description": "Inbound call handler (returns TwiML)."
                  },
                  "VoiceMethod": {
                    "type": "string",
                    "description": "HTTP method for VoiceUrl."
                  },
                  "StatusCallbackUrl": {
                    "type": "string",
                    "description": "Call status webhook URL."
                  },
                  "StatusCallbackMethod": {
                    "type": "string",
                    "description": "HTTP method for the callback."
                  },
                  "SmsUrl": {
                    "type": "string",
                    "description": "Inbound SMS handler."
                  },
                  "SmsMethod": {
                    "type": "string",
                    "description": "HTTP method for SmsUrl."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "IncomingPhoneNumbers API"
        ],
        "summary": "Release a number",
        "operationId": "delete__2010_04_01_Accounts_AccountSid_IncomingPhoneNumbers_IncomingPhoneNumberSid_",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "IncomingPhoneNumberSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Release the number, returning it to the available inventory. Inbound calls and messages will no longer be routed."
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/Messages": {
      "post": {
        "tags": [
          "Messages API"
        ],
        "summary": "Send a message",
        "operationId": "post__2010_04_01_Accounts_AccountSid_Messages",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "To": {
                    "type": "string",
                    "description": "Destination number in E.164."
                  },
                  "From": {
                    "type": "string",
                    "description": "Your Ruut Voice number in E.164. Either From or MessagingServiceSid is required."
                  },
                  "Body": {
                    "type": "string",
                    "description": "Message text (max 1600 chars)."
                  },
                  "MessagingServiceSid": {
                    "type": "string",
                    "description": "A messaging service to use instead of From."
                  },
                  "StatusCallback": {
                    "type": "string",
                    "description": "URL to receive message status webhooks."
                  },
                  "SmartEncoded": {
                    "type": "boolean",
                    "description": "Convert to GSM encoding when possible."
                  },
                  "ValidityPeriod": {
                    "type": "integer",
                    "description": "Seconds the message is valid (1–14400)."
                  },
                  "SendAt": {
                    "type": "string",
                    "description": "Schedule the message for a future time (with ScheduleType=fixed)."
                  },
                  "ScheduleType": {
                    "type": "string",
                    "description": "Set to fixed when scheduling with SendAt."
                  }
                },
                "required": [
                  "To",
                  "From",
                  "Body"
                ]
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Messages API"
        ],
        "summary": "List messages",
        "operationId": "get__2010_04_01_Accounts_AccountSid_Messages",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "To",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by destination."
            }
          },
          {
            "name": "From",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by sender."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "0-indexed page."
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records per page (max 1000)."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        }
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}": {
      "get": {
        "tags": [
          "Messages API"
        ],
        "summary": "Fetch a message",
        "operationId": "get__2010_04_01_Accounts_AccountSid_Messages_MessageSid_",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "MessageSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return a single message resource."
      },
      "post": {
        "tags": [
          "Messages API"
        ],
        "summary": "Update a message",
        "operationId": "post__2010_04_01_Accounts_AccountSid_Messages_MessageSid_",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "MessageSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Update a message — typically to record a delivery failure or a price for billing reconciliation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Status": {
                    "type": "string",
                    "description": "Delivery status (e.g. sent, delivered, failed)."
                  },
                  "Price": {
                    "type": "string",
                    "description": "Cost of the message (for reconciliation)."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Messages API"
        ],
        "summary": "Delete a message",
        "operationId": "delete__2010_04_01_Accounts_AccountSid_Messages_MessageSid_",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "MessageSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Delete a message record. Use with care — the message is removed permanently."
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/Recordings": {
      "get": {
        "tags": [
          "Recordings API"
        ],
        "summary": "List recordings",
        "operationId": "get__2010_04_01_Accounts_AccountSid_Recordings",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "Page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "0-indexed page."
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records per page (max 1000)."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "List recordings for the account. Scoped to a call with /Calls/{CallSid}/Recordings."
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}.json": {
      "get": {
        "tags": [
          "Recordings API"
        ],
        "summary": "Fetch a recording",
        "operationId": "get__2010_04_01_Accounts_AccountSid_Recordings_RecordingSid_json",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "RecordingSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "RecordingSid",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The recording SID (e.g. RE…)."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Return the recording resource (including transcription fields when present)."
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}.wav": {
      "get": {
        "tags": [
          "Recordings API"
        ],
        "summary": "Fetch recording audio",
        "operationId": "get__2010_04_01_Accounts_AccountSid_Recordings_RecordingSid_wav",
        "security": [
          {
            "accountToken": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "RecordingSid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Resource identifier from your workspace."
          },
          {
            "name": "RecordingSid",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The recording SID."
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "wav (default) or mp3."
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Successful operation. See the resource guide for response fields."
          },
          "401": {
            "description": "Credentials are missing or invalid."
          },
          "403": {
            "description": "The credential cannot access this resource or operation."
          },
          "422": {
            "description": "The request failed validation."
          }
        },
        "description": "Download the recording as WAV. Use .mp3 for a compressed copy. Redirects to the media file."
      }
    }
  },
  "components": {
    "securitySchemes": {
      "accountToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Account-scoped API key with permissions for the operation."
      },
      "carrierToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Carrier-scoped API key with carrier_api permission."
      },
      "basicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Account ID as username and account auth token as password."
      }
    }
  }
}
