fetchAvailablePhoneNumberCountry
Country codes with available phone numbers
Details
- Method:
GET - Path:
/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json - Operation ID:
FetchAvailablePhoneNumberCountry
Parameters
{
"AccountSid": {
"description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resource.",
"required": true,
"location": "path",
"type": "string"
},
"CountryCode": {
"description": "The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country to fetch available phone number information about.",
"required": true,
"location": "path",
"type": "string",
"format": "iso-country-code"
}
}Response Schema
{
"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`."
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('twilio')
# Call this tool
result = await agent.call_tool('fetchAvailablePhoneNumberCountry', {
# Add required parameters here
})