Create a new Subscription
POST
/v1/Subscriptions
Subscription to send Event Types to a Sink
Create a new Subscription.
Body
-
Description string Required
A human readable description for the Subscription This value should not contain PII.
-
SinkSid string Required
The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^DG[0-9a-fA-F]{32}$
. -
Types array Required
An array of objects containing the subscribed Event Types
POST /v1/Subscriptions
curl \
-X POST https://events.twilio.com/v1/Subscriptions \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'Description=string&SinkSid=string&'
Request example
{
"Description": "string",
"SinkSid": "string",
"Types": []
}
Response examples (201)
{
"account_sid": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"description": "string",
"links": {},
"sid": "string",
"sink_sid": "string",
"url": "https://example.com"
}