Create a new conversation in your account's default service
A Conversation resource represents an omnichannel group conversation with an ordered list of messages and a participant roster.
Create a new conversation in your account's default service
Body
-
An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned.
-
The date that this resource was created.
-
The date that this resource was last updated.
-
The human-readable name of this conversation, limited to 256 characters. Optional.
-
The unique ID of the Messaging Service this conversation belongs to.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^MG[0-9a-fA-F]{32}$
. -
Current state of this conversation. Can be either
active
,inactive
orclosed
and defaults toactive
Values are
inactive
,active
, orclosed
. -
ISO8601 duration when conversation will be switched to
closed
state. Minimum value for this timer is 10 minutes. -
ISO8601 duration when conversation will be switched to
inactive
state. Minimum value for this timer is 1 minute. -
An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's
sid
in the URL.
curl \
-X POST https://conversations.twilio.com/v1/Conversations \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "X-Twilio-Webhook-Enabled: true" \
-d 'Attributes=string&DateCreated=2023-05-04T09%3A42%3A00%2B00%3A00&DateUpdated=2023-05-04T09%3A42%3A00%2B00%3A00&FriendlyName=string&MessagingServiceSid=string&State=inactive&Timers.Closed=string&Timers.Inactive=string&UniqueName=string'
# Headers
X-Twilio-Webhook-Enabled: true
# Payload
{
"Attributes": "string",
"DateCreated": "2023-05-04T09:42:00+00:00",
"DateUpdated": "2023-05-04T09:42:00+00:00",
"FriendlyName": "string",
"MessagingServiceSid": "string",
"State": "inactive",
"Timers.Closed": "string",
"Timers.Inactive": "string",
"UniqueName": "string"
}
# Headers
X-Twilio-Webhook-Enabled: true
# Payload
{
"Attributes": "string",
"DateCreated": "2025-05-04T09:42:00Z",
"DateUpdated": "2025-05-04T09:42:00Z",
"FriendlyName": "string",
"MessagingServiceSid": "string",
"State": "inactive",
"Timers.Closed": "string",
"Timers.Inactive": "string",
"UniqueName": "string"
}
{
"account_sid": "string",
"attributes": "string",
"chat_service_sid": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"friendly_name": "string",
"links": {},
"messaging_service_sid": "string",
"sid": "string",
"state": "inactive",
"unique_name": "string",
"url": "https://example.com"
}
{
"account_sid": "string",
"attributes": "string",
"chat_service_sid": "string",
"date_created": "2025-05-04T09:42:00Z",
"date_updated": "2025-05-04T09:42:00Z",
"friendly_name": "string",
"links": {},
"messaging_service_sid": "string",
"sid": "string",
"state": "inactive",
"unique_name": "string",
"url": "https://example.com"
}