Skip to main content
Twilio REST API for programmable SMS/MMS messaging, voice calls, OTP phone verification (Verify), and phone-number intelligence (Lookup), all against the user’s own Twilio account and phone numbers. Use when an agent needs to text or call a real phone number, run a verification-code flow, check message delivery status, or validate and enrich a phone number with line-type data. Users connect their Account SID and Auth Token from the Twilio Console; Twilio bills their account directly. 14 example endpoints available through Lava’s AI Gateway. See the Twilio API docs for full documentation.
This provider requires your own credentials — connect your API key or OAuth account before use.
This is a catch-all provider — any valid URL under https://api.twilio.com is supported. Twilio REST API across four hosts. Classic messaging/voice: https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/{resource}.json — write the literal {AccountSid} placeholder; the gateway substitutes the connected account. Common resources: Messages.json (send/list SMS and MMS), Messages/{MessageSid}.json (status/delete), Calls.json (place/list calls; pass a TwiML Url param), IncomingPhoneNumbers.json (owned numbers), Balance.json. Verification: https://verify.twilio.com/v2/Services and Services/{ServiceSid}/Verifications + VerificationCheck. Phone intelligence: https://lookups.twilio.com/v2/PhoneNumbers/{E164Number}?Fields=line_type_intelligence. Messaging services: https://messaging.twilio.com/v1/Services. Send request bodies as ordinary JSON; the gateway re-encodes them to the form-urlencoded format Twilio expects. Parameter names are PascalCase (To, From, Body, MediaUrl). List endpoints paginate with PageSize plus the returned next_page_uri. Bare Account resources and Keys/SigningKeys endpoints are not routed (credential surfaces). See https://www.twilio.com/docs/usage/api for the full reference. The endpoints below are curated examples.

Endpoints

Send an SMS or MMS message. From must be a Twilio number (or Messaging Service SID via MessagingServiceSid) on the connected account; add MediaUrl for MMS.

POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages.json — Free

List sent and received messages, filterable by To, From, and DateSent; paginate with PageSize.

GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages.json?PageSize=20 — Free

Fetch a single message by SID, including delivery status and error code.

GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}.json — Free

Delete a message record from the account’s message log.

DELETE https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}.json — Free

Place an outbound voice call. Url must point to TwiML instructions for the call (or pass Twiml inline).

POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls.json — Free

List voice calls with status and duration, filterable by To, From, and StartTime.

GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls.json?PageSize=20 — Free

List the phone numbers owned by the connected account, with their SMS/voice capabilities.

GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json — Free

Fetch the account’s current Twilio balance and currency.

GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Balance.json — Free

Validate and enrich a phone number (E.164). Add Fields=line_type_intelligence for carrier/line-type data (Twilio charges per data package).

GET https://lookups.twilio.com/v2/PhoneNumbers/+15558675310?Fields=line_type_intelligence — Free

List the Verify services configured on the account.

GET https://verify.twilio.com/v2/Services — Free

Send a verification code to a phone number via sms, call, whatsapp, or email through an existing Verify service.

POST https://verify.twilio.com/v2/Services/{ServiceSid}/Verifications — Free

Check a verification code the user received; status “approved” means the code matched.

POST https://verify.twilio.com/v2/Services/{ServiceSid}/VerificationCheck — Free

Delete a Verify service by SID.

DELETE https://verify.twilio.com/v2/Services/{ServiceSid} — Free

List Messaging Services (sender pools with A2P registration) on the account.

GET https://messaging.twilio.com/v1/Services — Free

Next Steps

All Providers

Browse all supported AI providers

Forward Proxy

Learn how to construct proxy URLs and authenticate requests