Subscribe to User Defined Messages for a given Call SID.
Subscription for server-side application access to messages sent from the Voice SDK for an active Call.
Subscribe to User Defined Messages for a given Call SID.
Path parameters
-
The SID of the Account that subscribed to the User Defined Messages.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^AC[0-9a-fA-F]{32}$
. -
The SID of the Call the User Defined Messages subscription is associated with. This refers to the Call SID that is producing the user defined messages.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^CA[0-9a-fA-F]{32}$
.
Body
-
The URL we should call using the
method
to send user defined events to your application. URLs must contain a valid hostname (underscores are not permitted). -
A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated.
-
The HTTP method Twilio will use when requesting the above
Url
. EitherGET
orPOST
. Default isPOST
.Values are
GET
orPOST
.
curl \
--request POST 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/UserDefinedMessageSubscriptions.json' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Method=POST&Callback=http%3A%2F%2Fwww.example.com&IdempotencyKey=1'
{"Method"=>"POST", "Callback"=>"http://www.example.com", "IdempotencyKey"=>"1"}
{
"sid": "ZYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/UserDefinedMessageSubscriptions/ZYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "Wed, 18 Dec 2019 20:02:01 +0000"
}