Create Conversation
Create a new conversation in your account's default service
Authorization
accountSid_authToken In: header
Header Parameters
The X-Twilio-Webhook-Enabled HTTP request header
Value in
- "true"
- "false"
Request Body
application/x-www-form-urlencoded
The human-readable name of this conversation, limited to 256 characters. Optional.
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.
The date that this resource was created.
date-timeThe date that this resource was last updated.
date-timeThe unique ID of the Messaging Service this conversation belongs to.
^MG[0-9a-fA-F]{32}$34 <= length <= 34An 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.
Current state of this conversation. Can be either initializing, active, inactive or closed and defaults to active
Value in
- "initializing"
- "inactive"
- "active"
- "closed"
ISO8601 duration when conversation will be switched to inactive state. Minimum value for this timer is 1 minute.
ISO8601 duration when conversation will be switched to closed state. Minimum value for this timer is 10 minutes.
The default email address that will be used when sending outbound emails in this conversation.
The default name that will be used when sending outbound emails in this conversation.
Response Body
application/json
curl -X POST "https://example.com/v1/Conversations" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'FriendlyName=friendly_name&UniqueName=unique_name&Attributes=%7B+%22topic%22%3A+%22feedback%22+%7D&DateCreated=2015-12-16T22%3A18%3A37Z&DateUpdated=2015-12-16T22%3A18%3A38Z&MessagingServiceSid=MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&State=inactive&Timers.Inactive=PT1M&Timers.Closed=PT10M'{ "sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "friendly_name", "unique_name": "unique_name", "attributes": "{ \"topic\": \"feedback\" }", "date_created": "2015-12-16T22:18:37Z", "date_updated": "2015-12-16T22:18:38Z", "state": "inactive", "timers": { "date_inactive": "2015-12-16T22:19:38Z", "date_closed": "2015-12-16T22:28:38Z" }, "bindings": {}, "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants", "messages": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages", "webhooks": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks", "export": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Export" }}