REST API: Notifications

A Notification instance resource represents a single log entry made by Twilio in the course of handling your calls or your use of the REST API. It is very useful for debugging purposes. The Notifications list resource 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.

SPECIAL NOTE: Unlike other areas of this REST API, the representation of a Notification instance is different from that of the 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.

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.

ApiVersion

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.

Log

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

ErrorCode

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

MoreInfo

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

MessageText

The text of the notification.

MessageDate

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

RequestUrl

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.

RequestMethod

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.

RequestVariables

The Twilio-generated HTTP GET or POST variables sent to your server. Alternatively, if the notification was generated by the REST API, this field will include any HTTP POST or PUT variables you sent to the REST API.

The following GET query string parameters allow you to limit the list returned. Note, parameters are case-sensitive:

Parameter

Description

Log

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

MessageDate

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.