{
  "openapi": "3.0.3",
  "info": {
    "title": "sondahub Twilio sandbox",
    "version": "0.6.1",
    "description": "An independent imitation of Twilio’s API for testing, run by sondahub — not affiliated with or endorsed by Twilio Inc. No message or call leaves it and no Twilio account is involved.\n\nAuth: Basic with any Account SID as the user (AC0123456789abcdef0123456789abcdef works) and any auth token as the password; the AccountSid in the path must be the same one. Callbacks are signed with that token. Bodies are form-encoded, as Twilio takes them.\n\nOne server for the three Twilio hosts: api.twilio.com is /2010-04-01, verify.twilio.com is /verify, lookups.twilio.com is /lookups.\n\nThe example SIDs come from the seed account. Writes live in the X-Sondahub-Session token each answer carries: send the newest one back as a header and the next request sees what you made; without it every request starts from the seed account. More at https://sondahub.com/sandboxes/twilio/",
    "contact": {
      "name": "sondahub",
      "url": "https://sondahub.com/sandboxes/twilio/"
    }
  },
  "externalDocs": {
    "description": "The sandbox, in full",
    "url": "https://sondahub.com/sandboxes/twilio/"
  },
  "servers": [
    {
      "url": "https://api.sondahub.com"
    }
  ],
  "security": [
    {
      "twilioBasic": []
    }
  ],
  "tags": [
    {
      "name": "Account",
      "description": "The account you sign in as."
    },
    {
      "name": "Messages",
      "description": "SMS and MMS: queued, sending, sent and delivered on a clock; Twilio’s magic test numbers answer their documented errors."
    },
    {
      "name": "Calls",
      "description": "Voice calls: queued, ringing, in-progress and completed on a clock; the Url is fetched for TwiML when the call is answered."
    },
    {
      "name": "IncomingPhoneNumbers",
      "description": "The account’s numbers: +15005550006 and four more; buy by number or area code."
    },
    {
      "name": "Verify",
      "description": "Verify v2: the code that approves is the first CodeLength digits of 1234567890 — 123456 by default."
    },
    {
      "name": "Lookups",
      "description": "Lookups v2: validity, country and formats; Fields=line_type_intelligence adds the line type."
    },
    {
      "name": "Sandbox tools",
      "description": "sondahub’s own: not part of Twilio’s API."
    }
  ],
  "paths": {
    "/2010-04-01/Accounts.json": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List accounts",
        "operationId": "ListAccounts",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      }
    },
    "/2010-04-01/Accounts/{AccountSid}.json": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Fetch the account",
        "operationId": "FetchAccount",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/Messages.json": {
      "get": {
        "tags": [
          "Messages"
        ],
        "summary": "List messages",
        "operationId": "ListMessages",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          },
          {
            "name": "To",
            "in": "query",
            "required": false,
            "description": "Only to this number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "From",
            "in": "query",
            "required": false,
            "description": "Only from this number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "DateSent",
            "in": "query",
            "required": false,
            "description": "Only on this day, YYYY-MM-DD.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "required": false,
            "description": "How many per page, up to 1000 (default 50).",
            "schema": {
              "type": "integer"
            },
            "example": 20
          },
          {
            "name": "Page",
            "in": "query",
            "required": false,
            "description": "Which page, from 0.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Messages"
        ],
        "summary": "Send a message",
        "operationId": "CreateMessage",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          }
        ],
        "responses": {
          "201": {
            "description": "The message, queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "To": {
                    "type": "string",
                    "description": "E.164 number. +15005550001 is invalid (21211); +15550100005 ends undelivered.",
                    "example": "+14155550100"
                  },
                  "From": {
                    "type": "string",
                    "description": "One of the account’s numbers: +15005550006 (Twilio’s magic test number) or the ones you bought.",
                    "example": "+15005550006"
                  },
                  "MessagingServiceSid": {
                    "type": "string",
                    "description": "Instead of From: any MG SID."
                  },
                  "Body": {
                    "type": "string",
                    "description": "Up to 1600 characters; segments are counted GSM-7 or UCS-2.",
                    "example": "Hello from the sandbox"
                  },
                  "MediaUrl": {
                    "type": "string",
                    "description": "An image URL, for MMS (repeat the field for more)."
                  },
                  "StatusCallback": {
                    "type": "string",
                    "description": "Your URL: sent, then delivered or undelivered, signed with X-Twilio-Signature."
                  },
                  "StatusCallbackMethod": {
                    "type": "string",
                    "description": "POST or GET."
                  }
                },
                "required": [
                  "To"
                ],
                "example": {
                  "To": "+14155550100",
                  "From": "+15005550006",
                  "Body": "Hello from the sandbox"
                }
              },
              "example": {
                "To": "+14155550100",
                "From": "+15005550006",
                "Body": "Hello from the sandbox"
              }
            }
          }
        }
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json": {
      "get": {
        "tags": [
          "Messages"
        ],
        "summary": "Fetch a message",
        "operationId": "FetchMessage",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          },
          {
            "name": "Sid",
            "in": "path",
            "required": true,
            "description": "A message SID.",
            "schema": {
              "type": "string"
            },
            "example": "SM9e3779b19a5401e8ac42e274ae352bb6"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Messages"
        ],
        "summary": "Redact a message",
        "operationId": "UpdateMessage",
        "description": "An empty Body redacts a finished message; Status=canceled cancels a scheduled one.",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          },
          {
            "name": "Sid",
            "in": "path",
            "required": true,
            "description": "A message SID.",
            "schema": {
              "type": "string"
            },
            "example": "SM9e3779b19a5401e8ac42e274ae352bb6"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Body": {
                    "type": "string",
                    "description": "Empty to redact.",
                    "example": ""
                  },
                  "Status": {
                    "type": "string",
                    "description": "canceled."
                  }
                },
                "example": {
                  "Body": ""
                }
              },
              "example": {
                "Body": ""
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Messages"
        ],
        "summary": "Delete a message",
        "operationId": "DeleteMessage",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          },
          {
            "name": "Sid",
            "in": "path",
            "required": true,
            "description": "A message SID.",
            "schema": {
              "type": "string"
            },
            "example": "SM9e3779b19a5401e8ac42e274ae352bb6"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/Calls.json": {
      "get": {
        "tags": [
          "Calls"
        ],
        "summary": "List calls",
        "operationId": "ListCalls",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          },
          {
            "name": "To",
            "in": "query",
            "required": false,
            "description": "Only to this number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "From",
            "in": "query",
            "required": false,
            "description": "Only from this number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "required": false,
            "description": "queued, ringing, in-progress, completed, busy, no-answer, failed or canceled.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "required": false,
            "description": "How many per page, up to 1000 (default 50).",
            "schema": {
              "type": "integer"
            },
            "example": 20
          },
          {
            "name": "Page",
            "in": "query",
            "required": false,
            "description": "Which page, from 0.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Calls"
        ],
        "summary": "Place a call",
        "operationId": "CreateCall",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          }
        ],
        "responses": {
          "201": {
            "description": "The call, queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "To": {
                    "type": "string",
                    "description": "E.164 number. +15550100006 is busy, +15550100003 does not answer.",
                    "example": "+14155550100"
                  },
                  "From": {
                    "type": "string",
                    "description": "One of the account’s numbers.",
                    "example": "+15005550006"
                  },
                  "Url": {
                    "type": "string",
                    "description": "Your TwiML URL, fetched when the call is answered."
                  },
                  "Twiml": {
                    "type": "string",
                    "description": "Or the TwiML itself.",
                    "example": "<Response><Say>Hello from the sandbox</Say></Response>"
                  },
                  "Method": {
                    "type": "string",
                    "description": "POST or GET for the Url."
                  },
                  "StatusCallback": {
                    "type": "string",
                    "description": "Your URL for the call’s progress."
                  },
                  "StatusCallbackEvent": {
                    "type": "string",
                    "description": "initiated, ringing, answered, completed (repeat the field for more)."
                  }
                },
                "required": [
                  "To",
                  "From"
                ],
                "example": {
                  "To": "+14155550100",
                  "From": "+15005550006",
                  "Twiml": "<Response><Say>Hello from the sandbox</Say></Response>"
                }
              },
              "example": {
                "To": "+14155550100",
                "From": "+15005550006",
                "Twiml": "<Response><Say>Hello from the sandbox</Say></Response>"
              }
            }
          }
        }
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json": {
      "get": {
        "tags": [
          "Calls"
        ],
        "summary": "Fetch a call",
        "operationId": "FetchCall",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          },
          {
            "name": "Sid",
            "in": "path",
            "required": true,
            "description": "A call SID.",
            "schema": {
              "type": "string"
            },
            "example": "CA9e3779b1a9a965734417b5adf84206db"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Calls"
        ],
        "summary": "End or cancel a call",
        "operationId": "UpdateCall",
        "description": "For a call you placed that is still going — the seed account’s calls are all over, so place one first (it rings for 3 seconds and lasts 10).",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          },
          {
            "name": "Sid",
            "in": "path",
            "required": true,
            "description": "A call SID: one you placed.",
            "schema": {
              "type": "string"
            },
            "example": "CA9e3779b1a9a965734417b5adf84206db"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Status": {
                    "type": "string",
                    "description": "completed (hang up) or canceled (before it is answered).",
                    "example": "completed"
                  },
                  "Url": {
                    "type": "string",
                    "description": "New TwiML URL."
                  },
                  "Twiml": {
                    "type": "string",
                    "description": "New TwiML."
                  }
                },
                "example": {
                  "Status": "completed"
                }
              },
              "example": {
                "Status": "completed"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Calls"
        ],
        "summary": "Delete a call record",
        "operationId": "DeleteCall",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          },
          {
            "name": "Sid",
            "in": "path",
            "required": true,
            "description": "A call SID.",
            "schema": {
              "type": "string"
            },
            "example": "CA9e3779b1a9a965734417b5adf84206db"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json": {
      "get": {
        "tags": [
          "IncomingPhoneNumbers"
        ],
        "summary": "List the account’s numbers",
        "operationId": "ListIncomingPhoneNumbers",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          },
          {
            "name": "PhoneNumber",
            "in": "query",
            "required": false,
            "description": "Only numbers containing this.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FriendlyName",
            "in": "query",
            "required": false,
            "description": "Only names containing this.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "required": false,
            "description": "How many per page, up to 1000 (default 50).",
            "schema": {
              "type": "integer"
            },
            "example": 20
          },
          {
            "name": "Page",
            "in": "query",
            "required": false,
            "description": "Which page, from 0.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "IncomingPhoneNumbers"
        ],
        "summary": "Buy a number",
        "operationId": "CreateIncomingPhoneNumber",
        "description": "Area code 533 has none (21452); +15005550000 is not available.",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          }
        ],
        "responses": {
          "201": {
            "description": "The number, bought.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "AreaCode": {
                    "type": "string",
                    "description": "Three digits: any number there.",
                    "example": "512"
                  },
                  "PhoneNumber": {
                    "type": "string",
                    "description": "Or an exact E.164 number."
                  },
                  "FriendlyName": {
                    "type": "string",
                    "description": "A label.",
                    "example": "Sandbox line"
                  },
                  "SmsUrl": {
                    "type": "string",
                    "description": "Your webhook for incoming SMS."
                  },
                  "SmsMethod": {
                    "type": "string",
                    "description": "POST or GET."
                  },
                  "VoiceUrl": {
                    "type": "string",
                    "description": "Your webhook for incoming calls."
                  },
                  "VoiceMethod": {
                    "type": "string",
                    "description": "POST or GET."
                  },
                  "StatusCallback": {
                    "type": "string",
                    "description": "Your status URL."
                  }
                },
                "example": {
                  "AreaCode": "512",
                  "FriendlyName": "Sandbox line"
                }
              },
              "example": {
                "AreaCode": "512",
                "FriendlyName": "Sandbox line"
              }
            }
          }
        }
      }
    },
    "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json": {
      "get": {
        "tags": [
          "IncomingPhoneNumbers"
        ],
        "summary": "Fetch a number",
        "operationId": "FetchIncomingPhoneNumber",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          },
          {
            "name": "Sid",
            "in": "path",
            "required": true,
            "description": "A phone number SID.",
            "schema": {
              "type": "string"
            },
            "example": "PN3c6ef362e3cfce49e4f01d940416220a"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "IncomingPhoneNumbers"
        ],
        "summary": "Update a number",
        "operationId": "UpdateIncomingPhoneNumber",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          },
          {
            "name": "Sid",
            "in": "path",
            "required": true,
            "description": "A phone number SID.",
            "schema": {
              "type": "string"
            },
            "example": "PN3c6ef362e3cfce49e4f01d940416220a"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "FriendlyName": {
                    "type": "string",
                    "description": "A label.",
                    "example": "Sandbox line"
                  },
                  "SmsUrl": {
                    "type": "string",
                    "description": "Your webhook for incoming SMS."
                  },
                  "SmsMethod": {
                    "type": "string",
                    "description": "POST or GET."
                  },
                  "VoiceUrl": {
                    "type": "string",
                    "description": "Your webhook for incoming calls."
                  },
                  "VoiceMethod": {
                    "type": "string",
                    "description": "POST or GET."
                  },
                  "StatusCallback": {
                    "type": "string",
                    "description": "Your status URL."
                  }
                },
                "example": {
                  "FriendlyName": "Support line (renamed)",
                  "SmsUrl": "https://your-app.example/twilio/sms"
                }
              },
              "example": {
                "FriendlyName": "Support line (renamed)",
                "SmsUrl": "https://your-app.example/twilio/sms"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "IncomingPhoneNumbers"
        ],
        "summary": "Release a number",
        "operationId": "DeleteIncomingPhoneNumber",
        "parameters": [
          {
            "name": "AccountSid",
            "in": "path",
            "required": true,
            "description": "Your Account SID — the same one you sign in with. Any AC followed by 32 hex digits works.",
            "schema": {
              "type": "string"
            },
            "example": "AC0123456789abcdef0123456789abcdef"
          },
          {
            "name": "Sid",
            "in": "path",
            "required": true,
            "description": "A phone number SID.",
            "schema": {
              "type": "string"
            },
            "example": "PN3c6ef362e3cfce49e4f01d940416220a"
          }
        ],
        "responses": {
          "204": {
            "description": "Released."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/verify/v2/Services": {
      "get": {
        "tags": [
          "Verify"
        ],
        "summary": "List Verify services",
        "operationId": "ListVerifyServices",
        "parameters": [
          {
            "name": "PageSize",
            "in": "query",
            "required": false,
            "description": "How many per page, up to 1000 (default 50).",
            "schema": {
              "type": "integer"
            },
            "example": 20
          },
          {
            "name": "Page",
            "in": "query",
            "required": false,
            "description": "Which page, from 0.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "post": {
        "tags": [
          "Verify"
        ],
        "summary": "Create a Verify service",
        "operationId": "CreateVerifyService",
        "responses": {
          "201": {
            "description": "The service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "FriendlyName": {
                    "type": "string",
                    "description": "Its name, shown in the message.",
                    "example": "Sandbox login"
                  },
                  "CodeLength": {
                    "type": "integer",
                    "description": "4 to 10 (default 6).",
                    "example": 6
                  }
                },
                "required": [
                  "FriendlyName"
                ],
                "example": {
                  "FriendlyName": "Sandbox login"
                }
              },
              "example": {
                "FriendlyName": "Sandbox login"
              }
            }
          }
        }
      }
    },
    "/verify/v2/Services/{ServiceSid}": {
      "get": {
        "tags": [
          "Verify"
        ],
        "summary": "Fetch a Verify service",
        "operationId": "FetchVerifyService",
        "parameters": [
          {
            "name": "ServiceSid",
            "in": "path",
            "required": true,
            "description": "A Verify service SID; the seed has one.",
            "schema": {
              "type": "string"
            },
            "example": "VA9e3779b1a66a4f2521a9b986b06b5d9e"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Verify"
        ],
        "summary": "Update a Verify service",
        "operationId": "UpdateVerifyService",
        "parameters": [
          {
            "name": "ServiceSid",
            "in": "path",
            "required": true,
            "description": "A Verify service SID; the seed has one.",
            "schema": {
              "type": "string"
            },
            "example": "VA9e3779b1a66a4f2521a9b986b06b5d9e"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "FriendlyName": {
                    "type": "string",
                    "description": "Its name.",
                    "example": "Sandbox login (renamed)"
                  },
                  "CodeLength": {
                    "type": "integer",
                    "description": "4 to 10."
                  }
                },
                "example": {
                  "FriendlyName": "Sandbox login (renamed)"
                }
              },
              "example": {
                "FriendlyName": "Sandbox login (renamed)"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Verify"
        ],
        "summary": "Delete a Verify service",
        "operationId": "DeleteVerifyService",
        "parameters": [
          {
            "name": "ServiceSid",
            "in": "path",
            "required": true,
            "description": "A Verify service SID; the seed has one.",
            "schema": {
              "type": "string"
            },
            "example": "VA9e3779b1a66a4f2521a9b986b06b5d9e"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/verify/v2/Services/{ServiceSid}/Verifications": {
      "post": {
        "tags": [
          "Verify"
        ],
        "summary": "Start a verification",
        "operationId": "CreateVerification",
        "description": "Five sends per verification; +15005550009 cannot take SMS (60205).",
        "parameters": [
          {
            "name": "ServiceSid",
            "in": "path",
            "required": true,
            "description": "A Verify service SID; the seed has one.",
            "schema": {
              "type": "string"
            },
            "example": "VA9e3779b1a66a4f2521a9b986b06b5d9e"
          }
        ],
        "responses": {
          "201": {
            "description": "The verification, pending.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "To": {
                    "type": "string",
                    "description": "E.164 number, or an email for Channel=email.",
                    "example": "+14155550100"
                  },
                  "Channel": {
                    "type": "string",
                    "description": "sms, call, email, whatsapp, sna or auto.",
                    "example": "sms"
                  }
                },
                "required": [
                  "To",
                  "Channel"
                ],
                "example": {
                  "To": "+14155550100",
                  "Channel": "sms"
                }
              },
              "example": {
                "To": "+14155550100",
                "Channel": "sms"
              }
            }
          }
        }
      }
    },
    "/verify/v2/Services/{ServiceSid}/Verifications/{Sid}": {
      "get": {
        "tags": [
          "Verify"
        ],
        "summary": "Fetch a verification",
        "operationId": "FetchVerification",
        "parameters": [
          {
            "name": "ServiceSid",
            "in": "path",
            "required": true,
            "description": "A Verify service SID; the seed has one.",
            "schema": {
              "type": "string"
            },
            "example": "VA9e3779b1a66a4f2521a9b986b06b5d9e"
          },
          {
            "name": "Sid",
            "in": "path",
            "required": true,
            "description": "A verification SID (start one first).",
            "schema": {
              "type": "string"
            },
            "example": "VE9e3779b194a97e932853eb66b72bd087"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Verify"
        ],
        "summary": "Approve or cancel a verification",
        "operationId": "UpdateVerification",
        "parameters": [
          {
            "name": "ServiceSid",
            "in": "path",
            "required": true,
            "description": "A Verify service SID; the seed has one.",
            "schema": {
              "type": "string"
            },
            "example": "VA9e3779b1a66a4f2521a9b986b06b5d9e"
          },
          {
            "name": "Sid",
            "in": "path",
            "required": true,
            "description": "A pending verification SID.",
            "schema": {
              "type": "string"
            },
            "example": "VE9e3779b194a97e932853eb66b72bd087"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Status": {
                    "type": "string",
                    "description": "approved or canceled.",
                    "example": "canceled"
                  }
                },
                "required": [
                  "Status"
                ],
                "example": {
                  "Status": "canceled"
                }
              },
              "example": {
                "Status": "canceled"
              }
            }
          }
        }
      }
    },
    "/verify/v2/Services/{ServiceSid}/VerificationCheck": {
      "post": {
        "tags": [
          "Verify"
        ],
        "summary": "Check a code",
        "operationId": "CreateVerificationCheck",
        "description": "Start a verification first (and send its session token along). Five checks per verification; a wrong code leaves it pending.",
        "parameters": [
          {
            "name": "ServiceSid",
            "in": "path",
            "required": true,
            "description": "A Verify service SID; the seed has one.",
            "schema": {
              "type": "string"
            },
            "example": "VA9e3779b1a66a4f2521a9b986b06b5d9e"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "To": {
                    "type": "string",
                    "description": "The number (or email) being verified.",
                    "example": "+14155550100"
                  },
                  "Code": {
                    "type": "string",
                    "description": "The code: 123456 for a six-digit service.",
                    "example": "123456"
                  },
                  "VerificationSid": {
                    "type": "string",
                    "description": "Or the verification SID instead of To."
                  }
                },
                "required": [
                  "Code"
                ],
                "example": {
                  "To": "+14155550100",
                  "Code": "123456"
                }
              },
              "example": {
                "To": "+14155550100",
                "Code": "123456"
              }
            }
          }
        }
      }
    },
    "/lookups/v2/PhoneNumbers/{PhoneNumber}": {
      "get": {
        "tags": [
          "Lookups"
        ],
        "summary": "Look up a number",
        "operationId": "FetchPhoneNumber",
        "parameters": [
          {
            "name": "PhoneNumber",
            "in": "path",
            "required": true,
            "description": "E.164 number; ten digits are read as a US number.",
            "schema": {
              "type": "string"
            },
            "example": "+14155550100"
          },
          {
            "name": "Fields",
            "in": "query",
            "required": false,
            "description": "line_type_intelligence for the line type, caller_name for the caller name.",
            "schema": {
              "type": "string"
            },
            "example": "line_type_intelligence"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/sandbox/twilio/simulate/sms": {
      "post": {
        "tags": [
          "Sandbox tools"
        ],
        "summary": "Simulate an incoming SMS",
        "operationId": "SimulateIncomingSms",
        "description": "Sends your webhook what Twilio sends when an SMS arrives, signed with X-Twilio-Signature made with auth_token, and shows what your app answered (the TwiML <Message> replies too).",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Your SMS webhook.",
                    "example": "https://your-app.example/twilio/sms"
                  },
                  "from": {
                    "type": "string",
                    "description": "The sender.",
                    "example": "+15550100042"
                  },
                  "to": {
                    "type": "string",
                    "description": "Your number.",
                    "example": "+14155550123"
                  },
                  "body": {
                    "type": "string",
                    "description": "The text.",
                    "example": "Hi there"
                  },
                  "auth_token": {
                    "type": "string",
                    "description": "The token the signature is made with — the one your app validates with.",
                    "example": "your_auth_token"
                  },
                  "account_sid": {
                    "type": "string",
                    "description": "Your Account SID.",
                    "example": "AC0123456789abcdef0123456789abcdef"
                  }
                },
                "required": [
                  "url",
                  "auth_token"
                ],
                "example": {
                  "url": "https://your-app.example/twilio/sms",
                  "from": "+15550100042",
                  "to": "+14155550123",
                  "body": "Hi there",
                  "auth_token": "your_auth_token",
                  "account_sid": "AC0123456789abcdef0123456789abcdef"
                }
              },
              "example": {
                "url": "https://your-app.example/twilio/sms",
                "from": "+15550100042",
                "to": "+14155550123",
                "body": "Hi there",
                "auth_token": "your_auth_token",
                "account_sid": "AC0123456789abcdef0123456789abcdef"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "twilioBasic": {
        "type": "http",
        "scheme": "basic",
        "description": "User: an Account SID (AC0123456789abcdef0123456789abcdef works). Password: any auth token."
      }
    },
    "responses": {
      "E400": {
        "description": "A Twilio error: code, message, more_info and status.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "integer"
                },
                "message": {
                  "type": "string"
                },
                "more_info": {
                  "type": "string"
                },
                "status": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "E401": {
        "description": "20003: no credentials, or an Account SID that is not AC + 32 hex digits.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "integer"
                },
                "message": {
                  "type": "string"
                },
                "more_info": {
                  "type": "string"
                },
                "status": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "E404": {
        "description": "20404: no such resource, or a part of Twilio the sandbox does not model.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "integer"
                },
                "message": {
                  "type": "string"
                },
                "more_info": {
                  "type": "string"
                },
                "status": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    }
  }
}