Twilio

Twilio is a cloud communications platform for sending and receiving SMS, MMS and WhatsApp messages, making and receiving phone calls, verifying users with one-time codes and looking up phone number information.

The Twilio REST APIs cover messaging, voice calls, phone numbers, Messaging Services and A2P 10DLC registration, Content Templates, Verify, Lookup, Studio flows, usage and account management.

With Declarative Webhooks you can send text and WhatsApp messages and make calls from Salesforce records and flows, verify phone numbers and email addresses, validate numbers with Lookup, and receive incoming messages and delivery or call status callbacks to log activity on Leads, Contacts and Cases.

Documentation URL: https://www.twilio.com/docs/usage/api

Installable Elements              (No items selected)



Base Elements

These elements are required for the templates below to work

  • Named Credentials for the Twilio APIs (api, messaging, verify, lookups, content, studio, accounts and iam), with the External Credential and permission set they share to call Twilio with your API key.

  • Custom Metadata storing your Twilio Account SID, used in the URL of the Twilio core API templates (messages, calls, phone numbers...).

Messages

Send SMS, MMS and WhatsApp messages, and list, get, update or delete messages, their media and feedback.

  • Delete the Media resource.

  • Fetch a single Media resource associated with a specific Message resource.

  • Read a list of Media resources associated with a specific Message resource.

  • Send a message.

  • Retrieve a list of Message resources associated with a Twilio Account.

  • Deletes a Message resource from your account.

  • Fetch a specific Message.

  • Update a Message resource (used to redact Message body text and to cancel not-yet-sent messages).

  • Create Message Feedback to confirm a tracked user action was performed by the recipient of the associated Message.

Calls

Make, update and list calls, and manage call recordings, events, payments, media streams, SIPREC and real-time transcriptions.

  • Create a new outgoing call to phones, SIP-enabled endpoints or Twilio Client connections.

  • Retrieves a collection of calls made to and from your account.

  • Delete a Call record from your account.

  • Fetch the call specified by the provided Call SID.

  • Initiates a call redirect or terminates a call.

  • Retrieve a list of all events for a call.

  • Get Call Notification.

  • List Call Notifications.

  • Create a recording for the call.

  • Retrieve a list of recordings belonging to the call used to make the request.

  • Changes the status of the recording to paused, stopped, or in-progress.

  • Fetch an instance of a recording for a call.

  • Delete a recording from your account.

  • Create an instance of payments.

  • Update an instance of payments with different phases of payment flows.

  • Create a Transcription.

  • Stop a Transcription using either the SID of the Transcription resource or the name used when creating the resource.

  • Create a Siprec.

  • Stop a Siprec using either the SID of the Siprec resource or the name used when creating the resource.

  • Create a Stream.

  • Stop a Stream using either the SID of the Stream resource or the name used when creating the resource.

  • Create a new User Defined Message for the given Call SID.

  • Subscribe to User Defined Messages for a given Call SID.

  • Delete a specific User Defined Message Subscription.

Inbound Webhooks

Receive Twilio webhooks in Salesforce: incoming messages and message and call status callbacks.

  • Receives incoming SMS, MMS and WhatsApp messages sent to a Twilio number or Messaging Service.

  • Receives message delivery status updates (queued, sent, delivered, undelivered, failed, read).

  • Receives call progress and completion events (initiated, ringing, answered, completed) for calls.

Verify

