Open Context Protocol is live! 🚀 Read the launch post
listAvailablePhoneNumberCountry

listAvailablePhoneNumberCountry

Country codes with available phone numbers

Details

  • Method: GET
  • Path: /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json
  • Operation ID: ListAvailablePhoneNumberCountry

Parameters

{
  "AccountSid": {
    "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resources.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "PageSize": {
    "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int64"
  },
  "Page": {
    "description": "The page index. This value is simply for client state.",
    "required": false,
    "location": "query",
    "type": "integer"
  },
  "PageToken": {
    "description": "The page token. This is provided by the API.",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "title": "ListAvailablePhoneNumberCountryResponse",
  "type": "object",
  "properties": {
    "countries": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "country_code": {
            "type": "string",
            "format": "iso-country-code",
            "nullable": true,
            "description": "The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country."
          },
          "country": {
            "type": "string",
            "nullable": true,
            "description": "The name of the country."
          },
          "uri": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "The URI of the Country resource, relative to `https://api.twilio.com`."
          },
          "beta": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether all phone numbers available in the country are new to the Twilio platform. `true` if they are and `false` if all numbers are not in the Twilio Phone Number Beta program."
          },
          "subresource_uris": {
            "type": "object",
            "format": "uri-map",
            "nullable": true,
            "description": "A list of related AvailablePhoneNumber resources identified by their URIs relative to `https://api.twilio.com`."
          }
        }
      }
    },
    "uri": {
      "type": "string",
      "format": "uri",
      "nullable": true
    }
  }
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('twilio')

# Call this tool
result = await agent.call_tool('listAvailablePhoneNumberCountry', {
    # Add required parameters here
})