メニュー

Expand
ページを評価:

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
文字列 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 in REST API format
subscription_sid
Path
post sid<DF> Not PII

The unique SID identifier of the Subscription.

type
必須
post 文字列 Not PII

Type of event being subscribed to.

schema_version
オプション
post integer Not PII

The schema version that the subscription should use.

例 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
        例 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 in REST API format
              subscription_sid
              Path
              GET sid<DF> Not PII

              The unique SID identifier of the Subscription.

              例 1
                    
                    
                    

                    Update Event

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

                    Updates the event type

                    パラメーター
                    Parameters in REST API format
                    subscription_sid
                    Path
                    post sid<DF> Not PII

                    The unique SID identifier of the Subscription.

                    type
                    Path
                    post 文字列 Not PII

                    Type of event being subscribed to.

                    schema_version
                    オプション
                    post integer Not PII

                    The schema version that the subscription should use.

                    例 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

                          削除する
                          https://events.twilio.com/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents/{Type}

                          Deletes an event type on a subscription.

                          パラメーター
                          Parameters in REST API format
                          subscription_sid
                          Path
                          削除する sid<DF> Not PII

                          The unique SID identifier of the Subscription.

                          type
                          Path
                          削除する 文字列 Not PII

                          Type of event being subscribed to.

                          例 1
                                
                                
                                
                                ページを評価:

                                ヘルプが必要ですか?

                                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.

                                      
                                      
                                      

                                      フィードバックくださりありがとうございます!

                                      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!

                                      ステップ1

                                      Get link

                                      Get a free personal referral link here

                                      ステップ2:

                                      Give $10

                                      Your user signs up and upgrade using link

                                      ステップ3

                                      Get $10

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