Menu

Expand
Rate this page:

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
sid<AC> Not PII

The unique SID identifier of the Account.

type
string Not PII

Type of event being subscribed to.

schema_version
integer Not PII

The schema version that the subscription should use.

subscription_sid
sid<DF> Not PII

The unique SID identifier of the Subscription.

url
url Not PII

The URL of this resource.

Add an Event Type

post
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
post sid<DF> Not PII

The unique SID identifier of the Subscription.

type
Required
post string Not PII

Type of event being subscribed to.

schema_version
Optional
post integer Not PII

The schema version that the subscription should use.

Example 1
        
        
        
        Adds an event type to the subscription to the latest schema version available

        Add Event Type to Subscription

        Adds an event type to the subscription to the latest schema version available
        Example 2
              
              
              
              Add an event type specifying the schema version to be used

              Add Event Type with schema version

              Add an event type specifying the schema version to be used

              Get All Events

              get
              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
              get sid<DF> Not PII

              The unique SID identifier of the Subscription.

              Example 1
                    
                    
                    

                    Update Event

                    post
                    https://events.twilio.com/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents/{Type}

                    Updates the event type

                    Parameters
                    Parameters in REST API format
                    subscription_sid
                    Path
                    post sid<DF> Not PII

                    The unique SID identifier of the Subscription.

                    type
                    Path
                    post string Not PII

                    Type of event being subscribed to.

                    schema_version
                    Optional
                    post integer Not PII

                    The schema version that the subscription should use.

                    Example 1
                          
                          
                          
                          Downgrade the version of the subscribed event type

                          Change schema version of subscribed event type

                          Downgrade the version of the subscribed event type

                          Delete an Event

                          delete
                          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
                          delete sid<DF> Not PII

                          The unique SID identifier of the Subscription.

                          type
                          Path
                          delete string Not PII

                          Type of event being subscribed to.

                          Example 1
                                
                                
                                
                                Rate this page:

                                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 Community Forums or browsing the Twilio tag on Stack Overflow.

                                      
                                      
                                      

                                      Thank you for your feedback!

                                      We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

                                      Sending your feedback...
                                      🎉 Thank you for your feedback!
                                      Something went wrong. Please try again.

                                      Thanks for your feedback!

                                      Refer us and get $10 in 3 simple steps!

                                      Step 1

                                      Get link

                                      Get a free personal referral link here

                                      Step 2

                                      Give $10

                                      Your user signs up and upgrade using link

                                      Step 3

                                      Get $10

                                      1,250 free SMSes
                                      OR 1,000 free voice mins
                                      OR 12,000 chats
                                      OR more