Twilio
Text messages and calls. Send and read messages, place and control calls, manage conferences and recordings, and buy numbers.
| Property | Value |
|---|---|
| Slug | twilio |
| Definition version | 0.2.0 |
| Base URL | https://api.twilio.com/2010-04-01 |
| Auth schemes | api_key |
| Action tools | 34 |
| By class | 16 read, 9 write, 9 destructive |
| Triggers | 0 |
| Provider rate limit | not declared, so outbound calls are unpaced |
Measured routing accuracy
80 golden cases replayed through the router over the whole index: measured over corpus ea4f12ad2948 (65 toolkits, 2283 tools indexed and 13 declared uncallable), 34 cases written by hand and 46 cases from the paraphrase pass. A case counts as top-1 when its gold tool ranked first and top-8 when it reached the slate at all.
| Measure | Cases | Share |
|---|---|---|
| top-1 | 45/80 | 56.2% |
| top-8 | 60/80 | 75.0% |
The sweep is offline: the reranker is a deterministic identity fake that returns candidates in the order retrieval produced them, so top-1 measures retrieval order rather than a reranked slate. just eval-live measures the same cases through the live reranker.
Authentication
Connect an entity with ConnectionsService.InitiateConnection, naming this toolkit's slug. Credentials stay in the connections vault; callers hold connected-account ids only.
api_key
| Property | Value |
|---|---|
| Placement | header |
| Name | Authorization |
| Rendered as | Basic {key} |
Submit the key with ConnectionsService rather than putting it in a request; it is sealed at rest and never returned.
Tools
34 action tools. The catalog-wide slug is twilio.<tool>, which is what search_tools returns and call_tool takes.
twilio.send_message
Send a text message to a phone number, as SMS or, with a media url attached, MMS. Use when the user wants to text, message, or notify someone by SMS, or send a picture or file to a phone number. Requires the Twilio number to send from and the recipient's number.
Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /Accounts/{{params.account_sid}}/Messages.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the number belongs to, e.g. "ACxxxx". |
body | string | yes | The message text. |
from | string | yes | Twilio phone number to send from, in E.164 form, e.g. "+15015551234". |
media_url | array of string | no | Optional URLs of images or files to attach as MMS. |
status_callback | string | no | Optional URL Twilio posts delivery status updates to. |
to | string | yes | Recipient's phone number in E.164 form, e.g. "+15558675310". |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
account_sid | string | |
body | string | |
date_created | string | |
direction | string | |
from | string | |
num_media | string | |
price | string | |
price_unit | string | |
sid | string | |
status | string | |
to | string |
Also retrieved by: "text this customer that their order shipped", "shoot someone a quick sms", "notify a phone number by text", "send a picture to someone's phone", "fire off a text reminder", "ping a customer with an sms alert".
twilio.get_message
Get one text message's delivery status, body, and cost by its message id. Use when the user asks about a specific text they sent or received. For browsing or searching many messages, use list_messages.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/Messages/{{params.message_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the message belongs to. |
message_sid | string | yes | Message SID, e.g. "SMxxxx". |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
body | string | |
date_created | string | |
date_sent | string | |
direction | string | |
error_code | string | |
error_message | string | |
from | string | |
num_media | string | |
price | string | |
price_unit | string | |
sid | string | |
status | string | |
to | string |
Also retrieved by: "did that text actually go through", "check the delivery status of a specific text", "what happened to the sms I sent this morning", "pull up details on one particular text".
twilio.list_messages
List text messages sent or received on this account, optionally filtered by recipient, sender, or date. Use when the user wants message history, recent texts, or to find a conversation with someone.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/Messages.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID to list messages for. |
date_sent | string | no | Optional filter, messages sent on this date (YYYY-MM-DD). |
from | string | no | Optional filter, only messages sent from this number. |
page_size | integer | no | Optional max number of messages to return. |
to | string | no | Optional filter, only messages sent to this number. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
messages | array of object | |
messages[].body | string | |
messages[].date_sent | string | |
messages[].direction | string | |
messages[].from | string | |
messages[].num_media | string | |
messages[].sid | string | |
messages[].status | string | |
messages[].to | string |
Also retrieved by: "show me our recent sms history", "find every text we've exchanged with a customer", "what have we texted this number lately", "search past conversations by phone number".
twilio.redact_message
Erase the text body of a past message while keeping its delivery record. Use when the user wants to redact, scrub, or clear the content of a message for compliance, without deleting the message entirely. To remove the record itself, use delete_message.
Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /Accounts/{{params.account_sid}}/Messages/{{params.message_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the message belongs to. |
message_sid | string | yes | Message SID to redact. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
body | string | |
date_updated | string | |
sid | string | |
status | string |
Also retrieved by: "scrub the content out of an old text for compliance", "clear the wording on a message but keep the record", "blank out what a text said, don't delete it", "wipe the sensitive text but keep the audit trail".
twilio.delete_message
Permanently delete a text message's record from the account. Use when the user wants to remove, wipe, or erase a message entirely, not just clear its text. Irreversible once deleted.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls DELETE /Accounts/{{params.account_sid}}/Messages/{{params.message_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the message belongs to. |
message_sid | string | yes | Message SID to delete. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
deleted | boolean |
Also retrieved by: "get rid of a text entirely", "wipe an sms out of our records for good", "erase a message record completely", "remove that text from the account permanently".
twilio.list_message_media
List the media attachments, such as photos or files, on an MMS message. Use when the user asks what pictures, images, or files were sent or received in a text message.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/Messages/{{params.message_sid}}/Media.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the message belongs to. |
message_sid | string | yes | Message SID whose attachments to list. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
media | array of object | |
media[].content_type | string | |
media[].sid | string | |
media[].uri | string |
Also retrieved by: "what pictures came in on that text", "show me the attachments on an mms", "see what files were sent in a message", "list photos attached to a text".
twilio.delete_message_media
Permanently delete one media attachment from an MMS message. Use when the user wants to remove, erase, or purge a specific photo or file sent in a text, without deleting the whole message. Irreversible.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls DELETE /Accounts/{{params.account_sid}}/Messages/{{params.message_sid}}/Media/{{params.media_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the message belongs to. |
media_sid | string | yes | Media SID to delete, e.g. "MExxxx". |
message_sid | string | yes | Message SID the attachment belongs to. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
deleted | boolean |
Also retrieved by: "remove one picture from that mms", "erase a specific attachment from a text", "get rid of one file sent in a message".
twilio.create_call
Place an outbound phone call and connect it to instructions served from a url. Use when the user wants to call, dial, ring, or phone someone programmatically. Requires the number to call, the Twilio number to call from, and a url serving the call's instructions.
Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /Accounts/{{params.account_sid}}/Calls.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the call is placed under. |
from | string | yes | Twilio phone number to call from, in E.164 form. |
record | boolean | no | Optional, whether to record the call. |
status_callback | string | no | Optional URL Twilio posts call status changes to. |
timeout | integer | no | Optional seconds to let the call ring before giving up. |
to | string | yes | Phone number to call, in E.164 form. |
url | string | yes | URL that returns the TwiML instructions for the call. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
date_created | string | |
direction | string | |
from | string | |
price | string | |
price_unit | string | |
sid | string | |
status | string | |
to | string |
Also retrieved by: "dial this customer right now", "place an outbound call to a number", "ring someone programmatically", "phone a contact and play them a script", "connect an automated call to a lead".
twilio.get_call
Get one phone call's status, duration, and cost by its call id. Use when the user asks about a specific call's outcome. For browsing recent calls, use list_calls.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/Calls/{{params.call_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the call belongs to. |
call_sid | string | yes | Call SID, e.g. "CAxxxx". |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
direction | string | |
duration | string | |
end_time | string | |
from | string | |
price | string | |
price_unit | string | |
sid | string | |
start_time | string | |
status | string | |
to | string |
Also retrieved by: "how long did that phone call last", "check whether a call connected or failed", "look up details on one specific call".
twilio.list_calls
List phone calls made or received on this account, optionally filtered by number, status, or start date. Use when the user wants call history or recent call activity.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/Calls.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID to list calls for. |
from | string | no | Optional filter, only calls from this number. |
page_size | integer | no | Optional max number of calls to return. |
status | string, one of queued, ringing, in-progress, completed, busy, failed, no-answer, canceled | no | Optional filter by call status. |
to | string | no | Optional filter, only calls to this number. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
calls | array of object | |
calls[].direction | string | |
calls[].duration | string | |
calls[].from | string | |
calls[].sid | string | |
calls[].start_time | string | |
calls[].status | string | |
calls[].to | string |
Also retrieved by: "show recent call activity on this line", "what calls came in yesterday", "pull up our calling history", "find every call to a certain number".
twilio.redirect_call
Redirect a call already in progress to new instructions, changing what happens next on the call. Use when the user wants to reroute, transfer, or change the flow of a live call without ending it. To hang up entirely, use end_call.
Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /Accounts/{{params.account_sid}}/Calls/{{params.call_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the call belongs to. |
call_sid | string | yes | Call SID to redirect. |
url | string | yes | URL returning the new TwiML instructions. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
sid | string | |
status | string |
Also retrieved by: "send a live call to different instructions", "reroute an ongoing call somewhere else", "transfer a call in progress to a new flow", "change what happens next on an active call".
twilio.end_call
Hang up a call that is currently ringing or in progress. Use when the user wants to end, hang up, stop, or disconnect a live call right now. Does not delete the call's record; use delete_call_record for that.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls POST /Accounts/{{params.account_sid}}/Calls/{{params.call_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the call belongs to. |
call_sid | string | yes | Call SID to hang up. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
sid | string | |
status | string |
Also retrieved by: "hang up on this call right now", "cut off a call that's in progress", "disconnect the person currently on the line", "stop an ongoing phone call immediately".
twilio.delete_call_record
Permanently delete a completed call's record from the account, including its detail and cost history. Use when the user wants to remove or purge a call record entirely, not stop a live call. Irreversible.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls DELETE /Accounts/{{params.account_sid}}/Calls/{{params.call_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the call belongs to. |
call_sid | string | yes | Call SID to delete. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
deleted | boolean |
Also retrieved by: "purge the history of a completed call", "wipe a call's record out of the account", "remove the log of a past call entirely".
twilio.list_recordings
List call recordings on this account, optionally filtered to one call. Use when the user wants to find, browse, or review recorded calls.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/Recordings.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID to list recordings for. |
call_sid | string | no | Optional filter, only recordings from this call. |
page_size | integer | no | Optional max number of recordings to return. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
recordings | array of object | |
recordings[].call_sid | string | |
recordings[].channels | integer | |
recordings[].date_created | string | |
recordings[].duration | string | |
recordings[].sid | string | |
recordings[].status | string |
Also retrieved by: "show me recorded calls for this line", "find the audio recording of a call", "browse past call recordings".
twilio.get_recording
Get one call recording's duration, status, and playback details by its recording id. Use when the user names a specific recording. For finding recordings, use list_recordings.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/Recordings/{{params.recording_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the recording belongs to. |
recording_sid | string | yes | Recording SID, e.g. "RExxxx". |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
call_sid | string | |
channels | integer | |
conference_sid | string | |
date_created | string | |
duration | string | |
sid | string | |
status | string | |
uri | string |
Also retrieved by: "pull up one specific recorded call", "check how long a recording is", "get playback details for a saved call".
twilio.delete_recording
Permanently delete a call recording, including its audio file. Use when the user wants to remove, erase, or purge a recorded call. Irreversible.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls DELETE /Accounts/{{params.account_sid}}/Recordings/{{params.recording_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the recording belongs to. |
recording_sid | string | yes | Recording SID to delete. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
deleted | boolean |
Also retrieved by: "erase a recorded call's audio for good", "get rid of a saved call recording", "purge one recording from the account".
twilio.list_conferences
List conference calls on this account, optionally filtered by status or name. Use when the user wants to find an active or past conference call.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/Conferences.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID to list conferences for. |
friendly_name | string | no | Optional filter by the conference's friendly name. |
page_size | integer | no | Optional max number of conferences to return. |
status | string, one of init, in-progress, completed | no | Optional filter by conference status. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
conferences | array of object | |
conferences[].date_created | string | |
conferences[].friendly_name | string | |
conferences[].region | string | |
conferences[].sid | string | |
conferences[].status | string |
Also retrieved by: "find an active conference call", "show me past conference calls", "which conference bridges are running right now".
twilio.get_conference
Get one conference call's status and details by its conference id. Use when the user names a specific conference. For finding one, use list_conferences.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/Conferences/{{params.conference_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the conference belongs to. |
conference_sid | string | yes | Conference SID, e.g. "CFxxxx". |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
date_created | string | |
friendly_name | string | |
region | string | |
sid | string | |
status | string |
Also retrieved by: "check the status of a specific conference call", "look up details on one conference bridge", "what's happening on this particular call bridge".
twilio.end_conference
End a conference call in progress for every participant on it. Use when the user wants to close, end, or terminate an active conference call right now. Irreversible for that call.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls POST /Accounts/{{params.account_sid}}/Conferences/{{params.conference_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the conference belongs to. |
conference_sid | string | yes | Conference SID to end. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
sid | string | |
status | string |
Also retrieved by: "shut down a conference call for everyone", "terminate an active conference bridge", "close out a call with several people on it".
twilio.list_conference_participants
List who is currently on a conference call. Use when the user asks who's on the call, how many people joined, or wants to check hold or mute state for a conference.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/Conferences/{{params.conference_sid}}/Participants.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the conference belongs to. |
conference_sid | string | yes | Conference SID to list participants for. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
participants | array of object | |
participants[].call_sid | string | |
participants[].hold | boolean | |
participants[].label | string | |
participants[].muted | boolean | |
participants[].status | string |
Also retrieved by: "who's currently on this conference call", "how many people joined the bridge", "check who's muted or on hold in the conference".
twilio.add_conference_participant
Dial a phone number into a live conference call. Use when the user wants to add, invite, loop in, or bring someone into an ongoing conference. Requires the conference id, the number to call, and the Twilio number to call from.
Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /Accounts/{{params.account_sid}}/Conferences/{{params.conference_sid}}/Participants.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the conference belongs to. |
conference_sid | string | yes | Conference SID to dial the participant into. |
from | string | yes | Twilio phone number to call from, in E.164 form. |
muted | boolean | no | Optional, whether to join this participant muted. |
start_conference_on_enter | boolean | no | Optional, whether the conference starts once this participant joins. |
to | string | yes | Phone number to dial into the conference, in E.164 form. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
call_sid | string | |
hold | boolean | |
muted | boolean | |
status | string |
Also retrieved by: "dial someone into an ongoing conference", "loop another person into the call bridge", "invite a number onto a live conference", "bring a new caller into the meeting".
twilio.update_conference_participant
Mute, unmute, hold, or resume one participant already on a conference call. Use when the user wants to silence, mute, put on hold, or bring back a specific person on the call, without removing them. To remove someone, use remove_conference_participant.
Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /Accounts/{{params.account_sid}}/Conferences/{{params.conference_sid}}/Participants/{{params.call_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the conference belongs to. |
call_sid | string | yes | Call SID identifying the participant to update. |
conference_sid | string | yes | Conference SID the participant is on. |
hold | boolean | no | Optional, set true to hold or false to resume. |
muted | boolean | no | Optional, set true to mute or false to unmute. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
call_sid | string | |
hold | boolean | |
muted | boolean | |
status | string |
Also retrieved by: "mute one person on the conference call", "put a specific caller on hold", "unmute someone on the bridge", "bring a caller back off hold".
twilio.remove_conference_participant
Remove one participant from a live conference call, disconnecting only them. Use when the user wants to kick, drop, remove, or disconnect a specific person from a conference without ending the call for everyone else.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls DELETE /Accounts/{{params.account_sid}}/Conferences/{{params.conference_sid}}/Participants/{{params.call_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the conference belongs to. |
call_sid | string | yes | Call SID identifying the participant to remove. |
conference_sid | string | yes | Conference SID the participant is on. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
deleted | boolean |
Also retrieved by: "kick someone off the conference call", "drop a specific caller from the bridge", "disconnect just one person, leave the rest on".
twilio.search_available_phone_numbers
Search for phone numbers available to purchase in a country, filtered by number type. Use when the user wants to find, browse, or shop for a new phone number, local, toll-free, or mobile. Does not buy anything; use purchase_phone_number for that.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/AvailablePhoneNumbers/{{params.iso_country}}/{{params.number_type}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID to search under. |
area_code | string | no | Optional area code to narrow the search. |
contains | string | no | Optional digit pattern the number must contain. |
iso_country | string | yes | Two-letter country code to search, e.g. "US". |
number_type | string, one of Local, TollFree, Mobile | yes | Kind of number to search for. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
numbers | array of object | |
numbers[].friendly_name | string | |
numbers[].iso_country | string | |
numbers[].locality | string | |
numbers[].phone_number | string | |
numbers[].region | string |
Also retrieved by: "find a new number to buy in a certain area code", "shop for a toll-free number", "browse available local numbers in a country", "look for a phone number containing certain digits".
twilio.purchase_phone_number
Buy a phone number for this account so it can send, receive, or answer calls and texts. Use when the user wants to purchase, acquire, or get a new phone number. Find candidates first with search_available_phone_numbers.
Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /Accounts/{{params.account_sid}}/IncomingPhoneNumbers.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID to buy the number under. |
friendly_name | string | no | Optional label for the number. |
phone_number | string | yes | The phone number to purchase, in E.164 form. |
sms_url | string | no | Optional URL to handle incoming texts to this number. |
voice_url | string | no | Optional URL to handle incoming calls to this number. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
date_created | string | |
friendly_name | string | |
phone_number | string | |
sid | string |
Also retrieved by: "buy this phone number for the account", "acquire a new line we can text from", "get us a fresh number to call from".
twilio.list_incoming_phone_numbers
List phone numbers this account already owns. Use when the user wants to see which numbers are provisioned, active, or available to send from.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/IncomingPhoneNumbers.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID to list owned numbers for. |
friendly_name | string | no | Optional filter by the number's label. |
page_size | integer | no | Optional max number of numbers to return. |
phone_number | string | no | Optional filter, matches a specific owned number. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
numbers | array of object | |
numbers[].friendly_name | string | |
numbers[].phone_number | string | |
numbers[].sid | string |
Also retrieved by: "what numbers do we already own", "show every phone number provisioned on this account", "see which lines are active right now".
twilio.get_incoming_phone_number
Get one owned phone number's configuration, including its webhook urls and capabilities, by its number id. Use when the user asks how a specific number is set up.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/IncomingPhoneNumbers/{{params.phone_number_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the number belongs to. |
phone_number_sid | string | yes | Phone number SID, e.g. "PNxxxx". |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
friendly_name | string | |
phone_number | string | |
sid | string | |
sms_url | string | |
voice_url | string |
Also retrieved by: "check how a specific number is configured", "look up the webhook setup for one of our lines", "what does this particular line's configuration look like".
twilio.update_incoming_phone_number
Change an owned phone number's settings, such as its voice or sms webhook url, or its label. Use when the user wants to reconfigure, rename, or repoint where calls or texts to a number are handled.
Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /Accounts/{{params.account_sid}}/IncomingPhoneNumbers/{{params.phone_number_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the number belongs to. |
friendly_name | string | no | Optional new label for the number. |
phone_number_sid | string | yes | Phone number SID to reconfigure. |
sms_url | string | no | Optional new URL to handle incoming texts. |
voice_url | string | no | Optional new URL to handle incoming calls. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
friendly_name | string | |
phone_number | string | |
sid | string | |
sms_url | string | |
voice_url | string |
Also retrieved by: "repoint where texts to this number go", "change the webhook url for incoming calls", "rename one of our phone numbers", "reconfigure how a number handles incoming sms".
twilio.release_phone_number
Release an owned phone number back to Twilio, permanently giving it up. Use when the user wants to remove, cancel, or stop paying for a number they no longer need. Irreversible; the number cannot be reclaimed once released.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls DELETE /Accounts/{{params.account_sid}}/IncomingPhoneNumbers/{{params.phone_number_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID the number belongs to. |
phone_number_sid | string | yes | Phone number SID to release. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
deleted | boolean |
Also retrieved by: "give up a number we don't need anymore", "cancel a phone line and stop paying for it", "drop a number from the account for good".
twilio.get_account
Get one account or subaccount's name, status, and type by its account id. Use when the user asks about a specific account's standing. For listing every subaccount, use list_subaccounts.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Account SID to fetch, main account or a subaccount. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
date_created | string | |
friendly_name | string | |
owner_account_sid | string | |
sid | string | |
status | string | |
type | string |
Also retrieved by: "check the standing of a specific subaccount", "look up whether an account is active or suspended", "what's the status on this particular account".
twilio.create_subaccount
Create a new subaccount under this account, for isolating the billing, numbers, or usage of a project or customer. Use when the user wants to set up a separate, nested, or child account.
Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /Accounts.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
friendly_name | string | yes | Label for the new subaccount. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
date_created | string | |
friendly_name | string | |
sid | string | |
status | string | |
type | string |
Also retrieved by: "set up a separate account for this client", "spin up a nested account for a new project", "make a child account to isolate their billing".
twilio.list_subaccounts
List every subaccount under this account, optionally filtered by name or status. Use when the user wants to see all sub-accounts, child accounts, or nested projects.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
friendly_name | string | no | Optional filter by the subaccount's label. |
page_size | integer | no | Optional max number of subaccounts to return. |
status | string, one of active, suspended, closed | no | Optional filter by subaccount status. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
accounts | array of object | |
accounts[].date_created | string | |
accounts[].friendly_name | string | |
accounts[].sid | string | |
accounts[].status | string | |
accounts[].type | string |
Also retrieved by: "show every sub-account under this one", "see all the child accounts we manage", "list nested projects on our account".
twilio.close_subaccount
Permanently close a subaccount, ending its ability to send, receive, or be billed. Use when the user wants to shut down, close, or terminate a subaccount for good. Irreversible; a closed account cannot be reopened.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls POST /Accounts/{{params.account_sid}}.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Subaccount SID to close. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
sid | string | |
status | string |
Also retrieved by: "shut down a client's sub-account for good", "terminate a nested account entirely", "permanently close out a child account".
twilio.list_usage_records
Get usage and cost totals for this account, broken down by category such as calls, messages, or recordings, over a time period. Use when the user asks how much they've spent, used, or been billed for.
Class read (reads only). No scopes beyond the connection's defaults. Calls GET /Accounts/{{params.account_sid}}/Usage/Records.json.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
account_sid | string | yes | Twilio account SID to report usage for. |
category | string | no | Optional usage category, e.g. "calls" or "sms". |
end_date | string | no | Optional end of the reporting period (YYYY-MM-DD). |
start_date | string | no | Optional start of the reporting period (YYYY-MM-DD). |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
records | array of object | |
records[].category | string | |
records[].count | string | |
records[].description | string | |
records[].end_date | string | |
records[].price | string | |
records[].price_unit | string | |
records[].start_date | string | |
records[].usage | string | |
records[].usage_unit | string |
Also retrieved by: "how much have we spent on calls this month", "break down our sms costs by category", "what's our usage looked like lately", "check the bill for this account".