Send and check one-time verification codes (SMS, voice, email, WhatsApp) and manage Verify services, factors and challenges.

  • Create a new enrollment Access Token for the Entity.

  • Fetch an Access Token for the Entity.

  • Create a new Bucket for a Rate Limit.

  • Retrieve a list of all Buckets for a Rate Limit.

  • Update a specific Bucket.

  • Fetch a specific Bucket.

  • Delete a specific Bucket.

  • Create a new Challenge for the Factor.

  • Retrieve a list of all Challenges for a Factor.

  • Fetch a specific Challenge.

  • Verify a specific Challenge.

  • Create a new Entity for the Service.

  • Retrieve a list of all Entities for a Service.

  • Delete a specific Entity.

  • Fetch a specific Entity.

  • Delete a specific Factor.

  • Fetch a specific Factor.

  • Update a specific Factor.

  • Retrieve a list of all Factors for an Entity.

  • Create a new Factor for the Entity.

  • Fetch the forms for a specific Form Type.

  • Create a new MessagingConfiguration for a service.

  • Retrieve a list of all Messaging Configurations for a Service.

  • Update a specific MessagingConfiguration.

  • Fetch a specific MessagingConfiguration.

  • Delete a specific MessagingConfiguration.

  • Create a new Notification for the corresponding Challenge.

  • Create a new Rate Limit for a Service.

  • Retrieve a list of all Rate Limits for a service.

  • Update a specific Rate Limit.

  • Fetch a specific Rate Limit.

  • Delete a specific Rate Limit.

  • Add a new phone number to SafeList.

  • Check if a phone number exists in SafeList.

  • Remove a phone number from SafeList.

  • Create a new Verification Service.

  • Retrieve a list of all Verification Services for an account.

  • Fetch specific Verification Service Instance.

  • Delete a specific Verification Service Instance.

  • Update a specific Verification Service.

  • Create a new Verification using a Service.

  • Update a Verification status.

  • Fetch a specific Verification.

  • List all the verification attempts for a given Account.

  • Fetch a specific verification attempt.

  • Get a summary of how many attempts were made and how many were converted.

  • Challenge a specific Verification Check.

  • List all the available templates for a given Account.

  • Create a new Webhook for the Service.

  • Retrieve a list of all Webhooks for a Service.

  • Update Webhook.

  • Delete a specific Webhook.

  • Fetch a specific Webhook.

  • Verify a Passkeys Factor.

  • Create a new Passkeys Factor for the Entity.

  • Create a Passkeys Challenge.

  • Approve a Passkeys challenge.

Lookup

