Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

REST API: Notifications [DEPRECATED]

The Notifications resource has been deprecated and replaced by Alerts. Notifications may be removed in future versions of the Twilio API. Since the Alerts resource is a superset of Notifications, we recommend its use going forward.

A Notification instance represents a single log entry made by Twilio during the handling of calls or use of the REST API. This resource is helpful for debugging issues with calls and the REST API.

The Notifications list represents the set of notifications generated for an account. For convenience, a Notifications list resource is also available as a subresource of a Call instance resource. This resource is scoped to an individual call so that you can navigate directly from a call to the notifications generated from that call.

Notification properties

Be aware that unlike other areas of this REST API, the representation of a Notification instance is different from that of Notification representations within responses from the list resource.

Due to the potentially voluminous amount of data in a notification, the full HTTP request and response data is only returned in the Notification instance resource representation.

account_sid
sid<AC> Not PII

The unique id of the Account responsible for this notification.

api_version
string Not PII

The version of the Twilio in use when this notification was generated. May be empty for events that don't have a specific API version, like incoming phone calls.

call_sid
sid<CA> Not PII

CallSid is the unique id of the call during which the notification was generated. Empty if the notification was generated by the REST API without regard to a specific phone call.

date_created
date_time<rfc2822> Not PII

The date that this resource was created, given in RFC 2822 format.

date_updated
date_time<rfc2822> Not PII

The date that this resource was last updated, given in RFC 2822 format.

error_code
string Not PII

A unique error code for the error condition. You can lookup errors, with possible causes and solutions, in our Error Dictionary.

log
string Not PII

An integer log level corresponding to the type of notification: 0 is ERROR, 1 is WARNING.

message_date
date_time<rfc2822> Not PII

The date the notification was actually generated, given in RFC 2822 format. Due to buffering, this may be slightly different than the DateCreated date.

message_text
string Not PII

The text of the notification.

more_info
url Not PII

A URL for more information about the error condition. The URL is a page in our Error Dictionary.

request_method
http_method Not PII

The HTTP method in use for the request that generated the notification. If the notification was generated during a phone call:The HTTP Method use to request the resource on your server. If the notification was generated by your use of the REST API:This is the HTTP method used in your request to the REST resource on Twilio's servers.

request_url
url Not PII

The URL of the resource that generated the notification. If the notification was generated during a phone call:This is the URL of the resource on YOUR SERVER that caused the notification. If the notification was generated by your use of the REST API: This is the URL of the REST resource you were attempting to request on Twilio's servers.

sid
sid<NO> Not PII

A 34 character string that uniquely identifies this resource.

uri
uri Not PII

The URI for this resource, relative to https://api.twilio.com

Fetch a Notification resource

get
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Notifications/{Sid}.json
Parameters
Sid
Required
get sid<NO> Not PII

The notification Sid that uniquely identifies this resource

Example 1
Loading Code Sample...
      
      
      
      
      Includes a default Notification SID.

      Fetch Notification

      Includes a default Notification SID.
      Example 2
      Loading Code Sample...
          
          
          
          
          Includes a sample Notification SID.

          Fetch Notification

          Includes a sample Notification SID.

          Read multiple Notification resources

          get
          https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Notifications.json
          Parameters
          Log
          Optional
          get integer Not PII

          Only show notifications for this log, using the integer log values shown above.

          MessageDate
          Optional
          get date_inequality<iso8601> Not PII

          Only show notifications for this date. Should be formatted as YYYY-MM-DD. You can also specify inequality, such as MessageDate<=YYYY-MM-DD for messages logged at or before midnight on a date, and MessageDate>=YYYY-MM-DD for messages logged at or after midnight on a date.

          Example 1
          Loading Code Sample...
              
              
              
              
              Read Notifications without filters.

              Read Notification

              Read Notifications without filters.
              Example 2
              Loading Code Sample...
                  
                  
                  
                  
                  Read Notifications using filters.

                  Filter Notifications

                  Read Notifications using filters.
                  Example 3
                  Loading Code Sample...
                      
                      
                      
                      
                      Read Notifications using a filter having params.

                      Filter Notifications using params

                      Read Notifications using a filter having params.
                      Example 4
                      Loading Code Sample...
                          
                          
                          
                          
                          Read Notifications using a filter having a date limit.

                          Filter Notifications using limits

                          Read Notifications using a filter having a date limit.
                          Example 5
                          Loading Code Sample...
                              
                              
                              
                              
                              Read Notifications using a filter having a date range.

                              Filter Notifications by date range

                              Read Notifications using a filter having a date range.

                              Delete a Notification resource

                              delete
                              https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Notifications/{Sid}.json
                              Parameters
                              Sid
                              Required
                              delete sid<NO> Not PII

                              The notification Sid that uniquely identifies this resource

                              Example 1
                              Loading Code Sample...
                                  
                                  
                                  
                                  
                                  Includes a default Notification SID.

                                  Delete Notifications

                                  Includes a default Notification SID.
                                  Example 2
                                  Loading Code Sample...
                                      
                                      
                                      
                                      
                                      Includes a sample Notification SID.

                                      Delete Notifications

                                      Includes a sample Notification SID.

                                      Need some help?

                                      We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

                                      Loading Code Sample...