Add an event type to a Subscription.
Event subscribed to in the parent Subscription
Add an event type to a Subscription.
Path parameters
-
The unique SID identifier of the Subscription.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^DF[0-9a-fA-F]{32}$
.
POST
/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents
curl \
--request POST 'https://events.twilio.com/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Type=com.twilio.messaging.message.delivered&SchemaVersion=2'
Request examples
Create
{"Type"=>"com.twilio.messaging.message.delivered", "SchemaVersion"=>2}
{"Type"=>"com.twilio.messaging.message.delivered", "SchemaVersion"=>2}
Response examples (200)
{
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/com.twilio.messaging.message.delivered",
"type": "com.twilio.messaging.message.delivered",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"schema_version": 2,
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
Response examples (201)
{
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/com.twilio.messaging.message.delivered",
"type": "com.twilio.messaging.message.delivered",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"schema_version": 2,
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}