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 Messages
      • GETList Messages
      • GETFetch a Message
      • GETFetch a Message Operation
      • GETList Message Operations
      • GETSeek a Message by an Identifier
LogoLogo
SDKsHelp CenterLog inSign up
Comms API ReferenceMessages

List Message Operations

GET
https://comms.twilio.com/v1/Messages/Operations
GET
/v1/Messages/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.messages.listOperations({});
9}
10main();
1{
2 "operations": [
3 {
4 "id": "comms_operation_01h9krwprkeee8fzqspvwy6nq8",
5 "status": "SCHEDULED",
6 "stats": {
7 "total": 10,
8 "recipients": 10,
9 "queued": 5,
10 "sent": 3,
11 "scheduled": 2,
12 "delivered": 3,
13 "read": 1,
14 "undelivered": 1,
15 "unaddressable": 0,
16 "failed": 0,
17 "canceled": 0,
18 "attempts": 12
19 },
20 "createdAt": "2024-04-20T14:00:00Z",
21 "updatedAt": "2024-04-20T15:30:00Z"
22 }
23 ],
24 "pagination": {
25 "next": "eyJwYWdlVG9rZW4iOiAiY29tbXNfb3BlcmF0aW9uXzAxaG5rcnducHJrZWVlOGZ6cXNwdnd5Nm5xOSJ9",
26 "self": "eyJwYWdlVG9rZW4iOiAiY29tbXNfb3BlcmF0aW9uXzAxaG5rcnducHJrZWVlOGZ6cXNwdnd5Nm5xOCJ9"
27 }
28}

This operation fetches a paginated list of Message 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

Seek a Message by an Identifier

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 in ISO 8601 format.
endDatestringOptionalformat: "date-time"
Filter to Operations created before the specified date and time in ISO 8601 format.
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
A list of Message Operations.
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