Look up phone number information such as validation, carrier, line type and caller name.

  • The Lookup API allows you to query information on a phone number so that you can make a trusted interaction with your user.

  • Discussions made regarding how to help the customer to correlation request and response objects: - Respecting the natural order (requests vs.

  • Retrieve the list of rate limits for all fields (if any) It returns also the twilio rate limits.

  • Get rate limit.

  • Delete rate limit.

  • Upsert rate limit.

  • Retrieve an Override for a specific package and phone number.

  • Create an Override for a specific package and phone number.

  • Update an Override for a specific package and phone number.

  • Delete an Override for a specific package and phone number.

Phone Numbers

Search for available numbers, buy and manage incoming phone numbers, short codes, outgoing caller IDs and addresses.

  • Create Address.

  • List Addresses.

  • Delete Address.

  • Get Address.

  • Update Address.

  • List Available Phone Number Countries.

  • Get Available Phone Number Country.

  • List Available Phone Numbers (Local).

  • List Available Phone Numbers (Machine To Machine).

  • List Available Phone Numbers (Mobile).

  • List Available Phone Numbers (National).

  • List Available Phone Numbers (Shared Cost).

  • List Available Phone Numbers (Toll Free).

  • List Available Phone Numbers (VoIP).

  • List Dependent Phone Numbers.

  • Update an incoming-phone-number instance.

  • Fetch an incoming-phone-number belonging to the account used to make the request.

  • Delete a phone-numbers belonging to the account used to make the request.

  • Retrieve a list of incoming-phone-numbers belonging to the account used to make the request.

  • Purchase a phone-number for the account.

  • Fetch an instance of an Add-on installation currently assigned to this Number.

  • Remove the assignment of an Add-on installation from the Number specified.

  • Retrieve a list of Add-on installations currently assigned to this Number.

  • Assign an Add-on installation to the Number specified.

  • Fetch an instance of an Extension for the Assigned Add-on.

  • Retrieve a list of Extensions for the Assigned Add-on.

  • List Incoming Phone Numbers (Local).

  • Buy Local Phone Number.

  • List Incoming Phone Numbers (Mobile).

  • Buy Mobile Phone Number.

  • List Incoming Phone Numbers (Toll Free).

  • Buy Toll Free Phone Number.

  • Fetch an outgoing-caller-id belonging to the account used to make the request.

  • Updates the caller-id.

  • Delete the caller-id specified from the account.

  • Retrieve a list of outgoing-caller-ids belonging to the account used to make the request.

  • Verify Outgoing Caller ID.

  • Fetch an instance of a short code.

  • Update a short code with the following parameters.

  • Retrieve a list of short-codes belonging to the account used to make the request.

Messaging Services

Manage Messaging Services and their senders (phone numbers, short codes, alpha senders, channel senders) and link shortening domains.

  • Create Alpha Sender.

  • List Alpha Senders.

  • Get Alpha Sender.

  • Delete Alpha Sender.

  • List Channel Senders.

  • Create Channel Sender.

  • Get Channel Sender.

  • Delete Channel Sender.

  • Create Destination Alpha Sender.

  • List Destination Alpha Senders.

  • Get Destination Alpha Sender.

  • Delete Destination Alpha Sender.

  • Update Domain Cert V4.

  • Get Domain Cert V4.

  • Delete Domain Cert V4.

  • Update Domain Config.

  • Get Domain Config.

  • Get Domain Config Messaging Service.

  • Get Domain DNS Validation.

  • Create External Campaign.

  • Create Link Shortening Messaging Service.

  • Delete Link Shortening Messaging Service.

  • Get Link Shortening Messaging Service Domain Association.

  • Create Phone Number.

  • List Phone Numbers.

  • Delete Phone Number.

  • Get Phone Number.

  • Update Request Managed Cert.

  • Create Service.

  • List Services.

  • Update Service.

  • Get Service.

  • Delete Service.

  • Create Short Code.

  • List Short Codes.

  • Delete Short Code.

  • Get Short Code.

A2P 10DLC and Toll-Free Verification

Register brands and A2P 10DLC campaigns, and submit toll-free verifications.

  • Create Brand Registration OTP.

  • Get Brand Registration.

  • Update Brand Registration.

  • List Brand Registrations.

  • Create Brand Registration.

  • Create Brand Vetting.

  • List Brand Vettings.

  • Get Brand Vetting.

  • Fetch a list of all United States numbers that have been deactivated on a specific date.

  • Retrieve a tollfree verification.

  • Edit a tollfree verification.

  • Delete a tollfree verification.

  • List tollfree verifications.

  • Create a tollfree verification.

  • Create US A2P Campaign.

  • List US A2P Campaigns.

  • Delete US A2P Campaign.

  • Get US A2P Campaign.

  • Update US A2P Campaign.

  • Get US A2P Campaign Usecase.

  • Get Usecase.

Content Templates

Create and manage Content Templates and their WhatsApp approvals.

  • Create a ContentApprovalRequest for a content item.

  • Update the optimization spec (bid amount) of a ContentApprovalRequest for a content item.

  • Fetch a Content resource's approval status by its unique Content Sid.

  • Fetch a Content resource by its unique Content Sid.

  • Deletes a Content resource.

  • Update a Content resource.

  • Create a Content resource.

  • Retrieve a list of Contents belonging to the account used to make the request.

  • Retrieve a list of Contents with approval statuses belonging to the account used to make the request.

  • Retrieve a list of Legacy Contents belonging to the account used to make the request.

Conferences and Queues

Manage conferences, their participants and recordings, and call queues and their members.

  • Fetch an instance of a conference.

  • Update Conference.

  • Retrieve a list of conferences belonging to the account used to make the request.

  • Retrieve a list of recordings belonging to the call used to make the request.

  • Changes the status of the recording to paused, stopped, or in-progress.

  • Fetch an instance of a recording for a call.

  • Delete a recording from your account.

  • Fetch a specific member from the queue.

  • Dequeue a member from a queue and have the member's call begin executing the TwiML document at that URL.

  • Retrieve the members of the queue.

  • Fetch an instance of a participant.

  • Update the properties of the participant.

  • Kick a participant from a given conference.

  • Create Participant.

  • Retrieve a list of participants belonging to the account used to make the request.

  • Fetch an instance of a queue identified by the QueueSid.

  • Update the queue with the new parameters.

  • Remove an empty queue.

  • Retrieve a list of queues belonging to the account used to make the request.

  • Create a queue.

Recordings and Transcriptions

List, get and delete recordings, their transcriptions and add-on results.

  • Fetch an instance of a recording.

  • Delete a recording from your account.

  • Retrieve a list of recordings belonging to the account used to make the request.

  • Fetch an instance of an AddOnResult.

  • Delete a result and purge all associated Payloads.

  • Retrieve a list of results belonging to the recording.

  • Fetch an instance of a result payload.

  • Delete a payload from the result along with all associated Data.

  • Retrieve a list of payloads belonging to the AddOnResult.

  • Fetch an instance of a result payload.

  • Get Recording Transcription.

  • Delete Recording Transcription.

  • List Recording Transcriptions.

  • Fetch an instance of a Transcription.

  • Delete a transcription from the account used to make the request.

  • Retrieve a list of transcriptions belonging to the account used to make the request.

Studio

Trigger Studio flow executions and manage flows, executions and steps.

  • Retrieve a list of all Executions for the Flow.

  • Triggers a new Execution for the Flow.

  • Retrieve an Execution.

  • Delete the Execution and all Steps relating to it.

  • Update the status of an Execution to ended.

  • Retrieve the most recent context for an Execution.

  • Retrieve a list of all Steps for an Execution.

  • Retrieve a Step.

  • Retrieve the context for an Execution Step.

  • Create a Flow.

  • Retrieve a list of all Flows.

  • Update a Flow.

  • Retrieve a specific Flow.

  • Delete a specific Flow.

  • Retrieve a list of all Flows revisions.

  • Retrieve a specific Flow revision.

  • Validate flow JSON definition.

  • Fetch flow test users.

  • Update flow test users.

SIP

Manage SIP domains, credential lists, IP access control lists and their mappings.

  • Create a new credential list mapping resource.

  • Retrieve a list of credential list mappings belonging to the domain used in the request.

  • Fetch a specific instance of a credential list mapping.

  • Delete a credential list mapping from the requested domain.

  • Create a new IP Access Control List mapping.

  • Retrieve a list of IP Access Control List mappings belonging to the domain used in the request.

  • Fetch a specific instance of an IP Access Control List mapping.

  • Delete an IP Access Control List mapping from the requested domain.

  • Create a new credential list mapping resource.

  • Retrieve a list of credential list mappings belonging to the domain used in the request.

  • Fetch a specific instance of a credential list mapping.

  • Delete a credential list mapping from the requested domain.

  • Retrieve a list of credentials.

  • Create a new credential resource.

  • Fetch a single credential.

  • Update a credential resource.

  • Delete a credential resource.

  • Get All Credential Lists.

  • Create a Credential List.

  • Get a Credential List.

  • Update a Credential List.

  • Delete a Credential List.

  • Create a CredentialListMapping resource for an account.

  • Read multiple CredentialListMapping resources from an account.

  • Fetch a single CredentialListMapping resource from an account.

  • Delete a CredentialListMapping resource from an account.

  • Retrieve a list of domains belonging to the account used to make the request.

  • Create a new Domain.

  • Fetch an instance of a Domain.

  • Update the attributes of a domain.

  • Delete an instance of a Domain.

  • Retrieve a list of IpAccessControlLists that belong to the account used to make the request.

  • Create a new IpAccessControlList resource.

  • Fetch a specific instance of an IpAccessControlList.

  • Rename an IpAccessControlList.

  • Delete an IpAccessControlList from the requested account.

  • Fetch an IpAccessControlListMapping resource.

  • Delete an IpAccessControlListMapping resource.

  • Create a new IpAccessControlListMapping resource.

  • Retrieve a list of IpAccessControlListMapping resources.

  • Read multiple IpAddress resources.

  • Create a new IpAddress resource.

  • Read one IpAddress resource.

  • Update an IpAddress resource.

  • Delete an IpAddress resource.

Usage and Billing

Read usage records and account balance, and manage usage triggers.

  • Fetch the balance for an Account based on Account Sid.

  • Retrieve a list of usage-records belonging to the account used to make the request.

  • List Usage Records (All Time).

  • List Usage Records (Daily).

  • List Usage Records (Last Month).

  • List Usage Records (Monthly).

  • List Usage Records (This Month).

  • List Usage Records (Today).

  • List Usage Records (Yearly).

  • List Usage Records (Yesterday).

  • Fetch and instance of a usage-trigger.

  • Update an instance of a usage trigger.

  • Delete Usage Trigger.

  • Create a new UsageTrigger.

  • Retrieve a list of usage-triggers belonging to the account used to make the request.

Account and Keys

Manage accounts and subaccounts, API keys, signing keys, applications, connect apps and debugger notifications.

  • Create a new Twilio Subaccount from the account making the request.

  • Retrieves a collection of Accounts belonging to the account used to make the request.

  • Fetch the account specified by the provided Account Sid.

  • Modify the properties of a given Account.

  • Create a new application within your account.

  • Retrieve a list of applications representing an application within the requesting account.

  • Delete the application by the specified application sid.

  • Fetch the application specified by the provided sid.

  • Updates the application's properties.

  • Fetch an instance of an authorized-connect-app.

  • Retrieve a list of authorized-connect-apps belonging to the account used to make the request.

  • Fetch an instance of a connect-app.

  • Update a connect-app with the specified parameters.

  • Delete an instance of a connect-app.

  • Retrieve a list of connect-apps belonging to the account used to make the request.

  • Get API Key.

  • Update API Key.

  • Delete API Key.

  • List API Keys.

  • Create API Key.

  • Create a new Signing Key for the account making the request.

  • List Signing Keys.

  • Fetch a notification belonging to the account used to make the request.

  • Retrieve a list of notifications belonging to the account used to make the request.

  • Get Signing Key.

  • Update Signing Key.

  • Delete Signing Key.

  • Create a new token for ICE servers.

Accounts API

Manage auth tokens, AWS and public key credentials, SMS geo permissions, the safe list and bulk contacts and consents.

  • Promote the secondary Auth Token to primary.

  • Create Bulk Consents.

  • Create Bulk Contacts.

  • Retrieves a collection of AWS Credentials belonging to the account used to make the request.

  • Create a new AWS Credential.

  • Fetch the AWS credentials specified by the provided Credential Sid.

  • Modify the properties of a given Account.

  • Delete a Credential from your account.

  • Retrieves a collection of Public Key Credentials belonging to the account used to make the request.

  • Create a new Public Key Credential.

  • Fetch the public key specified by the provided Credential Sid.

  • Modify the properties of a given Account.

  • Delete a Credential from your account.

  • Update Messaging Geopermissions.

  • Get Messaging Geopermissions.

  • Add a new phone number or phone number 1k prefix to SafeList.

  • Check if a phone number or phone number 1k prefix exists in SafeList.

  • Remove a phone number or phone number 1k prefix from SafeList.

  • Create a new secondary Auth Token.

  • Delete the secondary Auth Token from your account.

IAM

Manage API keys and OAuth apps with the IAM API.

  • Retrieve a list of all Keys for a account.

  • Create a new Signing Key for the account making the request.

  • Fetch a specific Key.

  • Update a specific Key.

  • Delete a specific Key.

  • List resolved permissions for a role.

  • Issues a new Access token (optionally identity_token & refresh_token) in exchange of Oauth grant.

  • Updates an existing OAuth app for the given OauthAppSid.

  • Deletes an oauth app for the given AccountSid.

  • Creates an oauth app for the given AccountSid.

In order to install this in your org, you need to access the library from the Declarative Webhooks app in your Salesforce org, Declarative Webhooks Library tab.