{
  "openapi": "3.0.3",
  "info": {
    "title": "Numbers | Sinch",
    "description": "# Overview\n\nThe Numbers API enables you to search for, view, and activate numbers. It's considered a precursor to other APIs in the Sinch product family. The numbers API can be used in tandem with any of our APIs that perform messaging or calling. Once you have activated your numbers, you can then use the various other APIs, such as [SMS](https://developers.sinch.com/docs/sms/) or [Voice](https://developers.sinch.com/docs/voice/), to assign and use those numbers.\n\n## Numbers REST formats and conventions\n\nLet's take a brief look at some of the formats used in the REST API.\n\n### JSON\n\nJSON (`application/json`) is the content type of both requests and responses if not otherwise specified.\n\nRequests with invalid JSON will be rejected.\n\n### Null values\n\nNull values can be omitted in requests and will be omitted in responses. In some cases, explicitly setting `null` will overwrite a previously set value with `null`.\n\n### Phone numbers\n\nOnly phone numbers in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) standard format are accepted by the API.\n\n#### Examples:\n\n- **US phone number:** `+13059394139`\n- **UK phone number:** `+447478727259`\n- **SE phone number:** `+46113232516`\n\n## Status codes\n\nA summary of status codes can be found on the [HTTP status codes page](https://developers.sinch.com/docs/numbers/api-reference/error-codes/status-codes).\n\n## IP addresses for callbacks\n\nTo successfully use callbacks with Numbers, add the following IP addresses to your allowlist:\n\n- 54.76.19.159\n- 54.78.194.39\n- 54.155.83.128\n\n## New features\n\nNew features might result in additional request and response parameters. New request parameters will either have a default value or be considered optional to retain backwards compatibility. It's highly recommended to ignore any unexpected parameters when reading JSON in API responses and in callback handlers.\n",
    "version": "1.0.3",
    "contact": {
      "name": "Support",
      "url": "https://www.sinch.com",
      "email": "Support@sinch.com"
    },
    "license": {
      "name": "MIT",
      "url": "https://www.sinch.com/toc"
    }
  },
  "servers": [
    {
      "url": "https://numbers.api.sinch.com",
      "description": "Global API"
    }
  ],
  "security": [
    {
      "Basic": []
    },
    {
      "OAuth2.0": []
    }
  ],
  "tags": [
    {
      "name": "Available Number",
      "description": "You can use the Available Number API to search for available numbers or activate an available number.",
      "x-displayName": "Available Numbers"
    },
    {
      "name": "Number Order",
      "description": "You can use the Number Order API to search for available numbers or activate an available number after providing KYC info.\n\nSteps for buying a number via an order and providing the required KYC information:\n1. \"Lookup number requirements\" endpoint: look up country KYC requirements to establish which fields / information needs to be provided as part of buying the phone number. Also reveals if any attachment files need to be provided.\n2. \"Search for available phone numbers\" endpoint: search numbers you may want to buy.\n3. \"Create a number order\" endpoint: create the Number Order for a specific phone number or for a set of criteria (max 1 number per order supported now), which reserved the number for 48h, giving plenty of time to call the other endpoint to submit the fields required as revealed by the API at 1. and also to hit the final Submit endpoint.\n4. \"Update number order registration\" endpoint: update the order Registration (container for the actual KYC required fields / information revealed at step #1). This is validated on the spot for required / optional fields, fields lengths etc. (also revealed at step #1).\n5. \"Upload an attachment for a number order\" endpoint: upload file attachments - only if mandatory as per requirements revealed by step #1. AttachmentId necessary for the URL will be returned at step #1.\n6. \"Submit number order\" endpoint: submit the order - final step after creating the order and providing registration info and (if required) attachments\n\nYou can follow a detailed tutorial outlining the entire ordering process [here](https://developers.sinch.com/docs/numbers/kyc-numbers-order).",
      "x-displayName": "Number Order"
    },
    {
      "name": "Active Number",
      "description": "You can use the Active Number API to manage numbers you own. Release numbers from projects or list all numbers assigned to a project.",
      "x-displayName": "Active Numbers"
    },
    {
      "name": "Available Regions",
      "description": "You can use the Available Regions API to list all of the regions that have numbers assigned to a project."
    },
    {
      "name": "Numbers Callbacks",
      "description": "You can set up callback URLs to receive event notifications when your numbers are updated.\n\nWhen delivering events the order is not guaranteed (for example, a failed event scheduled for retry will not block other events that were queued).\n\nThe client's callback handler must implement the state machine that can decide what to do with _unexpected_ events, for example, \"old\" events or invalid state transitions. In these cases the handler could use the API to GET the latest state for the resource.\n\nThe callback handler is expected to \"ingest\" the event and respond with 200 OK. The domain-specific business logic and processes should be executed outside of the callback request, as internal asynchronous jobs.\n\nTo use callbacks, add the following IP addresses to your allowlist:\n\n- 54.76.19.159\n- 54.78.194.39\n- 54.155.83.128\n\n### Secure Webhook Endpoints with HMAC\n\nImplementing HMAC (Hash-based Message Authentication Code) on your webhook endpoints will ensure the integrity of data, preventing tampering during transmission.\nAn HMAC used in webhooks is a common approach in the industry and in a nutshell it is just special code that can be used to check if a message hasn't been tempered with during the transmission.\n\nWe recommend to configure an HMAC secret for your project using the [callback configuration](https://developers.sinch.com/docs/numbers/api-reference/numbers/numbers-callbacks/updatecallbackconfiguration). Then, when sending the number events, the HTTP POST requests will include the header `X-Sinch-Signature` with the computed HMAC.\n\n**NOTE:** The HMAC secret is configured per project; if you are using the Numbers API with multiple projects, make sure you configure the HMAC secret in each project, and fetch it for either imported or purchased numbers from the dedicated endpoints.\n\n### HMAC verification\n\nWe recommend to verify the HMAC code received with every event in your event handler. When receiving a new event on your endpoint URL, compute the HMAC of the payload using the secret (configured [here](https://developers.sinch.com/docs/numbers/api-reference/numbers/numbers-callbacks/updatecallbackconfiguration)) and compare it with one received in the `X-Sinch-Signature` header.\n\n**NOTE:** Compute the HMAC on the plain text value before parsing the JSON payload."
    }
  ],
  "x-explorer-enabled": false,
  "x-samples-languages": [
    "curl",
    "java",
    "csharp",
    "node",
    "php"
  ],
  "x-webhooks": {
    "EventsCallback": {
      "post": {
        "tags": [
          "Numbers Callbacks"
        ],
        "summary": "Event notification",
        "description": "A notification of an event sent to your configured callback URL.",
        "operationId": "ImportedNumberService_EventsCallback",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallbackPayload"
              }
            }
          }
        },
        "responses": {
          "default": {
            "description": "200 OK"
          }
        }
      }
    }
  },
  "paths": {
    "/v1/projects/{projectId}/availableNumbers/{phoneNumber}:rent": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        },
        {
          "$ref": "#/components/parameters/phoneNumber"
        }
      ],
      "post": {
        "summary": "Activate a new phone number",
        "description": "Activate a phone number to use with SMS products, Voice products, or both.\n\nYou'll use `smsConfiguration` to setup your number for SMS and `voiceConfiguration` for Voice. To setup for both, add both objects. See the dropdown menu (just under language selection) for code samples.\n\nNote: You cannot add both objects if you only need to configure one object. For example, if you only need to configure `smsConfiguration` for SMS messaging, do not add the `voiceConfiguration` object or it will result in an error.",
        "operationId": "NumberService_RentNumber",
        "requestBody": {
          "$ref": "#/components/requestBodies/RentNumberRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ActiveNumberResponse"
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Available Number"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.NumbersService;\nimport com.sinch.sdk.domains.numbers.models.v1.ActiveNumber;\nimport com.sinch.sdk.domains.numbers.models.v1.SmsConfiguration;\nimport com.sinch.sdk.domains.numbers.models.v1.request.AvailableNumberRentRequest;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Rent {\n\n  private static final Logger LOGGER = Logger.getLogger(Rent.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    String servicePlanIdToAssociateWithTheNumber =\n        Settings.getServicePlanId().orElse(\"MY_SERVICE_PLAN_ID\");\n\n    // Available numbers list can be retrieved by using list() function from available service, see\n    // the SearchAvailableSnippet or\n    // https://developers.sinch.com/docs/numbers/getting-started/java-sdk/searchavailable\n    String phoneNumberToBeRented = \"AVAILABLE_PHONE_NUMBER_TO_BE_RENTED\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    NumbersService numbersService = client.numbers().v1();\n\n    SmsConfiguration smsConfiguration =\n        SmsConfiguration.builder().setServicePlanId(servicePlanIdToAssociateWithTheNumber).build();\n\n    AvailableNumberRentRequest parameters =\n        AvailableNumberRentRequest.builder().setSmsConfiguration(smsConfiguration).build();\n\n    ActiveNumber response = numbersService.rent(phoneNumberToBeRented, parameters);\n\n    LOGGER.info(String.format(\"Rented number: %s\", response));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The available phone number to rent\n  const phoneNumber = 'PHONE_NUMBER';\n  // The service plan ID to associate with the phone number\n  const servicePlanId = process.env.SINCH_SERVICE_PLAN_ID ?? 'MY_SERVICE_PLAN_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try{\n    const response = await sinch.numbers.rent({\n      phoneNumber: phoneNumber,\n      rentNumberRequestBody: {\n        smsConfiguration: {\n          servicePlanId,\n        },\n      },\n    });\n    console.log('✅ Successfully rented the phone number.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to rent the phone number ${phoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\nfrom sinch.domains.numbers.models.v1.types import SmsConfigurationDict\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\"\n)\n\n# The available phone number to rent in E.164 format\nphone_number = \"PHONE_NUMBER\"\n# The service plan ID to associate with the phone number\nservice_plan_id = os.environ.get(\"SINCH_SERVICE_PLAN_ID\") or \"MY_SERVICE_PLAN_ID\"\nsms_configuration: SmsConfigurationDict = {\n    \"service_plan_id\": service_plan_id,\n}\n\nrented_number = sinch_client.numbers.rent(\n    phone_number=phone_number,\n    sms_configuration=sms_configuration\n)\nprint(\"Rented Number:\\n\", rented_number)\n"
          }
        ]
      }
    },
    "/v1/projects/{projectId}/availableNumbers:rentAny": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        }
      ],
      "post": {
        "tags": [
          "Available Number"
        ],
        "summary": "Rent any number that matches the criteria",
        "description": "Activates a phone number that matches the search criteria provided in the request. Currently the rentAny operation works only for US LOCAL numbers",
        "operationId": "NumberService_RentAnyNumber",
        "requestBody": {
          "description": "The request to search and rent a number that matches the criteria.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RentAnyNumberRequest"
              },
              "examples": {
                "activateSMSNumber": {
                  "$ref": "#/components/examples/SearchActivateSMSNumber"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A successful response, or an [error](https://developers.sinch.com/docs/numbers/api-reference/error-codes/status-codes).",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActiveNumberResponse"
                }
              }
            }
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.NumbersService;\nimport com.sinch.sdk.domains.numbers.models.v1.ActiveNumber;\nimport com.sinch.sdk.domains.numbers.models.v1.NumberType;\nimport com.sinch.sdk.domains.numbers.models.v1.SmsConfiguration;\nimport com.sinch.sdk.domains.numbers.models.v1.request.AvailableNumberRentAnyRequest;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class RentAny {\n\n  private static final Logger LOGGER = Logger.getLogger(RentAny.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    String servicePlanIdToAssociateWithTheNumber =\n        Settings.getServicePlanId().orElse(\"MY_SERVICE_PLAN_ID\");\n\n    // ISO 3166-1 alpha-2 country code of the phone number. e.g. \"US\", \"GB\", \"SE\"...\n    // See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for details\n    String regionCode = \"MY_REGION_CODE\";\n\n    NumberType numberType = NumberType.LOCAL;\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    NumbersService numbersService = client.numbers().v1();\n\n    SmsConfiguration smsConfiguration =\n        SmsConfiguration.builder().setServicePlanId(servicePlanIdToAssociateWithTheNumber).build();\n\n    AvailableNumberRentAnyRequest parameters =\n        AvailableNumberRentAnyRequest.builder()\n            .setType(numberType)\n            .setRegionCode(regionCode)\n            .setSmsConfiguration(smsConfiguration)\n            .build();\n\n    ActiveNumber response = numbersService.rentAny(parameters);\n\n    LOGGER.info(String.format(\"Rented number: %s\", response));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The service plan ID to associate with the phone number\n  const servicePlanId = process.env.SINCH_SERVICE_PLAN_ID ?? 'MY_SERVICE_PLAN_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try{\n    const response = await sinch.numbers.rentAny({\n      rentAnyNumberRequestBody: {\n        regionCode: 'US',\n        type: 'LOCAL',\n        smsConfiguration: {\n          servicePlanId,\n        },\n      },\n    });\n    console.log('✅ Successfully rented a phone number.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error('❌ Failed to rent a phone number:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\nfrom sinch.domains.numbers.models.v1.types import SmsConfigurationDict\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\"\n)\n\n# The service plan ID to associate with the phone number\nservice_plan_id = os.environ.get(\"SINCH_SERVICE_PLAN_ID\") or \"MY_SERVICE_PLAN_ID\"\nsms_configuration: SmsConfigurationDict = {\n    \"service_plan_id\": service_plan_id,\n}\n# The URL to receive the notifications about provisioning events\nevent_destination_target = \"CALLBACK_URL\"\n\nresponse = sinch_client.numbers.rent_any(\n    region_code=\"US\",\n    number_type=\"LOCAL\",\n    capabilities=[\"SMS\", \"VOICE\"],\n    sms_configuration=sms_configuration,\n    event_destination_target=event_destination_target\n)\n\nprint(\"Rented Number:\\n\", response)\n"
          }
        ]
      }
    },
    "/v1/projects/{projectId}/activeNumbers": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        },
        {
          "$ref": "#/components/parameters/regionCodeOptional"
        },
        {
          "$ref": "#/components/parameters/numberPattern.pattern"
        },
        {
          "$ref": "#/components/parameters/numberPattern.searchPattern"
        },
        {
          "$ref": "#/components/parameters/typeOptional"
        },
        {
          "$ref": "#/components/parameters/capability"
        },
        {
          "$ref": "#/components/parameters/pageSize"
        },
        {
          "$ref": "#/components/parameters/pageToken"
        },
        {
          "$ref": "#/components/parameters/orderBy"
        }
      ],
      "get": {
        "summary": "Lists active numbers for a project",
        "description": "Lists all active numbers for a project.",
        "operationId": "NumberService_ListActiveNumbers",
        "responses": {
          "200": {
            "$ref": "#/components/responses/ListActiveNumbersResponse"
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Active Number"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.NumbersService;\nimport com.sinch.sdk.domains.numbers.models.v1.response.ActiveNumbersListResponse;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class List {\n\n  private static final Logger LOGGER = Logger.getLogger(List.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    NumbersService numbersService = client.numbers().v1();\n\n    LOGGER.info(\"Listing active numbers\");\n\n    ActiveNumbersListResponse response = numbersService.list();\n\n    LOGGER.info(\"Response\");\n\n    response\n        .iterator()\n        .forEachRemaining(f -> LOGGER.info(String.format(\"%s: %s\", f.getPhoneNumber(), f)));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.numbers.list({\n      regionCode: 'US',\n      type: 'LOCAL',\n    });\n    if (response.data.length === 0) {\n      console.log('No rented phone numbers found.');\n      return;\n    }\n    console.log(`✅ Found ${response.data.length} rented phone numbers.`);\n    response.data.forEach((phoneNumber) => {\n      console.log(phoneNumber);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list the rented phone numbers:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\"\n)\n\nactive_numbers = sinch_client.numbers.list(\n    region_code=\"US\",\n    number_type=\"LOCAL\"\n)\n\npage_counter = 1\nwhile True:\n    print(f\"Page {page_counter} List of Numbers: {active_numbers}\")\n\n    if not active_numbers.has_next_page:\n        break\n\n    active_numbers = active_numbers.next_page()\n    page_counter += 1\n"
          }
        ]
      }
    },
    "/v1/projects/{projectId}/activeNumbers/{phoneNumber}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        },
        {
          "$ref": "#/components/parameters/phoneNumber"
        }
      ],
      "patch": {
        "summary": "Update an active phone number",
        "description": "Update an active phone number. You can perform the following updates:\n\n* Update the name that displays for a customer by modifying the `displayName` parameter.\n* Unlink the number from an SMS service or campaign by updating the `smsConfiguration` configuration object. To unlink a number, submit the request with an empty string (`””`) in the service plan ID or campaign ID fields.\n* Before linking a number to a new service or campaign, it must be unlinked from any existing service or campaign. Then, link the number to a new SMS service or campaign by updating the service plan ID or campaign ID with the new desired value.\n* Update the Voice app to which the number is assigned by using the voiceConfiguration object.\n\nYou can update both SMS and Voice in the same object by including both configuration objects. If you only need to update either Voice or SMS, simply omit the other object. If you pass an empty configuration object, the request will fail.",
        "operationId": "NumberService_UpdateActiveNumber",
        "requestBody": {
          "$ref": "#/components/requestBodies/ActiveNumberRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ActiveNumberResponse"
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Active Number"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.NumbersService;\nimport com.sinch.sdk.domains.numbers.models.v1.ActiveNumber;\nimport com.sinch.sdk.domains.numbers.models.v1.request.ActiveNumberUpdateRequest;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Update {\n\n  private static final Logger LOGGER = Logger.getLogger(Update.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    String phoneNumber = Settings.getPhoneNumber().orElse(\"MY_SINCH_PHONE_NUMBER\");\n\n    String displayName = \"Updated with Sinch Java SDK\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    NumbersService numbersService = client.numbers().v1();\n\n    ActiveNumberUpdateRequest updateRequest =\n        ActiveNumberUpdateRequest.builder().setDisplayName(displayName).build();\n\n    ActiveNumber response = numbersService.update(phoneNumber, updateRequest);\n\n    LOGGER.info(String.format(\"Updated number: %s\", response));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The phone number to update\n  const phoneNumber = process.env.SINCH_PHONE_NUMBER ?? 'MY_SINCH_PHONE_NUMBER';\n  const updatedDisplayName = 'Updated name with Sinch Node.js SDK';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.numbers.update({\n      phoneNumber,\n      updateActiveNumberRequestBody: {\n        displayName: updatedDisplayName,\n      },\n    });\n    console.log('✅ Successfully updated the phone number.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to update the phone number ${phoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\"\n)\n\n# The phone number to update in E.164 format\nphone_number = os.environ.get(\"SINCH_PHONE_NUMBER\") or \"MY_PHONE_NUMBER\"\n# The display name to set for the number\ndisplay_name = \"Updated DISPLAY_NAME\"\n\nresponse = sinch_client.numbers.update(\n    phone_number=phone_number,\n    display_name=display_name,\n)\n\nprint(\"Updated Number:\\n\", response)\n"
          }
        ]
      },
      "get": {
        "summary": "Retrieve an active phone number",
        "description": "Retrieve a specific active phone number.",
        "operationId": "NumberService_GetActiveNumber",
        "responses": {
          "200": {
            "$ref": "#/components/responses/ActiveNumberResponse"
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Active Number"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.NumbersService;\nimport com.sinch.sdk.domains.numbers.models.v1.ActiveNumber;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Get {\n\n  private static final Logger LOGGER = Logger.getLogger(Get.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    String phoneNumber = Settings.getPhoneNumber().orElse(\"MY_SINCH_PHONE_NUMBER\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    NumbersService numbersService = client.numbers().v1();\n\n    LOGGER.info(\"Get for: \" + phoneNumber);\n    ActiveNumber value = numbersService.get(phoneNumber);\n\n    LOGGER.info(\"Response: \" + value);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The phone number you want to retrieve details for\n  const phoneNumber = process.env.SINCH_PHONE_NUMBER ?? 'MY_SINCH_PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try{\n    const response = await sinch.numbers.get({ phoneNumber });\n    console.log('✅ Successfully retrieved the phone number details.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the details for the phone number ${phoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\"\n)\n\n# The active phone number to retrieve details for in E.164 format\nphone_number = os.environ.get(\"SINCH_PHONE_NUMBER\") or \"MY_PHONE_NUMBER\"\n\nresponse = sinch_client.numbers.get(phone_number=phone_number)\n\nprint(f\"Rented number details:\\n{response}\")\n"
          }
        ]
      }
    },
    "/v1/projects/{projectId}/activeNumbers/{phoneNumber}:release": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        },
        {
          "$ref": "#/components/parameters/phoneNumber"
        }
      ],
      "post": {
        "summary": "Release an active number from the project",
        "description": "With this endpoint, you can cancel your subscription for a specific phone number.",
        "operationId": "NumberService_ReleaseNumber",
        "responses": {
          "200": {
            "$ref": "#/components/responses/ActiveNumberResponse"
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Active Number"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.NumbersService;\nimport com.sinch.sdk.domains.numbers.models.v1.ActiveNumber;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Release {\n\n  private static final Logger LOGGER = Logger.getLogger(Release.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    String phoneNumber = Settings.getPhoneNumber().orElse(\"MY_SINCH_PHONE_NUMBER\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    NumbersService numbersService = client.numbers().v1();\n\n    LOGGER.info(\"Release for: \" + phoneNumber);\n\n    ActiveNumber value = numbersService.release(phoneNumber);\n\n    LOGGER.info(\"Response: \" + value);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The phone number to release\n  const phoneNumber = process.env.SINCH_PHONE_NUMBER ?? 'MY_SINCH_PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try {\n    const response = await sinch.numbers.release({ phoneNumber });\n    console.log('✅ Successfully released the phone number.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to release the phone number ${phoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\"\n)\n\n# The phone number to release in E.164 format\nphone_number = os.environ.get(\"SINCH_PHONE_NUMBER\") or \"MY_SINCH_PHONE_NUMBER\"\n\nreleased_number = sinch_client.numbers.release(\n    phone_number=phone_number\n)\n\nprint(\"Released Number:\", released_number)\n"
          }
        ]
      }
    },
    "/v1/projects/{projectId}/availableNumbers": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        },
        {
          "$ref": "#/components/parameters/numberPattern.pattern"
        },
        {
          "$ref": "#/components/parameters/numberPattern.searchPattern"
        },
        {
          "$ref": "#/components/parameters/regionCodeRequired"
        },
        {
          "$ref": "#/components/parameters/typeRequired"
        },
        {
          "$ref": "#/components/parameters/capabilities"
        },
        {
          "name": "size",
          "description": "Optional. The maximum number of items to return.",
          "in": "query",
          "required": false,
          "schema": {
            "type": "integer",
            "format": "int32"
          },
          "example": 3
        }
      ],
      "get": {
        "summary": "Search for available phone numbers",
        "description": "Search for available phone numbers that are available for you to activate. You can filter by any property on the available number resource.\n\nWhen searching, indicate the `capability` of the number in the array as `SMS` and/or `VOICE`. To search for a number capable of both, list both `SMS` and `VOICE`.",
        "operationId": "NumberService_ListAvailableNumbers",
        "responses": {
          "200": {
            "$ref": "#/components/responses/ListAvailableNumbersResponse"
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Available Number"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.NumbersService;\nimport com.sinch.sdk.domains.numbers.models.v1.NumberType;\nimport com.sinch.sdk.domains.numbers.models.v1.request.AvailableNumbersListQueryParameters;\nimport com.sinch.sdk.domains.numbers.models.v1.response.AvailableNumbersListResponse;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class SearchForAvailableNumbers {\n\n  private static final Logger LOGGER = Logger.getLogger(SearchForAvailableNumbers.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    // ISO 3166-1 alpha-2 country code of the phone number. e.g. \"US\", \"GB\", \"SE\"...\n    // See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for details\n    String regionCode = \"MY_REGION_CODE\";\n    NumberType type = NumberType.LOCAL;\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    NumbersService numbersService = client.numbers().v1();\n\n    AvailableNumbersListQueryParameters parameters =\n        AvailableNumbersListQueryParameters.builder()\n            .setRegionCode(regionCode)\n            .setType(type)\n            .build();\n\n    LOGGER.info(\"Looking for available numbers\");\n\n    AvailableNumbersListResponse response = numbersService.searchForAvailableNumbers(parameters);\n\n    response\n        .iterator()\n        .forEachRemaining(\n            number -> LOGGER.info(String.format(\"Available number details: %s\", number)));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try{\n    const response = await sinch.numbers.searchForAvailableNumbers({\n      regionCode: 'US',\n      type: 'LOCAL',\n    });\n    if (!response.availableNumbers?.length) {\n      console.log('No phone numbers are available with these criteria.');\n      return;\n    }\n    console.log(`✅ Found ${response.availableNumbers.length} numbers to rent.`);\n    response.availableNumbers.forEach((number) => {\n      console.log(number);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list phone numbers to rent:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\"\n)\n\navailable_numbers = sinch_client.numbers.search_for_available_numbers(\n    region_code=\"AR\",\n    number_type=\"LOCAL\"\n)\n\nprint(\"Available numbers to rent:\\n\")\nfor number in available_numbers.iterator():\n    print(number)\n"
          }
        ]
      }
    },
    "/v1/projects/{projectId}/availableNumbers/{phoneNumber}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        },
        {
          "$ref": "#/components/parameters/phoneNumber"
        }
      ],
      "get": {
        "summary": "Search for a specific phone number",
        "description": "This endpoint allows you to enter a specific phone number to check if it's available for use. A 200 response will return the number's capability, setup costs, monthly costs and if supporting documentation is required.",
        "operationId": "NumberService_GetAvailableNumber",
        "responses": {
          "200": {
            "$ref": "#/components/responses/AvailableNumberResponse"
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Available Number"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.NumbersService;\nimport com.sinch.sdk.domains.numbers.models.v1.response.AvailableNumber;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class CheckAvailability {\n\n  private static final Logger LOGGER = Logger.getLogger(CheckAvailability.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    String phoneNumber = \"A_PHONE_NUMBER_TO_CHECK\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    NumbersService numbersService = client.numbers().v1();\n\n    LOGGER.info(\"CheckAvailability for: \" + phoneNumber);\n\n    AvailableNumber value = numbersService.checkAvailability(phoneNumber);\n\n    LOGGER.info(\"Response: \" + value);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The phone number to check for rental availability\n  const phoneNumber = 'PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try{\n    const response = await sinch.numbers.checkAvailability({ phoneNumber });\n    console.log('✅ Phone number is available to rent.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to get a successful status for the phone number's availability (${phoneNumber}):`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\"\n)\n\n# The phone number to check in E.164 format\nphone_number = \"PHONE_NUMBER\"\n\nresponse = sinch_client.numbers.check_availability(\n    phone_number=phone_number\n)\n\nprint(\"The phone number is available:\\n\", response)\n"
          }
        ]
      }
    },
    "/v1/projects/{projectId}/numberOrders:lookupNumberRequirements": {
      "post": {
        "operationId": "LookupNumberRequirements",
        "summary": "Lookup number requirements",
        "description": "Returns required KYC fields info based on number type & country legislation.\n\nYou can follow a detailed tutorial outlining the entire ordering process [here](https://developers.sinch.com/docs/numbers/kyc-numbers-order).",
        "parameters": [
          {
            "$ref": "#/components/parameters/projectId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LookupNumberRequirementsRequest"
              },
              "examples": {
                "LookupAustralianKycRequirementsRequest": {
                  "$ref": "#/components/examples/lookupAuKycRequirementsReq"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NumberRequirements"
                },
                "examples": {
                  "LookupAustralianKycRequirementsResponse": {
                    "$ref": "#/components/examples/lookupAuKycRequirementsRes"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Number Order"
        ]
      }
    },
    "/v1/projects/{projectId}/numberOrders:createNumberOrder": {
      "post": {
        "operationId": "CreateNumberOrder",
        "summary": "Create a number order",
        "description": "Create a number order for a specific number or a set of criteria (quantity, pattern etc.) - reserves the provider numbers for 48h and creates entities for collecting KYC info.\n\nYou can follow a detailed tutorial outlining the entire ordering process [here](https://developers.sinch.com/docs/numbers/kyc-numbers-order).",
        "parameters": [
          {
            "$ref": "#/components/parameters/projectId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNumberOrderRequest"
              },
              "examples": {
                "CreateAustralianNumberOrderRequest": {
                  "$ref": "#/components/examples/createAustralianNumberOrderRequest"
                },
                "CreateUsQuantityOrderRequest": {
                  "$ref": "#/components/examples/createUsQuantityOrderRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NumberOrder"
                },
                "examples": {
                  "AustralianNumberOrder": {
                    "$ref": "#/components/examples/australianNumberOrder"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Number Order"
        ]
      }
    },
    "/v1/projects/{projectId}/numberOrders/{numberOrderId}": {
      "get": {
        "operationId": "GetNumberOrder",
        "summary": "Get a number order",
        "description": "Returns the number order alongside all reserved numbers.\n\nYou can follow a detailed tutorial outlining the entire ordering process [here](https://developers.sinch.com/docs/numbers/kyc-numbers-order).",
        "parameters": [
          {
            "$ref": "#/components/parameters/projectId"
          },
          {
            "$ref": "#/components/parameters/numberOrderId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NumberOrder"
                },
                "examples": {
                  "AustralianNumberOrder": {
                    "$ref": "#/components/examples/australianNumberOrder"
                  }
                }
              }
            }
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Number Order"
        ]
      }
    },
    "/v1/projects/{projectId}/numberOrders/{numberOrderId}/registration": {
      "put": {
        "operationId": "UpdateNumberOrderRegistration",
        "summary": "Update number order registration",
        "description": "Updates the registration (vehicle for KYC info) for a specific number order. Validated against the country requirements revealed by the \"Lookup number requirements\" endpoints.\n\nYou can follow a detailed tutorial outlining the entire ordering process [here](https://developers.sinch.com/docs/numbers/kyc-numbers-order).",
        "parameters": [
          {
            "$ref": "#/components/parameters/projectId"
          },
          {
            "$ref": "#/components/parameters/numberOrderId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateNumberOrderRegistrationRequest"
              },
              "examples": {
                "updateAustralianRegistration": {
                  "$ref": "#/components/examples/australianRegistration"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Registration"
                },
                "examples": {
                  "australianRegistration": {
                    "$ref": "#/components/examples/australianRegistration"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Number Order"
        ]
      },
      "get": {
        "operationId": "GetNumberOrderRegistration",
        "summary": "Get number order registration",
        "description": "Retrieves the Registration submitted for a number order via the \"Update number order registration\" endpoint.\n\nYou can follow a detailed tutorial outlining the entire ordering process [here](https://developers.sinch.com/docs/numbers/kyc-numbers-order).",
        "parameters": [
          {
            "$ref": "#/components/parameters/projectId"
          },
          {
            "$ref": "#/components/parameters/numberOrderId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Registration"
                },
                "examples": {
                  "australianRegistration": {
                    "$ref": "#/components/examples/australianRegistration"
                  }
                }
              }
            }
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Number Order"
        ]
      }
    },
    "/v1/projects/{projectId}/numberOrders/{numberOrderId}/attachments/{attachmentId}": {
      "post": {
        "operationId": "UploadNumberOrderAttachment",
        "summary": "Upload an attachment for a number order",
        "description": "Upload file attachments to a number order registration. Mandatory only if revealed in the requirements returned by the \"Lookup number requirements\" endpoint. \n\nThe \"attachmentId\" URL parameter is the one returned by the \"Lookup number requirements\" endpoint.\n\nYou can follow a detailed tutorial outlining the entire ordering process [here](https://developers.sinch.com/docs/numbers/kyc-numbers-order).",
        "parameters": [
          {
            "$ref": "#/components/parameters/projectId"
          },
          {
            "$ref": "#/components/parameters/numberOrderId"
          },
          {
            "name": "attachmentId",
            "description": "attachment IDs are returned by the \"Lookup number requirements\" endpoint",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "d1c7ccbf-919d-462f-8587-dec95a1b11zz"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "File attachment upload request body with Content-Type = multipart/form-data",
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "File attachment to upload"
                  },
                  "documentType": {
                    "type": "string",
                    "description": "Optional document type associated with the uploaded attachment"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Document uploaded successfully"
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "413": {
            "description": "Document is too large to upload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestEntityTooLarge"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Number Order"
        ]
      }
    },
    "/v1/projects/{projectId}/numberOrders/{numberOrderId}/submit": {
      "post": {
        "operationId": "SubmitNumberOrder",
        "summary": "Submit number order",
        "description": "Submits the order for review, assuming the KYC info and attachments were submitted using their dedicated endpoints.\n\nYou can follow a detailed tutorial outlining the entire ordering process [here](https://developers.sinch.com/docs/numbers/kyc-numbers-order).",
        "parameters": [
          {
            "$ref": "#/components/parameters/projectId"
          },
          {
            "$ref": "#/components/parameters/numberOrderId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NumberOrder"
                },
                "examples": {
                  "AustralianNumberOrder": {
                    "$ref": "#/components/examples/australianNumberOrder"
                  }
                }
              }
            }
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Number Order"
        ]
      }
    },
    "/v1/projects/{projectId}/availableRegions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        },
        {
          "name": "types",
          "description": "Only return regions for which numbers are provided with the given types: `MOBILE`, `LOCAL` or `TOLL_FREE`.\n\n  - MOBILE: Numbers that belong to a specific range.\n  - LOCAL: Numbers that are assigned to a specific geographic region.\n  - TOLL_FREE: Number that are free of charge for the calling party but billed for all arriving calls.\n\nIf you want to see all results, do not add the `types` query parameter.",
          "in": "query",
          "required": false,
          "schema": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NumberType"
            }
          }
        }
      ],
      "get": {
        "summary": "List available regions",
        "description": "Lists all regions for numbers provided for the project ID.",
        "operationId": "NumberService_ListAvailableRegions",
        "responses": {
          "200": {
            "$ref": "#/components/responses/ListAvailableRegionsResponse"
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Available Regions"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers.regions;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.AvailableRegionsService;\nimport com.sinch.sdk.domains.numbers.models.v1.regions.response.AvailableRegionsListResponse;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class List {\n\n  private static final Logger LOGGER = Logger.getLogger(List.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    AvailableRegionsService availableRegionsService = client.numbers().v1().regions();\n\n    LOGGER.info(\"List\");\n\n    AvailableRegionsListResponse response = availableRegionsService.list();\n\n    LOGGER.info(\"Available regions:\");\n\n    response.iterator().forEachRemaining(item -> LOGGER.info(String.format(\"- %s\", item)));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try{\n    const response = await sinch.numbers.availableRegions.list({});\n    if (!response.availableRegions?.length) {\n      console.log('No regions are available with these criteria.');\n      return;\n    }\n    console.log(`✅ Found ${response.availableRegions.length} available regions.`);\n    response.availableRegions.forEach((region) => {\n      console.log(region);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list available regions:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\"\n)\n\navailable_regions = sinch_client.numbers.regions.list(\n    number_types=[\"MOBILE\"]\n)\n\nprint(\"Available regions:\\n\")\nfor region in available_regions.iterator():\n    print(region)\n"
          }
        ]
      }
    },
    "/v1/projects/{projectId}/callbackConfiguration": {
      "get": {
        "summary": "Get callbacks configuration",
        "description": "Returns the callbacks configuration for the specified project",
        "operationId": "GetCallbackConfiguration",
        "responses": {
          "200": {
            "description": "Callbacks configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackConfiguration"
                }
              }
            }
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/projectId"
          }
        ],
        "tags": [
          "Numbers Callbacks"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers.eventdestinations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.EventDestinationsService;\nimport com.sinch.sdk.domains.numbers.models.v1.eventdestinations.response.EventDestinationResponse;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Get {\n\n  private static final Logger LOGGER = Logger.getLogger(Get.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    EventDestinationsService eventDestinationsService = client.numbers().v1().eventDestinations();\n\n    LOGGER.info(\"Get\");\n\n    EventDestinationResponse value = eventDestinationsService.get();\n\n    LOGGER.info(\"Response :\" + value);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try{\n    const response = await sinch.numbers.callbacks.get({});\n    console.log('✅ Successfully retrieved the callback configuration.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error('❌ Failed to retrieve the callback configuration:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\"\n)\n\nresponse = sinch_client.numbers.event_destinations.get()\n\nprint(\"Event Destination Configuration:\\n\", response)\n"
          }
        ]
      },
      "patch": {
        "summary": "Update callback configuration",
        "description": "Updates the callbacks configuration for the specified project",
        "operationId": "UpdateCallbackConfiguration",
        "requestBody": {
          "description": "The callback configuration details to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallbackConfigurationUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Callback configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackConfiguration"
                }
              }
            }
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/projectId"
          }
        ],
        "tags": [
          "Numbers Callbacks"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers.eventdestinations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.EventDestinationsService;\nimport com.sinch.sdk.domains.numbers.models.v1.eventdestinations.request.EventDestinationUpdateRequest;\nimport com.sinch.sdk.domains.numbers.models.v1.eventdestinations.response.EventDestinationResponse;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Update {\n\n  private static final Logger LOGGER = Logger.getLogger(Update.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    String hmac = \"NEW_HMAC_SECRET\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    EventDestinationsService eventDestinationsService = client.numbers().v1().eventDestinations();\n\n    LOGGER.info(\"Update callback HMAC secret\");\n\n    EventDestinationUpdateRequest parameters =\n        EventDestinationUpdateRequest.builder().setHmacSecret(hmac).build();\n\n    EventDestinationResponse value = eventDestinationsService.update(parameters);\n\n    LOGGER.info(\"Response :\" + value);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The new HMAC secret to configure for the callback\n  const hmacSecret = 'NEW_HMAC_SECRET';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try{\n    const response = await sinch.numbers.callbacks.update({\n      updateCallbackConfigurationRequestBody: {\n        hmacSecret,\n      },\n    });\n    console.log('✅ Successfully updated the callback configuration.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error('❌ Failed to update the callback configuration:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\"\n)\n\n# The HMAC secret for signing webhook requests to your event destination\nhmac_secret = \"NEW_HMAC_SECRET\"\n\nresponse = sinch_client.numbers.event_destinations.update(\n    hmac_secret=hmac_secret\n)\n\nprint(\"Updated event destination configuration:\\n\", response)\n"
          }
        ]
      }
    },
    "/v1/projects/{projectId}/activeNumbers/{phoneNumber}/emergencyAddress": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        },
        {
          "$ref": "#/components/parameters/phoneNumber"
        }
      ],
      "get": {
        "summary": "Get the emergency address for a number",
        "description": "With this endpoint, you can retrieve the emergency address associated with this number.",
        "operationId": "NumberService_GetEmergencyAddress",
        "responses": {
          "200": {
            "$ref": "#/components/responses/EmergencyAddressResponse"
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Active Number"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.NumbersService;\nimport com.sinch.sdk.domains.numbers.models.v1.EmergencyAddress;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class GetEmergencyAddress {\n  private static final Logger LOGGER = Logger.getLogger(GetEmergencyAddress.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    String phoneNumber = Settings.getPhoneNumber().orElse(\"MY_SINCH_PHONE_NUMBER\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    NumbersService numbersService = client.numbers().v1();\n\n    LOGGER.info(\"Get EmergencyAddress for: \" + phoneNumber);\n\n    EmergencyAddress response = numbersService.getEmergencyAddress(phoneNumber);\n\n    LOGGER.info(\"Response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The phone number for which you want to retrieve the emergency address\n  const phoneNumber = process.env.SINCH_PHONE_NUMBER ?? 'MY_SINCH_PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try{\n    const response = await sinch.numbers.getEmergencyAddress({ phoneNumber });\n    console.log(`✅ Successfully retrieved the Emergency Address for the phone number ${phoneNumber}.`);\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the Emergency Address for the phone number ${phoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{projectId}/activeNumbers/{phoneNumber}/emergencyAddress:provision": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        },
        {
          "$ref": "#/components/parameters/phoneNumber"
        }
      ],
      "post": {
        "summary": "Add a emergency address for a number",
        "description": "With this endpoint, you can provision an emergency address associated with this number.",
        "operationId": "NumberService_ProvisionEmergencyAddress",
        "requestBody": {
          "$ref": "#/components/requestBodies/ProvisionEmergencyAddressRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/EmergencyAddressResponse"
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Active Number"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.NumbersService;\nimport com.sinch.sdk.domains.numbers.models.v1.EmergencyAddress;\nimport com.sinch.sdk.domains.numbers.models.v1.request.EmergencyAddressRequest;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class ProvisionEmergencyAddress {\n\n  private static final Logger LOGGER = Logger.getLogger(ProvisionEmergencyAddress.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    String phoneNumber = Settings.getPhoneNumber().orElse(\"MY_SINCH_PHONE_NUMBER\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    NumbersService numbersService = client.numbers().v1();\n\n    LOGGER.info(\"Provisioning EmergencyAddress for: \" + phoneNumber);\n\n    EmergencyAddress emergencyAddress =\n        EmergencyAddress.builder()\n            .setStreetNumber(\"3500\")\n            .setStreetInfo(\"Lenox Rd NE\")\n            .setCity(\"Atlanta\")\n            .setState(\"GA\")\n            .setPostalCode(\"30326\")\n            .build();\n\n    EmergencyAddressRequest request =\n        EmergencyAddressRequest.builder()\n            .setDisplayName(\"Emergency Address Display Name\")\n            .setAddress(emergencyAddress)\n            .build();\n    EmergencyAddress value = numbersService.provisionEmergencyAddress(phoneNumber, request);\n\n    LOGGER.info(\"Response: \" + value);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The phone number you want to provision an emergency address for\n  const phoneNumber = process.env.SINCH_PHONE_NUMBER ?? 'MY_SINCH_PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try{\n    const response = await sinch.numbers.provisionEmergencyAddress({\n      phoneNumber,\n      emergencyAddressRequestBody: {\n        displayName: 'Emergency Address Display Name',\n        address: {\n          streetNumber: '3500',\n          streetInfo: 'Lenox Rd NE',\n          city: 'Atlanta',\n          state: 'GA',\n          postalCode: '30326',\n        },\n      },\n    });\n    console.log(`✅ Successfully provisioned an emergency address for the phone number ${phoneNumber}.`);\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to provision an emergency address for the phone number ${phoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{projectId}/activeNumbers/{phoneNumber}/emergencyAddress:deprovision": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        },
        {
          "$ref": "#/components/parameters/phoneNumber"
        }
      ],
      "post": {
        "summary": "Remove the emergency address for a number.",
        "description": "With this endpoint, you can deprovision the emergency address associated with this number.",
        "operationId": "NumberService_DeprovisionEmergencyAddress",
        "responses": {
          "200": {
            "description": "A successful response, or an [error](https://developers.sinch.com/docs/numbers/api-reference/error-codes/status-codes/)"
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Active Number"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.NumbersService;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class DeprovisionEmergencyAddress {\n  private static final Logger LOGGER =\n      Logger.getLogger(DeprovisionEmergencyAddress.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    String phoneNumber = Settings.getPhoneNumber().orElse(\"MY_SINCH_PHONE_NUMBER\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    NumbersService numbersService = client.numbers().v1();\n\n    LOGGER.info(\"De-provisioning EmergencyAddress for: \" + phoneNumber);\n\n    numbersService.deprovisionEmergencyAddress(phoneNumber);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The phone number you want to remove the emergency address from\n  const phoneNumber = process.env.SINCH_PHONE_NUMBER ?? 'MY_SINCH_PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try{\n    await sinch.numbers.deprovisionEmergencyAddress({ phoneNumber });\n    console.log(`✅ Successfully deprovisioned the emergency address from the phone number ${phoneNumber}.`);\n  } catch (err) {\n    console.error(`❌ Failed to deprovision the emergency address from the phone number ${phoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{projectId}/activeNumbers/{phoneNumber}/emergencyAddress:validate": {
      "parameters": [
        {
          "$ref": "#/components/parameters/projectId"
        },
        {
          "$ref": "#/components/parameters/phoneNumber"
        }
      ],
      "post": {
        "summary": "Validate the emergency address for a number.",
        "description": "With this endpoint, you can validate the emergency address associated with this number.",
        "operationId": "NumberService_ValidateEmergencyAddress",
        "requestBody": {
          "$ref": "#/components/requestBodies/ValidateEmergencyAddressRequest"
        },
        "responses": {
          "200": {
            "description": "A successful response, or an [error](https://developers.sinch.com/docs/numbers/api-reference/error-codes/status-codes/)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidateAddressResponse"
                },
                "examples": {
                  "perfectMatch": {
                    "$ref": "#/components/examples/perfectMatch"
                  },
                  "nearMatch": {
                    "$ref": "#/components/examples/nearMatch"
                  },
                  "noMatch": {
                    "$ref": "#/components/examples/noMatch"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400 Invalid Argument error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidArgument"
                }
              }
            }
          },
          "404": {
            "description": "404 Not Found error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "500 Internal Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          }
        },
        "tags": [
          "Active Number"
        ],
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage numbers;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.numbers.api.v1.NumbersService;\nimport com.sinch.sdk.domains.numbers.models.v1.EmergencyAddress;\nimport com.sinch.sdk.domains.numbers.models.v1.request.EmergencyAddressRequest;\nimport com.sinch.sdk.domains.numbers.models.v1.response.ValidateAddressResponse;\nimport com.sinch.sdk.models.Configuration;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class ValidateEmergencyAddress {\n  private static final Logger LOGGER = Logger.getLogger(ValidateEmergencyAddress.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n\n    String phoneNumber = Settings.getPhoneNumber().orElse(\"MY_SINCH_PHONE_NUMBER\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    NumbersService numbersService = client.numbers().v1();\n\n    LOGGER.info(\"Validate EmergencyAddress for: \" + phoneNumber);\n\n    EmergencyAddress emergencyAddress =\n        EmergencyAddress.builder()\n            .setStreetNumber(\"3500\")\n            .setStreetInfo(\"Lenox Road NE\")\n            .setCity(\"Atlanta\")\n            .setState(\"GA\")\n            .setPostalCode(\"30326\")\n            .build();\n\n    EmergencyAddressRequest request =\n        EmergencyAddressRequest.builder()\n            .setDisplayName(\"Emergency Address Display Name\")\n            .setAddress(emergencyAddress)\n            .build();\n    ValidateAddressResponse value = numbersService.validateEmergencyAddress(phoneNumber, request);\n\n    LOGGER.info(\"Response: \" + value);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n\n  // The phone number you want to validate an emergency address for\n  const phoneNumber = process.env.SINCH_PHONE_NUMBER ?? 'MY_SINCH_PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret });\n\n  try{\n    const response = await sinch.numbers.validateEmergencyAddress({\n      phoneNumber,\n      emergencyAddressRequestBody: {\n        displayName: 'Emergency Address Display Name',\n        address: {\n          streetNumber: '3500',\n          streetInfo: 'Lenox Rd NE',\n          city: 'Atlanta',\n          state: 'GA',\n          postalCode: '30326',\n        },\n      },\n    });\n    console.log('✅ Successfully submitted an emergency address validation.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to submit an emergency address validation for the phone number ${phoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "projectId": {
        "name": "projectId",
        "description": "Found on your [Sinch Customer Dashboard](https://dashboard.sinch.com/settings/project-management). Settings > Projects.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "example": "YOUR_projectId"
        }
      },
      "phoneNumber": {
        "name": "phoneNumber",
        "description": "Output only. The phone number in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format with leading `+`.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "example": "+12025550134",
          "default": "YOUR_selected_phoneNumber_from_search"
        }
      },
      "numberOrderId": {
        "name": "numberOrderId",
        "description": "The ID of the number order created by the REST API user.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "numberPattern.pattern": {
        "name": "numberPattern.pattern",
        "description": "Sequence of digits to search for. If you prefer or need certain digits in sequential order, you can enter the sequence of numbers here. For example, `2020`.",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "example": "%2B120"
        }
      },
      "numberPattern.searchPattern": {
        "name": "numberPattern.searchPattern",
        "description": "Search pattern to apply. The options are, `START`, `CONTAINS`, and `END`.",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/NumberPatternSearchPattern"
        }
      },
      "regionCodeRequired": {
        "name": "regionCode",
        "description": "Region code to filter by. ISO 3166-1 alpha-2 country code of the phone number. Example: US, GB or SE.",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "example": "US"
        }
      },
      "regionCodeOptional": {
        "name": "regionCode",
        "description": "Region code to filter by. ISO 3166-1 alpha-2 country code of the phone number. Example: US, GB or SE.",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "example": "US"
        }
      },
      "typeRequired": {
        "name": "type",
        "description": "Number type to filter by. Options include, `MOBILE`, `LOCAL` or `TOLL_FREE`.",
        "in": "query",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/NumberType"
        }
      },
      "typeOptional": {
        "name": "type",
        "description": "Number type to filter by. Options include, `MOBILE`, `LOCAL` or `TOLL_FREE`.",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/NumberType"
        }
      },
      "capabilities": {
        "name": "capabilities",
        "description": "Number capabilities to filter by SMS and/or VOICE.",
        "in": "query",
        "required": false,
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/NumberCapability"
          }
        }
      },
      "capability": {
        "name": "capability",
        "description": "Number capabilities to filter by SMS and/or VOICE.",
        "in": "query",
        "required": false,
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/NumberCapability"
          }
        }
      },
      "pageSize": {
        "name": "pageSize",
        "description": "The maximum number of items to return.",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "format": "int32"
        }
      },
      "pageToken": {
        "name": "pageToken",
        "description": "The next page token value returned from a previous List request, if any.",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "orderBy": {
        "name": "orderBy",
        "description": "Supported fields for ordering by `phoneNumber` or `displayName`.",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "phoneNumber",
            "displayName"
          ],
          "x-enumDescriptions": {
            "phoneNumber": "Ordered by phone number",
            "displayName": "Ordered by display name"
          },
          "description": "The ordering the request is supporting"
        }
      }
    },
    "examples": {
      "SearchActivateSMSNumber": {
        "summary": "Search and activate a number that matches criteria and sets the SMS configuration",
        "value": {
          "regionCode": "US",
          "type": "LOCAL",
          "capabilities": [
            "SMS"
          ],
          "numberPattern": {
            "pattern": "+1208",
            "searchPattern": "START"
          },
          "smsConfiguration": {
            "servicePlanId": "YOUR_SMS_servicePlanId",
            "campaignId": "YOUR_campaignId_from_TCR"
          },
          "callbackUrl": "https://www.your-callback-server.com/callback"
        }
      },
      "lookupAuKycRequirementsReq": {
        "value": {
          "regionCode": "AU",
          "numberType": "MOBILE"
        }
      },
      "lookupAuKycRequirementsRes": {
        "value": {
          "fields": {
            "schema": "/schema/policySchema-v1.json",
            "rules": [
              {
                "template": {}
              },
              {
                "template": {}
              }
            ],
            "attachments": []
          }
        }
      },
      "activateSMSNumberReq": {
        "summary": "Activate number with SMS configuration",
        "value": {
          "smsConfiguration": {
            "servicePlanId": "YOUR_SMS_servicePlanId",
            "campaignId": "YOUR_campaignId_from_TCR"
          },
          "callbackUrl": "https://www.your-callback-server.com/callback"
        }
      },
      "activateSMSNumberRes": {
        "summary": "Response for activing a number with SMS configuration",
        "value": {
          "phoneNumber": "+12025550134",
          "projectId": "51bc3f40-f266-4ca8-8938-a1ed0ff32b9a",
          "displayName": "MyPhoneNumber",
          "regionCode": "US",
          "type": "MOBILE",
          "capability": [
            "SMS"
          ],
          "money": {
            "currencyCode": "USD",
            "amount": "2.00"
          },
          "paymentIntervalMonths": 0,
          "nextChargeDate": "2024-08-24T14:15:22Z",
          "expireAt": "2024-09-24T14:15:22Z",
          "smsConfiguration": {
            "servicePlanId": "YOUR_service_plan_id",
            "scheduledProvisioning": {
              "servicePlanId": "YOUR_service_plan_id",
              "status": "WAITING",
              "lastUpdatedTime": "2024-08-04T14:15:22Z",
              "campaignId": "YOUR_campaign_id"
            },
            "campaignId": "YOUR_campaign_id"
          }
        }
      },
      "activateBothSMSandVoiceNumberReq": {
        "summary": "Activate number with SMS and Voice configuration",
        "value": {
          "smsConfiguration": {
            "servicePlanId": "YOUR_SMS_servicePlanId"
          },
          "voiceConfiguration": {
            "type": "RTC",
            "appId": "YOUR_Voice_appId"
          },
          "callbackUrl": "https://www.your-callback-server.com/callback"
        }
      },
      "activateBothSMSandVoiceNumberRes": {
        "summary": "Response for activing a number with both SMS and Voice configuration",
        "value": {
          "phoneNumber": "+12025550134",
          "projectId": "51bc3f40-f266-4ca8-8938-a1ed0ff32b9a",
          "displayName": "MyPhoneNumber",
          "regionCode": "US",
          "type": "MOBILE",
          "capability": [
            "SMS",
            "VOICE"
          ],
          "money": {
            "currencyCode": "USD",
            "amount": "2.00"
          },
          "paymentIntervalMonths": 0,
          "nextChargeDate": "2024-08-24T14:15:22Z",
          "expireAt": "2024-09-24T14:15:22Z",
          "smsConfiguration": {
            "servicePlanId": "YOUR_service_plan_id",
            "scheduledProvisioning": {
              "servicePlanId": "",
              "status": "WAITING",
              "lastUpdatedTime": "2024-08-04T14:15:22Z",
              "campaignId": "YOUR_campaign_id"
            },
            "campaignId": "YOUR_campaign_id"
          },
          "voiceConfiguration": {
            "type": "RTC",
            "lastUpdatedTime": "2024-09-24T14:15:22Z",
            "scheduledVoiceProvisioning": {
              "type": "RTC",
              "lastUpdatedTime": "2024-09-24T14:15:22Z",
              "status": "WAITING",
              "appId": "YOUR_app_id"
            },
            "appId": "YOUR_app_id"
          }
        }
      },
      "activateVoiceNumberReq": {
        "summary": "Activate number with Voice configuration",
        "value": {
          "voiceConfiguration": {
            "type": "RTC",
            "appId": "YOUR_app_id"
          },
          "callbackUrl": "https://www.your-callback-server.com/callback"
        }
      },
      "activateVoiceNumberRes": {
        "summary": "Response for activing a number with Voice configuration",
        "value": {
          "phoneNumber": "+12025550134",
          "projectId": "51bc3f40-f266-4ca8-8938-a1ed0ff32b9a",
          "displayName": "MyPhoneNumber",
          "regionCode": "US",
          "type": "MOBILE",
          "capability": [
            "VOICE"
          ],
          "money": {
            "currencyCode": "USD",
            "amount": "2.00"
          },
          "paymentIntervalMonths": 0,
          "nextChargeDate": "2024-08-24T14:15:22Z",
          "expireAt": "2024-09-24T14:15:22Z",
          "voiceConfiguration": {
            "type": "RTC",
            "lastUpdatedTime": "2024-09-24T14:15:22Z",
            "scheduledVoiceProvisioning": {
              "type": "RTC",
              "lastUpdatedTime": "2024-09-24T14:15:22Z",
              "status": "WAITING",
              "appId": "YOUR_app_id"
            },
            "appId": "YOUR_app_id"
          }
        }
      },
      "activateESTNumberReq": {
        "summary": "Activate number with Elastic SIP Trunking configuration",
        "value": {
          "voiceConfiguration": {
            "type": "EST",
            "trunkId": "YOUR_trunk_id"
          },
          "callbackUrl": "https://www.your-callback-server.com/callback"
        }
      },
      "activateESTNumberRes": {
        "summary": "Response for activing a number with Elastic SIP Trunking configuration",
        "value": {
          "phoneNumber": "+12025550134",
          "projectId": "51bc3f40-f266-4ca8-8938-a1ed0ff32b9a",
          "displayName": "MyPhoneNumber",
          "regionCode": "US",
          "type": "LOCAL",
          "capability": [
            "VOICE"
          ],
          "money": {
            "currencyCode": "USD",
            "amount": "2.00"
          },
          "paymentIntervalMonths": 0,
          "nextChargeDate": "2024-08-24T14:15:22Z",
          "expireAt": "2024-09-24T14:15:22Z",
          "voiceConfiguration": {
            "type": "EST",
            "lastUpdatedTime": "2024-09-24T14:15:22Z",
            "scheduledVoiceProvisioning": {
              "type": "EST",
              "lastUpdatedTime": "2024-09-24T14:15:22Z",
              "status": "WAITING",
              "trunkId": "YOUR_trunk_id"
            },
            "trunkId": "YOUR_trunk_id"
          }
        }
      },
      "activateFaxNumberReq": {
        "summary": "Activate number with Fax configuration",
        "value": {
          "voiceConfiguration": {
            "type": "FAX",
            "serviceId": "YOUR_service_id"
          },
          "callbackUrl": "https://www.your-callback-server.com/callback"
        }
      },
      "activateFaxNumberRes": {
        "summary": "Response for activing a number with Fax configuration",
        "value": {
          "phoneNumber": "+12025550134",
          "projectId": "51bc3f40-f266-4ca8-8938-a1ed0ff32b9a",
          "displayName": "MyPhoneNumber",
          "regionCode": "US",
          "type": "LOCAL",
          "capability": [
            "VOICE"
          ],
          "money": {
            "currencyCode": "USD",
            "amount": "2.00"
          },
          "paymentIntervalMonths": 0,
          "nextChargeDate": "2024-08-24T14:15:22Z",
          "expireAt": "2024-09-24T14:15:22Z",
          "voiceConfiguration": {
            "type": "FAX",
            "lastUpdatedTime": "2024-09-24T14:15:22Z",
            "scheduledVoiceProvisioning": {
              "type": "FAX",
              "lastUpdatedTime": "2024-09-24T14:15:22Z",
              "status": "WAITING",
              "serviceId": "YOUR_service_id"
            },
            "serviceId": "YOUR_service_id"
          }
        }
      },
      "updateSMSandVoiceNumber": {
        "summary": "Update number with SMS and Voice configuration",
        "value": {
          "displayName": "MyPhoneNumber",
          "smsConfiguration": {
            "servicePlanId": "string",
            "campaignId": "YOUR_campaignId_from_TCR"
          },
          "voiceConfiguration": {
            "type": "RTC",
            "appId": "YOUR_Voice_appId"
          },
          "callbackUrl": "https://www.your-callback-server.com/callback"
        }
      },
      "updateSMSNumber": {
        "summary": "Update number with SMS configuration",
        "value": {
          "displayName": "MyPhoneNumber",
          "smsConfiguration": {
            "servicePlanId": "YOUR_servicePlanId",
            "campaignId": "YOUR_campaignId_from_TCR"
          },
          "callbackUrl": "https://www.your-callback-server.com/callback"
        }
      },
      "updateVoiceNumber": {
        "summary": "Update number with Voice configuration",
        "value": {
          "displayName": "MyPhoneNumber",
          "voiceConfiguration": {
            "type": "RTC",
            "appId": "YOUR_Voice_appId"
          },
          "callbackUrl": "https://www.your-callback-server.com/callback"
        }
      },
      "perfectMatch": {
        "summary": "Address validation is a perfect match",
        "value": {
          "phoneNumber": "+12025550134",
          "displayName": "User Name",
          "validatedAddress": {
            "streetNumber": "12345",
            "streetInfo": "Main St",
            "location": "Apt 5",
            "city": "Springfield",
            "state": "IL",
            "postalCode": "62701",
            "postalCodePlusFour": "1234"
          },
          "validationResult": "EXACT_MATCH",
          "validationMessage": "Address is a perfect match",
          "correctedAddress": {},
          "candidateAddresses": []
        }
      },
      "nearMatch": {
        "summary": "Address validation is a near match to another known address",
        "value": {
          "phoneNumber": "+12025550134",
          "displayName": "User Name",
          "validatedAddress": {
            "streetNumber": "12345",
            "streetInfo": "Main Street",
            "location": "Apt 5",
            "city": "Springfield",
            "state": "IL",
            "postalCode": "62701",
            "postalCodePlusFour": "1234"
          },
          "validationResult": "NEAR_MATCH",
          "validationMessage": "Address is a near match",
          "correctedAddress": {
            "streetNumber": "12345",
            "streetInfo": "Main St",
            "location": "Apt 5",
            "city": "Springfield",
            "state": "IL",
            "postalCode": "62701",
            "postalCodePlusFour": "1234"
          },
          "candidateAddresses": []
        }
      },
      "noMatch": {
        "summary": "Address validation doesn't match any known address",
        "value": {
          "phoneNumber": "+12025550134",
          "displayName": "User Name",
          "validatedAddress": {
            "streetNumber": "12345",
            "streetInfo": "Main St",
            "location": "Apt 5",
            "city": "Springfield",
            "state": "IL",
            "postalCode": "62701",
            "postalCodePlusFour": "1234"
          },
          "validationResult": "NO_MATCH",
          "validationMessage": "Address doesn't match any known address",
          "correctedAddress": {},
          "candidateAddresses": [
            {
              "streetNumber": "67890",
              "streetInfo": "Elm St",
              "location": "Apt 10",
              "city": "Springfield",
              "state": "IL",
              "postalCode": "62702",
              "postalCodePlusFour": "5678"
            },
            {
              "streetNumber": "54321",
              "streetInfo": "Oak St",
              "location": "Apt 20",
              "city": "Springfield",
              "state": "IL",
              "postalCode": "62703",
              "postalCodePlusFour": "9876"
            }
          ]
        }
      },
      "createAustralianNumberOrderRequest": {
        "summary": "Create Australian Number Order request",
        "value": {
          "regionCode": "AU",
          "numberType": "MOBILE",
          "smsConfiguration": {
            "servicePlanId": "1dez6a8300774283a4256aa756a11111"
          },
          "callbackUrl": "https://www.your-callback-server.com/callback",
          "numberOrderOption": {
            "phoneNumbers": [
              "+61411111112"
            ]
          }
        }
      },
      "createUsQuantityOrderRequest": {
        "summary": "Create US LOCAL Quantity Order request",
        "value": {
          "regionCode": "US",
          "numberType": "LOCAL",
          "smsConfiguration": {
            "servicePlanId": "1dez6a8300774283a4256aa756a11111"
          },
          "callbackUrl": "https://www.your-callback-server.com/callback",
          "quantityOrderOption": {
            "requestedQuantity": 3,
            "sequential": false
          }
        }
      },
      "australianNumberOrder": {
        "summary": "Australian Number Order response",
        "value": {
          "projectId": "10d64985-0bfb-43d3-a2b9-bc5fa6a4752c",
          "idNumberOrder": "03kjzencnckxrn216rr1zzzzzz",
          "regionCode": "AU",
          "state": "CREATED",
          "numberType": "MOBILE",
          "orderNumbers": [
            {
              "phoneNumber": "+61411111112",
              "numberPrice": {
                "setupPrice": {
                  "currencyCode": "USD",
                  "amount": "1.00"
                },
                "monthlyPrice": {
                  "currencyCode": "USD",
                  "amount": "1.00"
                },
                "paymentIntervalMonths": 1
              },
              "capabilities": [
                "SMS"
              ]
            }
          ],
          "smsConfiguration": {
            "servicePlanId": "1dez6a8300774283a4256aa756a11111"
          },
          "expireTime": "2026-03-07T16:53:00.204187Z",
          "createTime": "2026-03-05T16:53:00Z",
          "updateTime": "2026-03-05T16:53:00Z"
        }
      },
      "australianRegistration": {
        "summary": "Australian registration",
        "value": {
          "requestDetails": {
            "data": [
              [
                {
                  "senderId": "+61XXXXXXXXX",
                  "purposeOfTheTraffic": "One Time Password",
                  "intendedUseOfMobileNumbers": "Transactional",
                  "iConfirmThatMyBusinessHasAValidUseCaseForThisLn": true
                }
              ],
              {
                "endBusinessName": "ExampleExample",
                "endBusinessAddress": "ExampleExample",
                "endBusinessAddress2": "ExampleExample",
                "city": "Victoria",
                "state": "VIC",
                "country": "AU",
                "postalCode": "3000"
              },
              {
                "firstName": "Example",
                "lastName": "Example",
                "phoneNumber": "+61XXXXXXXXX"
              }
            ]
          }
        }
      }
    },
    "requestBodies": {
      "ActiveNumberRequest": {
        "description": "The number body to be updated.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ActiveNumberRequest"
            },
            "examples": {
              "updateSMSandVoiceNumber": {
                "$ref": "#/components/examples/updateSMSandVoiceNumber"
              },
              "updateSMSNumber": {
                "$ref": "#/components/examples/updateSMSNumber"
              },
              "updateVoiceNumber": {
                "$ref": "#/components/examples/updateVoiceNumber"
              }
            }
          }
        }
      },
      "RentNumberRequest": {
        "description": "The request to rent a number.",
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/RentNumberRequest"
            },
            "examples": {
              "activateBothSMSandVoiceNumber": {
                "$ref": "#/components/examples/activateBothSMSandVoiceNumberReq"
              },
              "activateSMSNumber": {
                "$ref": "#/components/examples/activateSMSNumberReq"
              },
              "activateVoiceNumber": {
                "$ref": "#/components/examples/activateVoiceNumberReq"
              },
              "activateESTNumber": {
                "$ref": "#/components/examples/activateESTNumberReq"
              },
              "activateFaxNumber": {
                "$ref": "#/components/examples/activateFaxNumberReq"
              }
            }
          }
        }
      },
      "ProvisionEmergencyAddressRequest": {
        "description": "Request to provision an emergency address for a number.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/EmergencyAddressRequest"
            },
            "example": {
              "displayName": "New Emergency Address",
              "address": {
                "streetNumber": "12345",
                "streetInfo": "Main St",
                "city": "Springfield",
                "state": "IL",
                "postalCode": "62701"
              }
            }
          }
        }
      },
      "ValidateEmergencyAddressRequest": {
        "description": "Request to validate an emergency address for a number.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/EmergencyAddressRequest"
            },
            "example": {
              "displayName": "New Emergency Address",
              "address": {
                "streetNumber": "12345",
                "streetInfo": "Main St",
                "city": "Springfield",
                "state": "IL",
                "postalCode": "62701"
              }
            }
          }
        }
      }
    },
    "responses": {
      "ActiveNumberResponse": {
        "description": "A successful response, or an [Error](https://developers.sinch.com/docs/numbers/api-reference/error-codes/status-codes/).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ActiveNumberResponse"
            },
            "examples": {
              "activateBothSMSandVoiceNumber": {
                "$ref": "#/components/examples/activateBothSMSandVoiceNumberRes"
              },
              "activateSMSNumber": {
                "$ref": "#/components/examples/activateSMSNumberRes"
              },
              "activateVoiceNumber": {
                "$ref": "#/components/examples/activateVoiceNumberRes"
              },
              "activateESTNumber": {
                "$ref": "#/components/examples/activateESTNumberRes"
              },
              "activateFaxNumber": {
                "$ref": "#/components/examples/activateFaxNumberRes"
              }
            }
          }
        }
      },
      "AvailableNumberResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AvailableNumber"
            }
          }
        }
      },
      "ListActiveNumbersResponse": {
        "description": "A successful response, or an [Error](https://developers.sinch.com/docs/numbers/api-reference/error-codes/status-codes/).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListActiveNumbersResponse"
            }
          }
        }
      },
      "ListAvailableNumbersResponse": {
        "description": "A successful response, or an [Error](https://developers.sinch.com/docs/numbers/api-reference/error-codes/status-codes/).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListAvailableNumbersResponse"
            }
          }
        }
      },
      "ListAvailableRegionsResponse": {
        "description": "A successful response, or an [Error](https://developers.sinch.com/docs/numbers/api-reference/error-codes/status-codes/).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListAvailableRegionsResponse"
            }
          }
        }
      },
      "EmergencyAddressResponse": {
        "description": "A successful response, or an [error](https://developers.sinch.com/docs/numbers/api-reference/error-codes/status-codes/)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/EmergencyAddress"
            }
          }
        }
      },
      "PermissionDenied": {
        "description": "PERMISSION_DENIED: improper credentials. Be sure your projectId, username and password are correct.",
        "content": {
          "application/json": {
            "schema": {},
            "example": {
              "error": {
                "code": 403,
                "message": "",
                "status": "PERMISSION_DENIED",
                "details": []
              }
            }
          }
        }
      }
    },
    "schemas": {
      "RentAnyNumberRequest": {
        "title": "RentAnyNumberRequest",
        "required": [
          "regionCode",
          "type"
        ],
        "type": "object",
        "properties": {
          "numberPattern": {
            "$ref": "#/components/schemas/NumberPattern"
          },
          "regionCode": {
            "$ref": "#/components/schemas/RegionCode"
          },
          "type": {
            "$ref": "#/components/schemas/NumberType"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NumberCapability"
            },
            "description": "Number capabilities to filter by, `SMS` and/or `VOICE`."
          },
          "smsConfiguration": {
            "$ref": "#/components/schemas/smsConfiguration"
          },
          "voiceConfiguration": {
            "$ref": "#/components/schemas/VoiceConfiguration"
          },
          "callbackUrl": {
            "type": "string",
            "description": "The callback URL to be called for a rented number's provisioning / deprovisioning operations.",
            "example": "https://www.your-callback-server.com/callback"
          }
        },
        "description": "Request message for searching and renting in one go any number that matches the search criteria."
      },
      "NumberPatternSearchPattern": {
        "type": "string",
        "enum": [
          "START",
          "CONTAINS",
          "END"
        ],
        "x-enumDescriptions": {
          "START": "Numbers that start with the provided sequence of digits.",
          "CONTAINS": "Numbers that contain the sequence of digits entered.",
          "END": "Numbers that end with the sequence of digits entered."
        },
        "description": "The pattern to apply to searches.",
        "title": "Search Pattern"
      },
      "money": {
        "type": "object",
        "description": "An object giving details on currency code and the amount charged.",
        "properties": {
          "currencyCode": {
            "type": "string",
            "example": "USD",
            "description": "The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html)."
          },
          "amount": {
            "type": "string",
            "example": "2.00",
            "description": "The amount in decimal form.\nFor example `2.00`.\nThere are no guarantees on the precision unless documented by the message origin. The amount cannot be updated and is read-only."
          }
        },
        "title": "Money"
      },
      "ActiveNumberRequest": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "description": "User supplied name for the phone number."
          },
          "smsConfiguration": {
            "$ref": "#/components/schemas/smsConfiguration"
          },
          "voiceConfiguration": {
            "$ref": "#/components/schemas/VoiceConfiguration"
          },
          "callbackUrl": {
            "type": "string",
            "description": "The callback URL to be called for a rented number's provisioning / deprovisioning operations."
          }
        },
        "description": "The phone number that has been rented by a customer and assigned to a project.",
        "title": "Active Number Request"
      },
      "ActiveNumberResponse": {
        "type": "object",
        "properties": {
          "phoneNumber": {
            "$ref": "#/components/schemas/PhoneNumber"
          },
          "projectId": {
            "type": "string",
            "example": "51bc3f40-f266-4ca8-8938-a1ed0ff32b9a",
            "description": "Project ID. Your project ID can be found on your [Sinch Customer Dashboard](https://dashboard.sinch.com/settings/project-management)."
          },
          "displayName": {
            "type": "string",
            "description": "User supplied name for the phone number."
          },
          "regionCode": {
            "$ref": "#/components/schemas/RegionCode"
          },
          "type": {
            "$ref": "#/components/schemas/NumberType"
          },
          "capability": {
            "description": "The capability of the number.",
            "type": "array",
            "example": [
              "SMS"
            ],
            "items": {
              "$ref": "#/components/schemas/NumberCapability"
            }
          },
          "money": {
            "$ref": "#/components/schemas/money"
          },
          "paymentIntervalMonths": {
            "type": "integer",
            "format": "int32",
            "description": "How often the recurring price is charged in months.",
            "readOnly": true
          },
          "nextChargeDate": {
            "type": "string",
            "format": "date-time",
            "description": "The date of the next charge.",
            "readOnly": true
          },
          "expireAt": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the subscription will expire if an expiration date has been set.",
            "readOnly": true
          },
          "smsConfiguration": {
            "$ref": "#/components/schemas/smsConfiguration"
          },
          "voiceConfiguration": {
            "$ref": "#/components/schemas/VoiceConfiguration"
          },
          "callbackUrl": {
            "type": "string",
            "description": "The callback URL to be called for a rented number's provisioning / deprovisioning operations.",
            "example": "https://www.your-callback-server.com/callback"
          }
        },
        "description": "The phone number that has been bought by a customer and assigned to a project.",
        "title": "Active Number Response"
      },
      "AvailableNumber": {
        "type": "object",
        "properties": {
          "phoneNumber": {
            "$ref": "#/components/schemas/PhoneNumber"
          },
          "regionCode": {
            "$ref": "#/components/schemas/RegionCode"
          },
          "type": {
            "$ref": "#/components/schemas/NumberType"
          },
          "capability": {
            "type": "array",
            "description": "The capability of the number.",
            "example": [
              "SMS",
              "VOICE"
            ],
            "items": {
              "$ref": "#/components/schemas/NumberCapability"
            }
          },
          "setupPrice": {
            "$ref": "#/components/schemas/money"
          },
          "monthlyPrice": {
            "$ref": "#/components/schemas/money"
          },
          "paymentIntervalMonths": {
            "type": "integer",
            "format": "int32",
            "description": "How often the recurring price is charged in months.",
            "readOnly": true
          },
          "supportingDocumentationRequired": {
            "type": "boolean",
            "description": "Whether or not supplementary documentation will be required to complete the number rental.",
            "readOnly": true
          }
        },
        "description": "The phone numbers that are available to be rented in [dashboard.sinch.com](https://dashboard.sinch.com/numbers/buy-numbers) or via the public numbers API.",
        "title": "Available Number"
      },
      "AvailableRegion": {
        "type": "object",
        "properties": {
          "regionCode": {
            "$ref": "#/components/schemas/RegionCode"
          },
          "regionName": {
            "type": "string",
            "example": "United States",
            "description": "Display name of the region. Examples: United States, United Kingdom or Sweden.",
            "readOnly": true
          },
          "types": {
            "type": "array",
            "example": [
              "MOBILE"
            ],
            "items": {
              "$ref": "#/components/schemas/NumberType"
            },
            "description": "A list of the different number types available. Examples: `MOBILE` or `LOCAL`.",
            "readOnly": true
          }
        },
        "description": "A region for which numbers are provided.",
        "title": "Available Region"
      },
      "ListActiveNumbersResponse": {
        "type": "object",
        "properties": {
          "activeNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActiveNumberResponse"
            },
            "description": "List of numbers associated to the client project specified in `ListActiveNumbers`."
          },
          "nextPageToken": {
            "type": "string",
            "title": "The token to be used for listing the next page."
          },
          "totalSize": {
            "type": "integer",
            "format": "int32",
            "title": "The maximum number of results returned."
          }
        },
        "description": "Response message to list your active phone numbers.",
        "title": "Active Numbers Response"
      },
      "ListAvailableNumbersResponse": {
        "type": "object",
        "properties": {
          "availableNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailableNumber"
            },
            "description": "List of available phone numbers."
          }
        },
        "description": "Response message to list available phone numbers.",
        "title": "Available Numbers Response"
      },
      "ListAvailableRegionsResponse": {
        "type": "object",
        "properties": {
          "availableRegions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailableRegion"
            },
            "title": "List of regions for which numbers are provided."
          }
        },
        "description": "Response message to list regions for which numbers are provided.",
        "title": "List Available Regions Response"
      },
      "NumberCapability": {
        "type": "string",
        "enum": [
          "SMS",
          "VOICE"
        ],
        "x-enumDescriptions": {
          "SMS": "The SMS product can use the number.",
          "VOICE": "The Voice product can use the number."
        },
        "default": "SMS",
        "description": "The capabilities the phone number supports: SMS, Voice, or both",
        "title": "Capability"
      },
      "NumberPattern": {
        "type": "object",
        "properties": {
          "pattern": {
            "type": "string",
            "description": "Sequence of digits to search for."
          },
          "searchPattern": {
            "$ref": "#/components/schemas/NumberPatternSearchPattern"
          }
        },
        "title": "Search Pattern"
      },
      "RegionCode": {
        "type": "string",
        "example": "US",
        "description": "ISO 3166-1 alpha-2 country code of the phone number. Example: US, GB or SE.",
        "title": "Region Code",
        "nullable": false
      },
      "PhoneNumber": {
        "type": "string",
        "example": "+12025550134",
        "description": "The phone number in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format with leading `+`. Example `+12025550134`.",
        "title": "Phone Number"
      },
      "NumberType": {
        "type": "string",
        "enum": [
          "MOBILE",
          "LOCAL",
          "TOLL_FREE"
        ],
        "x-enumDescriptions": {
          "MOBILE": "Numbers that belong to a specific range.",
          "LOCAL": "Numbers that are assigned to a specific geographic region.",
          "TOLL_FREE": "Numbers that are free of charge for the calling party but billed for all arriving calls."
        },
        "default": "MOBILE",
        "description": "The number type.",
        "title": "Type"
      },
      "UploadStatus": {
        "default": "WAITING",
        "description": "The attachment upload status. It will be either `COMPLETED`, `WAITING` or `FAILED`.",
        "enum": [
          "COMPLETED",
          "WAITING",
          "FAILED"
        ],
        "x-enumDescriptions": {
          "WAITING": "Waiting for upload",
          "COMPLETED": "Upload completed",
          "FAILED": "Upload failed"
        },
        "title": "Upload Status"
      },
      "ProvisioningStatus": {
        "default": "WAITING",
        "description": "The provisioning status. It will be either `WAITING`, `IN_PROGRESS` or `FAILED`. If the provisioning fails, a reason for the failure will be provided. [See a full list of provisioning error descriptions]<(https://developers.sinch.com/docs/numbers/api-reference/error-codes/provisioning-errors) and troubleshooting recommendations.",
        "enum": [
          "PROVISIONING_STATUS_UNSPECIFIED",
          "WAITING",
          "IN_PROGRESS",
          "FAILED"
        ],
        "x-enumDescriptions": {
          "PROVISIONING_STATUS_UNSPECIFIED": "The status is currently unknown.",
          "WAITING": "Waiting for provisioning",
          "IN_PROGRESS": "Provisioning in progress",
          "FAILED": "Provisioning failed. See [provisioning error descriptions](https://developers.sinch.com/docs/numbers/api-reference/error-codes/provisioning-errors)"
        },
        "title": "Provisioning Status"
      },
      "RentNumberRequest": {
        "type": "object",
        "properties": {
          "smsConfiguration": {
            "$ref": "#/components/schemas/smsConfiguration"
          },
          "voiceConfiguration": {
            "$ref": "#/components/schemas/VoiceConfiguration"
          },
          "callbackUrl": {
            "type": "string",
            "description": "The callback URL to be called for a rented number's provisioning / deprovisioning operations."
          }
        },
        "description": "Request message for renting a phone number.",
        "title": "Rent Number Request"
      },
      "scheduledProvisioning": {
        "type": "object",
        "description": "Represents the ongoing or failed scheduled provisioning job. This field will be empty if the number was both successfully provisioned to the SMS platform and linked to the 10DLC campaign.",
        "properties": {
          "servicePlanId": {
            "type": "string",
            "description": "The SMS service plan that the scheduled provisioning job will configure with the number.",
            "readOnly": true
          },
          "campaignId": {
            "type": "string",
            "description": "TCR campaign ID that the scheduled provisioning job will configure with the number.",
            "readOnly": true
          },
          "status": {
            "$ref": "#/components/schemas/ProvisioningStatus"
          },
          "lastUpdatedTime": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the status was last updated.",
            "readOnly": true
          },
          "errorCodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmsErrorCode"
            },
            "readOnly": true
          }
        },
        "title": "Scheduled Provisioning"
      },
      "smsConfigurationBase": {
        "title": "Base SMS Configuration",
        "type": "object",
        "required": [
          "servicePlanId"
        ],
        "properties": {
          "servicePlanId": {
            "type": "string",
            "description": "The `servicePlanId` can be found in the [Sinch Customer Dashboard](https://dashboard.sinch.com/sms/api/rest). The service plan ID is what ties this number to the configured SMS service."
          },
          "campaignId": {
            "type": "string",
            "description": "Only for US phone numbers. This `campaignId` is required to send SMS traffic to US; click [here](https://community.sinch.com/t5/10DLC/What-is-10DLC/ta-p/7845) to read more about 10DLC A2P messaging. So, it is the current campaign ID for this number. The `campaignId` is found on your TCR platform."
          }
        }
      },
      "smsConfiguration": {
        "type": "object",
        "title": "SMS Configuration",
        "description": "The current SMS configuration for this number.\n\nOnce the `servicePlanId` is sent, it enters scheduled provisioning.\n\nThe status of scheduled provisioning will show under a `scheduledProvisioning` object if it's still running. Once processed successfully, the `servicePlanId` sent will appear directly under the `smsConfiguration` object.",
        "allOf": [
          {
            "$ref": "#/components/schemas/smsConfigurationBase"
          },
          {
            "type": "object",
            "properties": {
              "scheduledProvisioning": {
                "readOnly": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/scheduledProvisioning"
                  }
                ]
              }
            }
          }
        ]
      },
      "OrderSmsConfiguration": {
        "type": "object",
        "title": "KYC SMS Configuration",
        "description": "SMS Configuration for KYC numbers, containing the `servicePlanId` and `campaignId`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/smsConfigurationBase"
          }
        ]
      },
      "LookupNumberRequirementsRequest": {
        "type": "object",
        "properties": {
          "regionCode": {
            "$ref": "#/components/schemas/RegionCode"
          },
          "numberType": {
            "$ref": "#/components/schemas/NumberType"
          }
        }
      },
      "NumberRequirements": {
        "type": "object",
        "properties": {
          "fields": {
            "description": "Free-form JSON object of requirements.",
            "type": "object",
            "additionalProperties": true
          },
          "attachments": {
            "description": "List of attachments necessary to be uploaded as part of the KYC process",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequiredAttachment"
            }
          }
        }
      },
      "CreateNumberOrderRequestBase": {
        "type": "object",
        "description": "Create a number order",
        "properties": {
          "regionCode": {
            "$ref": "#/components/schemas/RegionCode"
          },
          "numberType": {
            "$ref": "#/components/schemas/NumberType"
          },
          "smsConfiguration": {
            "$ref": "#/components/schemas/OrderSmsConfiguration"
          },
          "voiceConfiguration": {
            "$ref": "#/components/schemas/OrderVoiceConfiguration"
          },
          "callbackUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "CreateNumberOrderRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CreateNumberOrderRequestBase"
          },
          {
            "oneOf": [
              {
                "type": "object",
                "description": "Create a number order using numberOrderOption",
                "properties": {
                  "numberOrderOption": {
                    "$ref": "#/components/schemas/CreateNumberOrderOption"
                  }
                },
                "required": [
                  "numberOrderOption"
                ]
              },
              {
                "type": "object",
                "description": "Create a number order using quantityOrderOption",
                "properties": {
                  "quantityOrderOption": {
                    "$ref": "#/components/schemas/CreateQuantityOrderOption"
                  }
                },
                "required": [
                  "quantityOrderOption"
                ]
              }
            ]
          }
        ]
      },
      "CreateNumberOrderOption": {
        "type": "object",
        "properties": {
          "phoneNumbers": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "phone numbers in E.164 format",
              "example": "+12311234567"
            }
          }
        }
      },
      "CreateQuantityOrderOption": {
        "type": "object",
        "properties": {
          "numberPattern": {
            "$ref": "#/components/schemas/NumberPattern"
          },
          "requestedQuantity": {
            "type": "integer",
            "format": "int32"
          },
          "sequential": {
            "type": "boolean"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NumberCapability"
            }
          }
        }
      },
      "NumberOrder": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "nullable": false
          },
          "idNumberOrder": {
            "type": "string",
            "nullable": false
          },
          "regionCode": {
            "$ref": "#/components/schemas/RegionCode"
          },
          "state": {
            "$ref": "#/components/schemas/NumberOrderState"
          },
          "numberType": {
            "$ref": "#/components/schemas/NumberType"
          },
          "orderNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderNumber"
            }
          },
          "smsConfiguration": {
            "$ref": "#/components/schemas/OrderSmsConfiguration"
          },
          "voiceConfiguration": {
            "$ref": "#/components/schemas/OrderVoiceConfiguration"
          },
          "expireTime": {
            "type": "string",
            "format": "date-time",
            "example": "2025-11-23T08:54:58.115Z",
            "nullable": true
          },
          "createTime": {
            "type": "string",
            "nullable": false,
            "format": "date-time"
          },
          "updateTime": {
            "type": "string",
            "nullable": false,
            "format": "date-time"
          }
        }
      },
      "NumberPrice": {
        "type": "object",
        "properties": {
          "setupPrice": {
            "$ref": "#/components/schemas/money"
          },
          "monthlyPrice": {
            "$ref": "#/components/schemas/money"
          },
          "paymentIntervalMonths": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "OrderNumber": {
        "type": "object",
        "properties": {
          "phoneNumber": {
            "$ref": "#/components/schemas/PhoneNumber"
          },
          "numberPrice": {
            "$ref": "#/components/schemas/NumberPrice"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NumberCapability"
            }
          }
        }
      },
      "UpdateNumberOrderRegistrationRequest": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Free-form JSON object representing registration data."
          }
        }
      },
      "Registration": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Free-form JSON object representing registration data."
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attachment"
            }
          }
        }
      },
      "RequiredAttachment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID  to be used when uploading the attachment for the registration via the \"Upload an attachment for a number order\" endpoint"
          },
          "description": {
            "type": "string",
            "description": "Details about the attachment to be provided"
          },
          "mandatory": {
            "type": "boolean",
            "description": "Indicates if this attachment's upload is mandatory when purchasing the phone number"
          },
          "template": {
            "type": "array",
            "description": "Template to be used for the file attachment",
            "items": {
              "$ref": "#/components/schemas/AttachmentTemplate"
            }
          },
          "title": {
            "type": "string",
            "description": "Title of the attachment to be provided"
          },
          "allowedMimeTypes": {
            "description": "Array of allowed mime types. If empty, no restrictions are applied.",
            "example": [
              "application/pdf",
              "application/pdf"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowedDocumentTypes": {
            "description": "Document types allowed for this attachment. If specified, the documentType field in the attachment must be one of the allowed types.",
            "example": [
              "Passport",
              "Driver's License"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AttachmentTemplate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Attachment template file name"
          },
          "url": {
            "type": "string",
            "description": "URL where the template can be downloaded from"
          }
        }
      },
      "Attachment": {
        "type": "object",
        "properties": {
          "attachmentId": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "createTime": {
            "type": "string",
            "description": "Timestamp string (RFC3339).",
            "format": "date-time"
          },
          "updateTime": {
            "type": "string",
            "description": "Timestamp string (RFC3339).",
            "format": "date-time"
          },
          "uploadStatus": {
            "$ref": "#/components/schemas/UploadStatus"
          },
          "documentType": {
            "type": "string"
          }
        }
      },
      "NumberOrderState": {
        "type": "string",
        "x-enumDescriptions": {
          "NUMBER_ORDER_STATE_UNSPECIFIED": "State not specified.",
          "CREATED": "Created state.",
          "EXPIRED": "Expired state.",
          "IN_REVIEW": "Order in review.",
          "BLOCKED": "Order blocked.",
          "REJECTED": "Order rejected.",
          "COMPLETED": "Order completed."
        },
        "enum": [
          "NUMBER_ORDER_STATE_UNSPECIFIED",
          "CREATED",
          "EXPIRED",
          "IN_REVIEW",
          "BLOCKED",
          "REJECTED",
          "COMPLETED"
        ],
        "description": "The state of the number order",
        "title": "Number Order State"
      },
      "SmsErrorCode": {
        "type": "string",
        "x-enumDescriptions": {
          "ERROR_CODE_UNSPECIFIED": "Code not specified.",
          "INTERNAL_ERROR": "Internal server error.",
          "SMS_PROVISIONING_FAILED": "Provisioning for SMS failed.",
          "CAMPAIGN_PROVISIONING_FAILED": "Provisioning for campaign failed.",
          "CAMPAIGN_NOT_AVAILABLE": "The specified campaign is not available.",
          "EXCEEDED_10DLC_LIMIT": "Exceeded the 10DLC limit.",
          "NUMBER_PROVISIONING_FAILED": "Failed to provision the number.",
          "PARTNER_SERVICE_UNAVAILABLE": "The third party service is unavailable.",
          "CAMPAIGN_PENDING_ACCEPTANCE": "The campaign is awaiting acceptance.",
          "MNO_SHARING_ERROR": "Sharing error.",
          "CAMPAIGN_EXPIRED": "The specific campaign has expired.",
          "CAMPAIGN_MNO_REJECTED": "The MNO for the campaign was rejected.",
          "CAMPAIGN_MNO_SUSPENDED": "The MNO for the campaign was suspended.",
          "CAMPAIGN_MNO_REVIEW": "The MNO for the campaign is under review.",
          "INSUFFICIENT_BALANCE": "The credit balance for the account is insufficient to cover the fees.",
          "MOCK_CAMPAIGN_NOT_ALLOWED": "Mock campaign is not permitted.",
          "TFN_NOT_ALLOWED": "The Toll-Free number is not allowed.",
          "INVALID_NNID": "The specified NNID is invalid."
        },
        "enum": [
          "ERROR_CODE_UNSPECIFIED",
          "INTERNAL_ERROR",
          "SMS_PROVISIONING_FAILED",
          "CAMPAIGN_PROVISIONING_FAILED",
          "CAMPAIGN_NOT_AVAILABLE",
          "EXCEEDED_10DLC_LIMIT",
          "NUMBER_PROVISIONING_FAILED",
          "PARTNER_SERVICE_UNAVAILABLE",
          "CAMPAIGN_PENDING_ACCEPTANCE",
          "MNO_SHARING_ERROR",
          "CAMPAIGN_EXPIRED",
          "CAMPAIGN_MNO_REJECTED",
          "CAMPAIGN_MNO_SUSPENDED",
          "CAMPAIGN_MNO_REVIEW",
          "INSUFFICIENT_BALANCE",
          "MOCK_CAMPAIGN_NOT_ALLOWED",
          "TFN_NOT_ALLOWED",
          "INVALID_NNID"
        ],
        "description": "The error codes that show the reason of failure of a scheduled provisioning",
        "title": "SMS Error Code"
      },
      "VoiceApplicationType": {
        "type": "string",
        "description": "The voice application type. Examples are RTC, EST, FAX",
        "x-enumDescriptions": {
          "RTC": "Voice [see documentation](https://developers.sinch.com/docs/voice)",
          "EST": "Elastic SIP Trunking [see documentation](https://developers.sinch.com/docs/est)",
          "FAX": "FAX application [see documentation](https://developers.sinch.com/docs/fax/overview)"
        },
        "enum": [
          "RTC",
          "EST",
          "FAX"
        ],
        "default": "RTC"
      },
      "VoiceConfigurationCommon": {
        "title": "Common VoiceConfiguration fields",
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/VoiceApplicationType"
          },
          "lastUpdatedTime": {
            "type": "string",
            "description": "Timestamp when the status was last updated.",
            "format": "date-time",
            "readOnly": true
          },
          "scheduledVoiceProvisioning": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ScheduledVoiceProvisioning"
              }
            ]
          }
        }
      },
      "VoiceTrunkId": {
        "type": "object",
        "properties": {
          "trunkId": {
            "type": "string",
            "description": "The trunk ID if the type is EST. The `trunkId` can be found in your [Sinch Customer Dashboard](https://dashboard.sinch.com/trunks/your-trunks)."
          }
        }
      },
      "VoiceServiceId": {
        "type": "object",
        "properties": {
          "serviceId": {
            "type": "string",
            "description": "The service ID if the type is FAX. The `serviceId` can be found in your [Sinch Customer Dashboard](https://dashboard.sinch.com/fax/services)."
          }
        }
      },
      "VoiceAppId": {
        "type": "object",
        "properties": {
          "appId": {
            "type": "string",
            "description": "Your app ID for the Voice API. The `appId` can be found in your [Sinch Customer Dashboard](https://dashboard.sinch.com/voice/apps)."
          }
        }
      },
      "VoiceConfigurationRTC": {
        "title": "RTC VoiceConfiguration",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoiceConfigurationCommon"
          },
          {
            "$ref": "#/components/schemas/VoiceAppId"
          }
        ]
      },
      "VoiceConfigurationEST": {
        "title": "EST VoiceConfiguration",
        "type": "object",
        "required": [
          "type"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/VoiceConfigurationCommon"
          },
          {
            "$ref": "#/components/schemas/VoiceTrunkId"
          }
        ]
      },
      "VoiceConfigurationFAX": {
        "title": "FAX VoiceConfiguration",
        "type": "object",
        "required": [
          "type"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/VoiceConfigurationCommon"
          },
          {
            "$ref": "#/components/schemas/VoiceServiceId"
          }
        ]
      },
      "VoiceConfiguration": {
        "title": "VoiceConfiguration",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoiceConfigurationRTC"
          },
          {
            "$ref": "#/components/schemas/VoiceConfigurationEST"
          },
          {
            "$ref": "#/components/schemas/VoiceConfigurationFAX"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "RTC": "#/components/schemas/VoiceConfigurationRTC",
            "EST": "#/components/schemas/VoiceConfigurationEST",
            "FAX": "#/components/schemas/VoiceConfigurationFAX"
          }
        },
        "description": "The current voice configuration for this number. During scheduled provisioning, the app ID, service ID, or trunk ID value may be empty in a response if it is still processing or if it has failed. The status of scheduled provisioning will show under a `scheduledVoiceProvisioning` object if it's still running. Once processed successfully, the `appId`/`serviceId`/`trunkId` sent will appear directly under the `voiceConfiguration` object."
      },
      "OrderVoiceConfigurationBase": {
        "title": "OrderVoiceConfigurationBase",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "$ref": "#/components/schemas/VoiceApplicationType"
          }
        }
      },
      "OrderVoiceConfigurationRTC": {
        "title": "OrderVoiceConfigurationRTC",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderVoiceConfigurationBase"
          },
          {
            "$ref": "#/components/schemas/VoiceAppId"
          }
        ]
      },
      "OrderVoiceConfigurationEST": {
        "title": "OrderVoiceConfigurationEST",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderVoiceConfigurationBase"
          },
          {
            "$ref": "#/components/schemas/VoiceConfigurationEST"
          }
        ]
      },
      "OrderVoiceConfigurationFAX": {
        "title": "OrderVoiceConfigurationFAX",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderVoiceConfigurationBase"
          },
          {
            "$ref": "#/components/schemas/VoiceConfigurationFAX"
          }
        ]
      },
      "OrderVoiceConfiguration": {
        "title": "OrderVoiceConfiguration",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/OrderVoiceConfigurationRTC"
          },
          {
            "$ref": "#/components/schemas/OrderVoiceConfigurationEST"
          },
          {
            "$ref": "#/components/schemas/OrderVoiceConfigurationFAX"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "RTC": "#/components/schemas/OrderVoiceConfigurationRTC",
            "EST": "#/components/schemas/OrderVoiceConfigurationEST",
            "FAX": "#/components/schemas/OrderVoiceConfigurationFAX"
          }
        }
      },
      "ScheduledVoiceProvisioningCommon": {
        "type": "object",
        "required": [
          "type"
        ],
        "allOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "$ref": "#/components/schemas/VoiceApplicationType"
              },
              "lastUpdatedTime": {
                "type": "string",
                "description": "Timestamp when the status was last updated.",
                "format": "date-time",
                "readOnly": true
              },
              "status": {
                "$ref": "#/components/schemas/ProvisioningStatus"
              }
            }
          }
        ]
      },
      "ScheduledVoiceProvisioningEST": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ScheduledVoiceProvisioningCommon"
          },
          {
            "$ref": "#/components/schemas/VoiceTrunkId"
          }
        ]
      },
      "ScheduledVoiceProvisioningFAX": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ScheduledVoiceProvisioningCommon"
          },
          {
            "$ref": "#/components/schemas/VoiceServiceId"
          }
        ]
      },
      "ScheduledVoiceProvisioningRTC": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ScheduledVoiceProvisioningCommon"
          },
          {
            "$ref": "#/components/schemas/VoiceAppId"
          }
        ]
      },
      "ScheduledVoiceProvisioning": {
        "type": "object",
        "readOnly": true,
        "description": "Represents the ongoing or failed scheduled voice provisioning job. This field will be empty if the number was successfully provisioned provisioned for voice.",
        "required": [
          "type"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/ScheduledVoiceProvisioningEST"
          },
          {
            "$ref": "#/components/schemas/ScheduledVoiceProvisioningFAX"
          },
          {
            "$ref": "#/components/schemas/ScheduledVoiceProvisioningRTC"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "EST": "#/components/schemas/ScheduledVoiceProvisioningEST",
            "FAX": "#/components/schemas/ScheduledVoiceProvisioningFAX",
            "RTC": "#/components/schemas/ScheduledVoiceProvisioningRTC"
          }
        },
        "title": "Scheduled Voice Provisioning"
      },
      "CallbackConfiguration": {
        "description": "Response message containing the callbacks configuration for a specific project.",
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "description": "ID of the project the configuration belongs to.",
            "example": "a99aa9aa-b888-777c-dd6d-ee55e5555555"
          },
          "hmacSecret": {
            "type": "string",
            "description": "The HMAC secret used for hashing the callback body using the HMAC-SHA1 algorithm - and for creating the `X-Sinch-Signature` header.",
            "example": "YOUR_hmac_secret"
          }
        }
      },
      "CallbackConfigurationUpdate": {
        "title": "CallbackConfigurationUpdate",
        "type": "object",
        "properties": {
          "hmacSecret": {
            "type": "string",
            "description": "The HMAC secret to be updated for the specified project"
          }
        },
        "description": "The request to update the callbacks configuration for the current project."
      },
      "CallbackPayload": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "description": "The ID of the event.",
            "example": "abcd1234efghijklmnop567890"
          },
          "timestamp": {
            "type": "string",
            "description": "The date and time when the callback was created and added to the callbacks queue.",
            "example": "2023-06-06T07:45:27.785357"
          },
          "projectId": {
            "type": "string",
            "description": "The ID of the project to which the event belongs.",
            "example": "abcd12ef-ab12-ab12-bc34-abcdef123456"
          },
          "resourceId": {
            "type": "string",
            "description": "The unique identifier of the resource, depending on the resource type. For example, a phone number, a hosting order ID, or a brand ID.",
            "example": "+12345612345"
          },
          "resourceType": {
            "$ref": "#/components/schemas/ResourceType"
          },
          "eventType": {
            "type": "string",
            "description": "The type of the event.",
            "enum": [
              "PROVISIONING_TO_SMS_PLATFORM",
              "DEPROVISIONING_FROM_SMS_PLATFORM",
              "PROVISIONING_TO_CAMPAIGN",
              "DEPROVISIONING_FROM_CAMPAIGN",
              "PROVISIONING_TO_VOICE_PLATFORM",
              "DEPROVISIONING_TO_VOICE_PLATFORM"
            ],
            "x-enumDescriptions": {
              "PROVISIONING_TO_SMS_PLATFORM": "An event that occurs when a number is linked to a Service Plan ID.",
              "DEPROVISIONING_FROM_SMS_PLATFORM": "An event that occurs when a number is unlinked from a Service Plan ID.",
              "PROVISIONING_TO_CAMPAIGN": "An event that occurs when a number is linked to a Campaign.",
              "DEPROVISIONING_FROM_CAMPAIGN": "An event that occurs when a number is unlinked from a Campaign.",
              "PROVISIONING_TO_VOICE_PLATFORM": "An event that occurs when a number is enabled for Voice operations.",
              "DEPROVISIONING_TO_VOICE_PLATFORM": "An event that occurs when a number is disabled for Voice operations."
            },
            "example": "PROVISIONING_TO_CAMPAIGN"
          },
          "status": {
            "type": "string",
            "description": "The status of the event. For example, `SUCCEEDED` or `FAILED`.",
            "x-enumDescriptions": {
              "SUCCEEDED": "The event has succeeded.",
              "FAILED": "The event has failed."
            },
            "enum": [
              "SUCCEEDED",
              "FAILED"
            ],
            "example": "FAILED"
          },
          "failureCode": {
            "type": "string",
            "description": "If the status is FAILED, a failure code will be provided. For numbers provisioning to SMS platform, there won't be any extra `failureCode`, as the result is binary. For campaign provisioning-related failures, refer to the list for the possible values.",
            "example": "CAMPAIGN_NOT_AVAILABLE",
            "enum": [
              "CAMPAIGN_NOT_AVAILABLE",
              "EXCEEDED_10DLC_LIMIT",
              "NUMBER_PROVISIONING_FAILED",
              "PARTNER_SERVICE_UNAVAILABLE",
              "CAMPAIGN_PENDING_ACCEPTANCE",
              "MNO_SHARING_ERROR",
              "CAMPAIGN_PROVISIONING_FAILED",
              "CAMPAIGN_EXPIRED",
              "CAMPAIGN_MNO_REJECTED",
              "CAMPAIGN_MNO_SUSPENDED",
              "CAMPAIGN_MNO_REVIEW",
              "INSUFFICIENT_BALANCE",
              "MOCK_CAMPAIGN_NOT_ALLOWED",
              "TFN_NOT_ALLOWED",
              "INVALID_NNID"
            ],
            "x-enumDescriptions": {
              "CAMPAIGN_NOT_AVAILABLE": "The specified campaign is not available.",
              "EXCEEDED_10DLC_LIMIT": "Exceeded the limit for 10DLC.",
              "NUMBER_PROVISIONING_FAILED": "Provisioning the number failed.",
              "PARTNER_SERVICE_UNAVAILABLE": "The third party service is unavailable.",
              "CAMPAIGN_PENDING_ACCEPTANCE": "The campaign is not yet accepted.",
              "MNO_SHARING_ERROR": "Error with MNO.",
              "CAMPAIGN_PROVISIONING_FAILED": "The campaign failed to provision.",
              "CAMPAIGN_EXPIRED": "The campaign expired.",
              "CAMPAIGN_MNO_REJECTED": "The campaign MNO was rejected.",
              "CAMPAIGN_MNO_SUSPENDED": "The campaign MNO was suspended.",
              "CAMPAIGN_MNO_REVIEW": "The campaign MNO is under review.",
              "INSUFFICIENT_BALANCE": "Not enough credit in the account.",
              "MOCK_CAMPAIGN_NOT_ALLOWED": "Provisioning not allowed for mock campaigns.",
              "TFN_NOT_ALLOWED": "Toll free numbers not allowed.",
              "INVALID_NNID": "Invalid NNID."
            }
          }
        }
      },
      "InvalidArgument": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer",
                "enum": [
                  400
                ],
                "x-enumDescriptions": {
                  "400": "The HTTP status code for invalid arguments."
                }
              },
              "message": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "INVALID_ARGUMENT"
                ],
                "x-enumDescriptions": {
                  "INVALID_ARGUMENT": "The request contained invalid arguments."
                }
              },
              "details": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          }
        }
      },
      "BadRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "BadRequest"
            ],
            "x-enumDescriptions": {
              "BadRequest": "The request was malformed in some way."
            }
          },
          "fieldViolations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldViolation"
            }
          }
        }
      },
      "FieldViolation": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "NotFoundErrorDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "resourceType": {
            "type": "string",
            "description": "The type of the resource that was not found."
          },
          "resourceName": {
            "type": "string",
            "description": "The name of the resource that was not found."
          },
          "owner": {
            "type": "string",
            "description": "The owner of the resource that was not found."
          },
          "description": {
            "type": "string",
            "description": "A description of the error."
          }
        }
      },
      "RequestEntityTooLargeErrorDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "resourceName": {
            "type": "string",
            "description": "The name of the resource that exceeded the expected size limit."
          },
          "description": {
            "type": "string",
            "description": "A description of the error."
          }
        }
      },
      "NotFound": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer",
                "enum": [
                  404
                ],
                "x-enumDescriptions": {
                  "404": "The HTTP status code for a resource not found."
                }
              },
              "message": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "NOT_FOUND"
                ],
                "x-enumDescriptions": {
                  "NOT_FOUND": "The request resource could not be found."
                }
              },
              "details": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NotFoundErrorDetails"
                }
              }
            }
          }
        }
      },
      "RequestEntityTooLarge": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer",
                "enum": [
                  413
                ],
                "x-enumDescriptions": {
                  "413": "The HTTP status code for entity too large."
                }
              },
              "message": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "CONTENT_TOO_LARGE"
                ],
                "x-enumDescriptions": {
                  "CONTENT_TOO_LARGE": "The request content is too large."
                }
              },
              "details": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RequestEntityTooLargeErrorDetails"
                }
              }
            }
          }
        }
      },
      "InternalError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer",
                "enum": [
                  500
                ],
                "x-enumDescriptions": {
                  "500": "The HTTP status code for an internal server error."
                }
              },
              "message": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "INTERNAL",
                  "UNKNOWN"
                ],
                "x-enumDescriptions": {
                  "INTERNAL": "An internal server error.",
                  "UNKNOWN": "Some unknown error."
                }
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "EmergencyAddress": {
        "type": "object",
        "description": "Details of the emergency address.",
        "title": "Emergency Address",
        "properties": {
          "streetNumber": {
            "type": "string",
            "description": "The street number for the emergency address.",
            "example": "12345"
          },
          "streetInfo": {
            "type": "string",
            "description": "The street name of the emergency location.",
            "example": "Main St"
          },
          "location": {
            "type": "string",
            "description": "The location for address.",
            "example": "Apt 5"
          },
          "city": {
            "type": "string",
            "description": "The city of the emergency location.",
            "example": "Springfield"
          },
          "state": {
            "type": "string",
            "description": "The state or province of the emergency location.",
            "example": "IL"
          },
          "postalCode": {
            "type": "string",
            "description": "The postal code of the emergency location.",
            "example": "62701"
          },
          "postalCodePlusFour": {
            "type": "string",
            "description": "The postal code of the emergency location.",
            "example": "1234"
          }
        }
      },
      "ValidateAddressResponse": {
        "type": "object",
        "description": "Response object containing details of the emergency address.",
        "title": "Validate Emergency Address Response",
        "properties": {
          "phoneNumber": {
            "$ref": "#/components/schemas/PhoneNumber"
          },
          "displayName": {
            "type": "string",
            "description": "User supplied name for the phone number.",
            "example": "User Name"
          },
          "validatedAddress": {
            "$ref": "#/components/schemas/EmergencyAddress"
          },
          "validationResult": {
            "$ref": "#/components/schemas/AddressValidationResultCode"
          },
          "validationMessage": {
            "type": "string",
            "description": "Validation result message",
            "example": "Corrected to valid address"
          },
          "correctedAddress": {
            "$ref": "#/components/schemas/EmergencyAddress"
          },
          "candidateAddresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmergencyAddress"
            },
            "description": "List of candidate addresses (only available if validationResult == NO_MATCH)"
          }
        }
      },
      "EmergencyAddressRequest": {
        "type": "object",
        "description": "Request for emergency address.",
        "title": "Emergency Address Request",
        "required": [
          "displayName",
          "address"
        ],
        "properties": {
          "displayName": {
            "type": "string",
            "description": "Name for emergency address.",
            "example": "New emergency address"
          },
          "address": {
            "required": [
              "streetNumber",
              "streetInfo",
              "city",
              "state",
              "postalCode"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/EmergencyAddress"
              }
            ]
          }
        }
      },
      "AddressValidationResultCode": {
        "type": "string",
        "enum": [
          "ADDRESS_VALIDATION_RESULT_CODE_UNSPECIFIED",
          "EXACT_MATCH",
          "NEAR_MATCH",
          "NO_MATCH"
        ],
        "description": "Enum representing the result of address validation.",
        "x-enumDescriptions": {
          "ADDRESS_VALIDATION_RESULT_CODE_UNSPECIFIED": "Undetermined Result",
          "EXACT_MATCH": "The address is perfect as sent",
          "NEAR_MATCH": "The result was a close enough match and has been corrected",
          "NO_MATCH": "The result is not close enough"
        }
      },
      "ResourceType": {
        "type": "string",
        "description": "The type of the resource.",
        "x-enumDescriptions": {
          "ACTIVE_NUMBER": "Numbers which are already active and updated with new campaign IDs or service plan IDs."
        },
        "example": "ACTIVE_NUMBER",
        "enum": [
          "ACTIVE_NUMBER"
        ]
      }
    },
    "securitySchemes": {
      "Basic": {
        "type": "http",
        "scheme": "basic",
        "description": "Your key ID and Key secret serve as the username and password, respectively. Both can be found in the [Sinch Customer Dashboard](https://dashboard.sinch.com/settings/access-keys). For more information about basic authentication in the Numbers API, click [here](https://developers.sinch.com/docs/numbers/api-reference/authentication/basic)."
      },
      "OAuth2.0": {
        "type": "oauth2",
        "description": "The username and password are your Key ID and Key Secret from the [Access keys section](https://dashboard.sinch.com/settings/access-keys) in the Sinch Customer Dashboard. Exchange these for a bearer token (access token). Learn how [here](https://developers.sinch.com/docs/numbers/api-reference/authentication/oauth).",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://auth.sinch.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  }
}