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.
This resource represents an individual notification entry.
/2010-04-01/Accounts/{AccountSid}/Notifications/{NotificationSid}
A Notification resource is represented by the following properties:
| Property | Description |
|---|---|
| Sid | A 34 character string that uniquely identifies this resource. |
| DateCreated | The date that this resource was created, given in RFC 2822 format. |
| DateUpdated | The date that this resource was last updated, given in RFC 2822 format. |
| AccountSid | The unique id of the Account responsible for this notification. |
| CallSid | 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. |
| ResponseHeaders | The HTTP headers returned by your server. |
| ResponseBody | The HTTP body returned by your server. |
| Uri | The URI for this resource, relative to https://api.twilio.com |
Not Supported.
Not Supported.
Deletes the notification identified by {NotificationSid} from an account's log. If successful, returns HTTP status 204 (No Content) with no body.
/2010-04-01/Accounts/{AccountSid}/Notifications
/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications
Returns a list of notifications generated for an account. The list includes paging information.
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. |
Only show WARNING notifications generated on Jul 06th, 2009.
Only show WARNING notifications generated on or after midnight on Jul 06th, 2009.
Only show WARNING notifications generated between midnight Jul 06th, 2009 and midnight Jul 08th, 2009.
Not Supported.
Not Supported.
Not Supported.