Create a new message Interaction to send directly from your system to one [Participant](https://www.twilio.com/docs/proxy/api/participant). The `inbound` properties for the Interaction will always be empty.

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/proxy/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"Proxy MCP server": {
  "url": "https://twilio.demo.bump-doc.com/doc/proxy/mcp"
}
Close
POST /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions

Create a new message Interaction to send directly from your system to one Participant. The inbound properties for the Interaction will always be empty.

Path parameters

  • ServiceSid string Required

    The SID of the parent Service resource.

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

  • SessionSid string Required

    The SID of the parent Session resource.

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

  • ParticipantSid string Required

    The SID of the Participant resource.

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

application/x-www-form-urlencoded

Body

  • Body string

    The message to send to the participant

  • MediaUrl array[string(uri)]

    Reserved. Not currently supported.

Responses

  • 200 application/json

    OK

    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
    • sid string | null

      The unique string that we created to identify the MessageInteraction resource.

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

    • session_sid string | null

      The SID of the parent Session resource.

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

    • service_sid string | null

      The SID of the parent Service resource.

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

    • account_sid string | null

      The SID of the Account that created the MessageInteraction resource.

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

    • data string | null

      A JSON string that includes the message body sent to the participant. (e.g. {"body": "hello"})

    • type string

      The Type of Message Interaction. This value is always message.

      Values are message, voice, or unknown.

    • participant_sid string | null

      The SID of the Participant resource.

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

    • inbound_participant_sid string | null

      Always empty for created Message Interactions.

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

    • inbound_resource_sid string | null

      Always empty for created Message Interactions.

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

    • inbound_resource_status string

      Always empty for created Message Interactions.

      Values are accepted, answered, busy, canceled, completed, deleted, delivered, delivery-unknown, failed, in-progress, initiated, no-answer, queued, received, receiving, ringing, scheduled, sending, sent, undelivered, or unknown.

    • inbound_resource_type string | null

      Always empty for created Message Interactions.

    • inbound_resource_url string(uri) | null

      Always empty for created Message Interactions.

    • outbound_participant_sid string | null

      The SID of the outbound Participant resource.

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

    • outbound_resource_sid string | null

      The SID of the outbound Message resource.

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

    • outbound_resource_status string

      Always empty for created Message Interactions.

      Values are accepted, answered, busy, canceled, completed, deleted, delivered, delivery-unknown, failed, in-progress, initiated, no-answer, queued, received, receiving, ringing, scheduled, sending, sent, undelivered, or unknown.

    • outbound_resource_type string | null

      The outbound resource type. This value is always Message.

    • outbound_resource_url string(uri) | null

      The URL of the Twilio message resource.

    • date_created string(date-time) | null

      The ISO 8601 date and time in GMT when the resource was created.

    • date_updated string(date-time) | null

      The ISO 8601 date and time in GMT when the resource was last updated.

    • url string(uri) | null

      The absolute URL of the MessageInteraction resource.

POST /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions
curl \
 --request POST 'https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'Body=some+message'
Request example
{"Body" => "some message"}
Response examples (200)
{
  "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "data": "{\"body\":\"some message\"}",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "participant_sid": "KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "inbound_participant_sid": null,
  "inbound_resource_sid": null,
  "inbound_resource_status": null,
  "inbound_resource_type": null,
  "inbound_resource_url": null,
  "outbound_participant_sid": "KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "outbound_resource_sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "outbound_resource_status": "sent",
  "outbound_resource_type": "Message",
  "outbound_resource_url": null,
  "sid": "KIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "type": "message",
  "url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sessions/KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessageInteractions/KIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "session_sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}