Menu

Expand
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.

Names in PHP format
accountSid
sid<AC> Not PII

The SID of the Account that created the Notification resource.

apiVersion
string Not PII

The API version used to generate the notification. Can be empty for events that don't have a specific API version, such as incoming phone calls.

callSid
sid<CA> Not PII

The SID of the Call the Notification resource is associated with.

dateCreated
date_time<rfc2822> Not PII

The date and time in GMT that the resource was created specified in RFC 2822 format.

dateUpdated
date_time<rfc2822> Not PII

The date and time in GMT that the resource was last updated specified in RFC 2822 format.

errorCode
string Not PII

A unique error code for the error condition that is described in our Error Dictionary.

log
string Not PII

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

messageDate
date_time<rfc2822> Not PII

The date the notification was actually generated in RFC 2822 format. Message buffering can cause this value to differ from date_created.

messageText
string Not PII

The text of the notification.

moreInfo
url Not PII

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

requestMethod
http_method Not PII

The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers.

requestUrl
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 our REST API, this is the URL of the resource you called.

sid
sid<NO> Not PII

The unique string that that we created to identify the Notification resource.

uri
uri Not PII

The URI of the 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
Names in None format
account_sid
Required
get sid<AC> Not PII

The SID of the Account that created the Notification resource to fetch.

sid
Required
get sid<NO> Not PII

The Twilio-provided string that uniquely identifies the Notification resource to fetch.

Example 1
        
        
        
        
        Includes a default Notification SID.

        Fetch Notification

        Includes a default Notification SID.
        Example 2
              
              
              
              
              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
              Names in None format
              log
              Optional
              get integer Not PII

              Only read notifications of the specified log level. Can be: 0 to read only ERROR notifications or 1 to read only WARNING notifications. By default, all notifications are read.

              message_date
              Optional
              get date_inequality<iso8601> Not PII

              Only show notifications for the specified date, formatted as YYYY-MM-DD. You can also specify an inequality, such as <=YYYY-MM-DD for messages logged at or before midnight on a date, or >=YYYY-MM-DD for messages logged at or after midnight on a date.

              account_sid
              Required
              get sid<AC> Not PII

              The SID of the Account that created the Notification resources to read.

              Example 1
                    
                    
                    
                    
                    Read Notifications without filters.

                    Read Notification

                    Read Notifications without filters.
                    Example 2
                          
                          
                          
                          
                          Read Notifications using filters.

                          Filter Notifications

                          Read Notifications using filters.
                          Example 3
                                
                                
                                
                                
                                Read Notifications using a filter having params.

                                Filter Notifications using params

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

                                      Filter Notifications using limits

                                      Read Notifications using a filter having a date limit.
                                      Example 5
                                            
                                            
                                            
                                            
                                            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
                                            Names in None format
                                            account_sid
                                            Required
                                            delete sid<AC> Not PII

                                            The SID of the Account that created the Notification resources to delete.

                                            sid
                                            Required
                                            delete sid<NO> Not PII

                                            The Twilio-provided string that uniquely identifies the Notification resource to delete.

                                            Example 1
                                                  
                                                  
                                                  
                                                  
                                                  Includes a default Notification SID.

                                                  Delete Notifications

                                                  Includes a default Notification SID.
                                                  Example 2
                                                        
                                                        
                                                        
                                                        
                                                        Includes a sample Notification SID.

                                                        Delete Notifications

                                                        Includes a sample Notification SID.
                                                        Rate this page:

                                                        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.