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 Push Notifications
      • GETList Push Notifications
      • GETFetch a Push Notification
      • GETFetch a Push Notification Operation
      • GETList Push Notification Operations
LogoLogo
SDKsHelp CenterLog inSign up
Comms API ReferencePush Notifications

List Push Notification Operations

GET
https://comms.twilio.com/v1/PushNotifications/Operations
GET
/v1/PushNotifications/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.pushNotifications.listOperations({});
9}
10main();
1{
2 "operations": [
3 {
4 "id": "comms_operation_01h9krwprkeee8fzqspvwy6nq8",
5 "status": "SCHEDULED",
6 "stats": {
7 "total": 150,
8 "recipients": 145,
9 "unaddressable": 3,
10 "scheduled": 20,
11 "queued": 50,
12 "sent": 70,
13 "failed": 5,
14 "canceled": 2
15 },
16 "createdAt": "2024-04-20T14:22:00Z",
17 "updatedAt": "2024-04-20T15:45:00Z"
18 },
19 {
20 "id": "comms_operation_01h9ksxq9v7b2m4r5t6y7z8a9",
21 "status": "COMPLETED",
22 "stats": {
23 "total": 300,
24 "recipients": 300,
25 "unaddressable": 0,
26 "scheduled": 0,
27 "queued": 0,
28 "sent": 295,
29 "failed": 5,
30 "canceled": 0
31 },
32 "createdAt": "2024-04-18T10:00:00Z",
33 "updatedAt": "2024-04-18T12:30:00Z"
34 }
35 ],
36 "pagination": {
37 "next": "eyJwYWdlVG9rZW4iOiAiY29tbXNfb3BlcmF0aW9uXzAxaG9qbnZ3b3J4b3B5b3V6bG1uIn0",
38 "self": "eyJwYWdlVG9rZW4iOiAiY29tbXNfb3BlcmF0aW9uXzAxaDkrcnducGtrZWVlOGZ6cXNwdnd5Nm5xOCJ9"
39 }
40}

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

List Device Registrations

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

pageTokenstringOptional
The token to retrieve the next page of results.
pageSizeintegerOptional1-1000Defaults to 50
The number of resources to return in a page.
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:

Response

OK
operationslist of objects
A list of Push Notification 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