GET /webhooks/:id
Gets a single webhook subscription resource by ID.
Request
GET https://api.tropo.com/v1/webhooks/:id
Headers
This request must be authenticated with HTTP Basic authentication using your Tropo account credentials.
Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l
Response
Fields
- id
- (Integer) The unique ID of the webhook subscription.
- accountid
- (Integer) The Tropo account owning the webhook subscription.
- event
- (String) Which event this subscription is for. Possible values are
smsdlr
,cdrCreated
, orcdrRated
. See the webhook documentation for details on each event type. - resource
- (String) The type of resource this CDR is for. Possible values are "call", "sms", "transcription", and "all". Multiple resources can be subscribed to by separating them by commas.
- targetUrl
- (String) The URL of your web application where the event notification will be sent.
- payload
- (Object) A freeform JSON object containing arbitrary user-defined data that you wish to include with your event notifications. This field is only returned if it was set by the user when creating the subscription.
- enabled
- (Boolean) Is this subscription active? If set to False, Tropo will not send you the event notifications.
- href
- (String) The URL to the webhook resource.
Example
{ "id": 12301, "event": "cdrCreated", "name": "CDR handler", "targetUrl": "http://example.com/dlr", "resource": "call", "accountId": "157223", "payload": { "apiKey" : "6Tg4CD3GBvmjh897hfgbdgh"}, "enabled": false, "href": "https://api.tropo.com/v1/webhooks/12" }