# Creates a conversation You can create a conversation that has been initiated by a contact (ie. user or lead). The conversation can be an in-app message only. {% admonition type="info" name="Sending for visitors" %} You can also send a message from a visitor by specifying their or value in the field, along with a field value of . This visitor will be automatically converted to a contact with a lead role once the conversation is created. {% /admonition %} This will return the Message model that has been created. Endpoint: POST /conversations Version: 2.13 Security: bearerAuth ## Header parameters: - `Intercom-Version` (string) Intercom API version.By default, it's equal to the version set in the app package. Enum: "1.0", "1.1", "1.2", "1.3", "1.4", "2.0", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "Unstable" ## Request fields (application/json): - `from` (object, required) - `from.type` (string, required) The role associated to the contact - user or lead. Enum: "lead", "user", "contact" - `from.id` (string, required) The identifier for the contact which is given by Intercom. Example: "536e564f316c83104c000020" - `body` (string, required) The content of the message. HTML is not supported. Example: "Hello" - `created_at` (integer) The time the conversation was created as a UTC Unix timestamp. If not provided, the current time will be used. This field is only recommneded for migrating past conversations from another source into Intercom. Example: 1671028894 ## Response 200 fields (application/json): - `type` (string, required) The type of the message Example: "user_message" - `id` (string, required) The id representing the message. Example: "1488971108" - `created_at` (integer, required) The time the conversation was created. Example: 1667560812 - `subject` (string) The subject of the message. Only present if message_type: email. Example: "Greetings" - `body` (string, required) The message body, which may contain HTML. Example: "Hello" - `message_type` (string, required) The type of message that was sent. Can be email, inapp, facebook or twitter. Enum: "email", "inapp", "facebook", "twitter" - `conversation_id` (string) The associated conversation_id Example: "64619700005570" ## Response 401 fields (application/json): - `type` (string, required) The type is error.list Example: "error.list" - `request_id` (string,null) Example: "f93ecfa8-d08a-4325-8694-89aeb89c8f85" - `errors` (array, required) An array of one or more error objects - `errors.code` (string, required) A string indicating the kind of error, used to further qualify the HTTP response code Example: "unauthorized" - `errors.message` (string,null) Optional. Human readable description of the error. Example: "Access Token Invalid" - `errors.field` (string,null) Optional. Used to identify a particular field or query parameter that was in error. Example: "email" ## Response 403 fields (application/json): - `type` (string, required) The type is error.list Example: "error.list" - `request_id` (string,null) Example: "f93ecfa8-d08a-4325-8694-89aeb89c8f85" - `errors` (array, required) An array of one or more error objects - `errors.code` (string, required) A string indicating the kind of error, used to further qualify the HTTP response code Example: "unauthorized" - `errors.message` (string,null) Optional. Human readable description of the error. Example: "Access Token Invalid" - `errors.field` (string,null) Optional. Used to identify a particular field or query parameter that was in error. Example: "email" ## Response 404 fields (application/json): - `type` (string, required) The type is error.list Example: "error.list" - `request_id` (string,null) Example: "f93ecfa8-d08a-4325-8694-89aeb89c8f85" - `errors` (array, required) An array of one or more error objects - `errors.code` (string, required) A string indicating the kind of error, used to further qualify the HTTP response code Example: "unauthorized" - `errors.message` (string,null) Optional. Human readable description of the error. Example: "Access Token Invalid" - `errors.field` (string,null) Optional. Used to identify a particular field or query parameter that was in error. Example: "email"