Subscribed Event API
With this API the user can perform CRUD operations on an Event associated with a Subscription.
With the Subscribed Event API you can:
- Add an existing event type to a subscription
- Get all events associated with a subscription
- Update an event on a subscription
- Delete an event on a subscription
SubscribedEvent properties
Resource Properties in REST API format | |
---|---|
account_sid
|
The unique SID identifier of the Account. |
type
|
Type of event being subscribed to. |
schema_version
|
The schema version that the subscription should use. |
subscription_sid
|
The unique SID identifier of the Subscription. |
url
|
The URL of this resource. |
Add an Event Type
https://events.twilio.com/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents
This endpoint adds an existing event type to a particular subscription. It is possible to specify the version of the schema to use for the given event type. Otherwise the last available schema version will be used for the added event type.
Parameters
Parameters in REST API format | |
---|---|
subscription_sid
Path
|
The unique SID identifier of the Subscription. |
type
Required
|
Type of event being subscribed to. |
schema_version
Optional
|
The schema version that the subscription should use. |
Example 1
Example 2
Get All Events
https://events.twilio.com/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents
Get all event types associated with a particular subscription
Parameters
Parameters in REST API format | |
---|---|
subscription_sid
Path
|
The unique SID identifier of the Subscription. |
Example 1
Update Event
https://events.twilio.com/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents/{Type}
Updates the event type
Parameters
Parameters in REST API format | |
---|---|
subscription_sid
Path
|
The unique SID identifier of the Subscription. |
type
Path
|
Type of event being subscribed to. |
schema_version
Optional
|
The schema version that the subscription should use. |
Example 1
Delete an Event
https://events.twilio.com/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents/{Type}
Deletes an event type on a subscription.
Parameters
Parameters in REST API format | |
---|---|
subscription_sid
Path
|
The unique SID identifier of the Subscription. |
type
Path
|
Type of event being subscribed to. |
Example 1
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 by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.