Create a new User Defined Message for the given Call SID.

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://twilio.demo.bump-doc.com/doc/api/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"Api MCP server": {
  "url": "https://twilio.demo.bump-doc.com/doc/api/mcp"
}
Close
POST /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/UserDefinedMessages.json

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

  • AccountSid string Required

    The SID of the Account that created User Defined Message.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

  • CallSid string Required

    The SID of the Call the User Defined Message is associated with.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^CA[0-9a-fA-F]{32}$.

application/x-www-form-urlencoded

Body

  • Content string Required

    The User Defined Message in the form of URL-encoded JSON string.

  • IdempotencyKey string

    A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated.

Responses

  • 201 application/json

    Created

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created User Defined Message.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • call_sid string | null

      The SID of the Call the User Defined Message is associated with.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^CA[0-9a-fA-F]{32}$.

    • sid string | null

      The SID that uniquely identifies this User Defined Message.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^KX[0-9a-fA-F]{32}$.

    • date_created string(date-time-rfc-2822) | null

      The date that this User Defined Message was created, given in RFC 2822 format.

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)
{
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "sid": "KXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "Wed, 18 Dec 2019 20:02:01 +0000"
}