Create a new User Defined Message for the given Call SID.
Allows your server-side application to send messages to the Voice SDK end user during an active Call.
Create a new User Defined Message for the given Call SID.
Path parameters
-
The SID of the Account that created User Defined Message.
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 Message is associated with.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^CA[0-9a-fA-F]{32}$
.
POST
/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/UserDefinedMessages.json
curl \
--request POST 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/UserDefinedMessages.json' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Content=%7B%22key%22%3A%22value%22%7D&IdempotencyKey=1'
Request example
{"Content"=>"{\"key\":\"value\"}", "IdempotencyKey"=>"1"}
Response examples (201)
{
"sid": "KXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "Wed, 18 Dec 2019 20:02:01 +0000"
}