For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SDKsHelp CenterLog inSign up
    • Overview
  • Getting Started
    • API Mechanics
    • Quickstart
  • Guides
    • Communications API
    • Troubleshooting
    • Events
    • Changelog
  • Comms API Reference
      • Summary
      • POSTSend Emails
      • GETList Emails
      • GETFetch an Email
      • DELDelete
      • GETFetch an Email Operation
      • GETList Email Operations
LogoLogo
SDKsHelp CenterLog inSign up
Comms API ReferenceEmails

List Email Operations

GET
https://comms.twilio.com/v1/Emails/Operations
GET
/v1/Emails/Operations
1import { TwilioClient } from "twilio-comms";
2
3async function main() {
4 const client = new TwilioClient({
5 accountId: "YOUR_ACCOUNTID_HERE",
6 authToken: "YOUR_AUTHTOKEN_HERE",
7 });
8 await client.emails.listOperations({});
9}
10main();
1{
2 "operations": [
3 {
4 "id": "comms_operation_01h9krwprkeee8fzqspvwy6nq8",
5 "status": "COMPLETED",
6 "stats": {
7 "total": 5,
8 "recipients": 5,
9 "attempts": 5,
10 "queued": 0,
11 "sent": 5,
12 "scheduled": 0,
13 "delivered": 5,
14 "opened": 3,
15 "undelivered": 0,
16 "failed": 0,
17 "canceled": 0
18 },
19 "createdAt": "2024-06-20T10:15:30Z",
20 "updatedAt": "2024-06-20T10:20:00Z"
21 },
22 {
23 "id": "comms_operation_01h9krwprkeee8fzqspvwy6nq9",
24 "status": "SCHEDULED",
25 "stats": {
26 "total": 3,
27 "recipients": 3,
28 "attempts": 0,
29 "queued": 0,
30 "sent": 0,
31 "scheduled": 3,
32 "delivered": 0,
33 "opened": 0,
34 "undelivered": 0,
35 "failed": 0,
36 "canceled": 0
37 },
38 "createdAt": "2024-06-21T08:00:00Z",
39 "updatedAt": "2024-06-21T08:05:00Z"
40 }
41 ],
42 "pagination": {
43 "next": null,
44 "self": "eyJTSyI6IkEjMDFqbmVoYm5xYWZmNDlrazUxZHA1bmN5bXciLCJTSzEiOiJBI2FjdGl2YXRlZCMyMDI1LTAzLTAzVDE3OjM3OjQ3WiMwMWpuZWhibnFhZmY0OWtrNTFkcDVuY3ltdyIsIlBLIjoiQyNBQzYwMzg4ODJiZDY5ZWIyNGM4YzU4ZGI5NjE4NjE3OTE4I0EifQ=="
45 }
46}

This operation fetches a paginated list of Email Operations.

Data retention: Records are available for 7 days after creation. Requests for data older than 7 days may return incomplete results.

Was this page helpful?
Previous

Messages

Next
Built with

Authentication

AuthorizationBasic

Basic authentication of the form Basic <account_id:auth_token>.

OR
AuthorizationBasic

Basic authentication of the form Basic <api_key:api_key_secret>.

Query parameters

startDatestringOptionalformat: "date-time"
Filter to Operations created after the specified date and time.
endDatestringOptionalformat: "date-time"
Filter to Operations created before the specified date and time.
statusenumOptional
Filter to Operations with the specified status.
Allowed values:
pageTokenstringOptional
The token to retrieve the next page of results.
pageSizeintegerOptional1-1000Defaults to 50
The number of resources to return in a page.

Response

OK
operationslist of objects
paginationobject

Metadata for paginated results. This object contains two tokens to navigate through paginated results.

  • Use next to retrieve the ‘next’ page in the result list.
  • Use self to retrieve the same page of the result list again.
  • Supply the token in the pageToken query param.

Errors

400
Bad Request Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error