Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Email API Overview


The Email API lets you send transactional and marketing emails to single or multiple recipients. The endpoint accepts a JSON object that specifies the sender, recipients, subject, and content of the email.

The content object requires the subject and html fields. Twilio Email doesn't require the text field. If you don't provide it, Twilio generates a plain-text version from your HTML body.


Base URL

base-url page anchor

All requests to the Email API use the following base URL:

https://comms.twilio.com/v1/Emails


Asynchronous operations

asynchronous-operations page anchor

The Emails endpoint is asynchronous. When you submit a request, the API returns a 202 Accepted status and an operationId.

  • Track progress: Use the operationLocation URL in the response to poll for the status of your send.
  • Check status: Issue a GET request to the operationLocation URI to retrieve the current status.

Each Operation progresses through the following statuses:

StatusDescription
SCHEDULEDThe operation is scheduled for future processing.
PROCESSINGThe operation is currently being processed.
COMPLETEDAll emails in the operation have been processed.
CANCELEDThe operation was canceled.

Each individual email progresses through a series of statuses as it moves from submission to delivery:

StatusDescription
SCHEDULEDThe email is scheduled for future delivery.
QUEUEDThe email is queued for sending.
SENTThe email was sent to the recipient's mail server.
DELIVEREDThe recipient's mail server confirmed delivery.
UNDELIVEREDThe email was sent by Twilio but wasn't delivered to the recipient.
OPENEDThe recipient opened the email.
FAILEDThe email failed during processing.
CANCELEDThe email was canceled through an API request.
INBOUNDThe email was received by Twilio from an external source.

You can use LiquidJS(link takes you to an external page) templating in the subject, text, and html fields.

For each variable in your content (for example, {{firstName}}), include a matching key in the variables object for every recipient in the to array. For examples, see Personalization with variables.

Use the schedule object to send an email at a future time. The sendAt field is an array, but currently only the first value is used. Provide a value in RFC 3339(link takes you to an external page) format (for example, 2026-12-15T14:15:22Z). You can schedule emails up to 7 days in advance.

If your schedule has the flexibility, schedule sending your email message at off-peak times. Most emails are scheduled at the top of the hour or half hour. Scheduling at off-peak times, like 10:53 rather than 11:00, can lower deferral rates.

To include file attachments in your email message, add an attachments array to the request body. Each attachment requires the following fields:

FieldNecessityDescriptionExample
filenameRequiredThe name of the file displayed to the recipient.example.pdf
contentTypeRequiredThe MIME type of the file included in the email message.application/pdf
contentRequiredThe file content encoded in Base64.
cidOptionalA Content-ID that references the attachment inline in the HTML body.<img src="cid:yourContentIdHere" />

Attachments count toward the total request size limit.

The List endpoints for both Email and Email Operation resources support pagination with the following query parameters:

  • pageToken — A token returned in the previous response to fetch the next page of results.
  • pageSize — The number of records to return per page. Minimum: 1, maximum: 1,000, default: 50.

If you want to categorize email messages for filtering and tracking purposes, add custom metadata called tags to your List requests.

To filter the List Emails endpoint with tags, use the following query string format:

?tags=key1:value1;key2:value2;

When you specify multiple tags, the API returns only emails that match all of them.

These tags have the following constraints:

  • Maximum of 10 key-value pairs per email message.
  • Maximum key length: 128 characters.
  • Maximum value length: 256 characters.
  • Keys and values can contain alphanumeric characters, periods (.), underscores (_), hyphens (-), and tildes (~).

  • Your full request, including attachments, must not exceed 10 MB.
  • The total number of recipients must be no more than 10,000.
  • The from field doesn't support Unicode encoding.

When you send a request to the v1/Emails endpoint, Twilio validates your JSON payload before sending the email. If Twilio finds errors, Twilio returns as many issues as possible in its single error response. To learn more about possible errors, see Status codes and errors.