Create Conversation
Creates a conversation in an inbox with at least one thread.
How to define a customer
There are two ways how to define a customer when creating a conversations - either via id:
{
  "customer" : {
    "id" : 100
  }
}
or via email:
{
  "customer" : {
    "email" : "bear@acme.com",
    "firstName" : "Vernon",
    "lastName" : "Bear",
    ...
  }
}
If a customer with this email doesn’t exist yet, the API will create a new customer — using all the optional fields.
How to define a conversation owner
The conversation owner can be defined in multiple ways. If you want the conversation to be assigned to the specific user, it is as easy as providing that user’s ID in the payload:
{
  "assignTo": 234
}
If the conversation should be created with an assignee set according to the Inbox settings (for conversations with replies),
the request payload should not contain the assignTo field at all.
However, if you want to ensure the conversation remains unassigned regardless of the Inbox settings, then 
the request payload should contain the assignTo field explicitly set to null:
{
  "assignTo": null
}
Creating a draft conversation
To create a draft conversation, use the reply thread type with draft set to true.
Request
POST /v2/conversations HTTP/1.1
Authorization: Bearer oauth_token
Content-Type: application/json
{
  "subject" : "Subject",
  "customer" : {
    "email" : "bear@acme.com",
    "firstName" : "Vernon",
    "lastName" : "Bear"
  },
  "mailboxId" : 85,
  "type" : "email",
  "status" : "active",
  "createdAt" : "2012-10-10T12:00:00Z",
  "threads" : [ {
    "type" : "customer",
    "customer" : {
      "email" : "bear@acme.com"
    },
    "text" : "Hello, Help Scout. How are you?"
  } ],
  "tags" : [ "vip" ],
  "fields" : [ {
    "id" : 531,
    "value" : "trial"
  } ]
}
Request fields
| Path | Type | Required | Description | 
|---|---|---|---|
| subject | String | Y | Conversation’s subject | 
| autoReply | Boolean | N | The autoReplyrequest parameter enables auto replies to be sentwhen a conversation is created via the API. When autoReplyis set to true, an auto reply will be sentas long as there is at least one customerthread in the conversation. | 
| imported | Boolean | N | The importedfield enables conversation to be created for historical purposes(i.e. if moving from a different platform, you can import your history). When importedis set totrue, no outgoing emails or notifications will be generated. | 
| type | String | Y | Conversation type, one of: chatemailphone | 
| assignTo | Number | N | The Help Scout user assigned to the conversation. | 
| mailboxId | Number | Y | ID of a inbox where the conversation is being created | 
| status | String | Y | Conversation status, one of activeclosedpending | 
| createdAt | String | N | When this conversation was created - ISO 8601 date time | 
| customer | Object | Y | Customer associated with the conversation. Must contain a valid customer id or an email address. If the idfield is defined,the emailwill be ignored. If theidis not defined,emailis used to look up a customer.                  If a customer with the email in question does not exist a new one will be created, using all the optional fields and email.If a customer is matched either via idoremailfield, the rest of the optional fields is ignored. | 
| threads | Array | Y | Conversation threads. There has to be least one thread in a conversation | 
| tags | Array | N | List of tags to be be added to the conversation | 
| fields | Array | N | List of custom fields and values to be set for the conversation, see Update Custom Fields for details | 
| user | Number | N | ID of the user who is adding the conversation and threads. The resource owner is used when not set. The value can be also overridden for some thread types. | 
| closedAt | String | N | When the conversation was closed, only applicable for imported conversations - ISO 8601 date time | 
Request fields
| Path | Type | Required | Description | 
|---|---|---|---|
| id | Number | N | Customer ID | 
| email | String | N | Customer’s email | 
| firstName | String | N | First name of the customer. When defined it must be between 1 and 40 characters. | 
| lastName | String | N | Last name of the customer. When defined it must be between 1 and 40 characters. | 
| phone | String | N | Optional phone number that will be used when creating a new customer | 
| photoUrl | String | N | URL of the customer’s photo. Max length 200 characters. | 
| jobTitle | String | N | Job title. Max length 60 characters. | 
| photoType | String | N | Type of photo. Accepted values are: unknowngravatartwitterfacebookgoogleprofilegooglepluslinkedininstagram | 
| background | String | N | This is the Notes field from the user interface. Max length 200 characters. | 
| location | String | N | Location of the customer. Max length 60 characters. | 
| organization | String | N | Deprecated in favor of organizationId - please consider not using this field. Organization name. Max length 60 characters. Returned in GET requests for backward compatibility. Only used in POST/PUT requests if organizationId is not provided. | 
| organizationId | Number | N | Organization ID. Can be used to retrieve more organization data. | 
| gender | String | N | Gender of this customer. Accepted values are: malefemaleunknown | 
| age | String | N | Customer’s age | 
Threads
Every thread object has to have type field while the remaining fields
are defined in the documentation for individual threads:
| type | Request fields documentation | 
|---|---|
| note | Create Note | 
| chat | Create Chat | 
| phone | Create Phone | 
| reply | Create Reply | 
| customer | Create Customer Thread | 
Thread attachments
Note: The uploaded attachments will be scanned. In case of detecting malicious content, the affected attachments won’t be accessible.
Response
HTTP/1.1 201 Created
Resource-ID: 123
Location: https://api.helpscout.net/v2/conversations/123
Web-Location: https://secure.helpscout.net/conversation/123/89
Locked conversation - maximum number of threads
A single conversation can contain up to 100 threads. If you try to create conversation with more than 100 threads or add a thread to a conversation
that has 99 threads or more, the API will return HTTP 412 Precondition failed error.
Locked conversation - too old
Company policy can prevent old conversations to be updated. If you try to add a new thread to a conversation when
when this policy is active, the API will return HTTP 412 Precondition failed error.