Create message
TODO: Resource-level docs
Headers
-
X-Twilio-Webhook-Enabled string
The X-Twilio-Webhook-Enabled HTTP request header
Values are
true
orfalse
.
Body
-
Attributes string
-
Body string
-
DateCreated string(date-time)
-
DateUpdated string(date-time)
-
From string
-
LastUpdatedBy string
-
MediaSid string
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^ME[0-9a-fA-F]{32}$
.
POST /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages
curl \
-X POST https://ip-messaging.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "X-Twilio-Webhook-Enabled: true" \
-d 'Attributes=string&Body=string&DateCreated=2023-05-04T09%3A42%3A00%2B00%3A00&DateUpdated=2023-05-04T09%3A42%3A00%2B00%3A00&From=string&LastUpdatedBy=string&MediaSid=string'
Request example
# Headers
X-Twilio-Webhook-Enabled: true
# Payload
{
"Attributes": "string",
"Body": "string",
"DateCreated": "2023-05-04T09:42:00+00:00",
"DateUpdated": "2023-05-04T09:42:00+00:00",
"From": "string",
"LastUpdatedBy": "string",
"MediaSid": "string"
}
Request examples
# Headers
X-Twilio-Webhook-Enabled: true
# Payload
{
"Attributes": "string",
"Body": "string",
"DateCreated": "2024-05-04T09:42:00+00:00",
"DateUpdated": "2024-05-04T09:42:00+00:00",
"From": "string",
"LastUpdatedBy": "string",
"MediaSid": "string"
}
Response examples (201)
{
"account_sid": "string",
"attributes": "string",
"body": "string",
"channel_sid": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"from": "string",
"index": 42,
"last_updated_by": "string",
"service_sid": "string",
"sid": "string",
"to": "string",
"type": "string",
"url": "https://example.com",
"was_edited": true
}
Response examples (201)
{
"account_sid": "string",
"attributes": "string",
"body": "string",
"channel_sid": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"from": "string",
"index": 42,
"last_updated_by": "string",
"service_sid": "string",
"sid": "string",
"to": "string",
"type": "string",
"url": "https://example.com",
"was_edited": true
}