# Convert a conversation to a ticket You can convert a conversation to a ticket. Endpoint: POST /conversations/{id}/convert 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" ## Path parameters: - `id` (integer, required) The id of the conversation to target Example: 123 ## Request fields (application/json): - `ticket_type_id` (string, required) The ID of the type of ticket you want to convert the conversation to Example: "1234" - `attributes` (object) The attributes set on the ticket. When setting the default title and description attributes, the attribute keys that should be used are and . When setting ticket type attributes of the list attribute type, the key should be the attribute name and the value of the attribute should be the list item id, obtainable by [listing the ticket type](ref:get_ticket-types). For example, if the ticket type has an attribute called of type , the key should be and the value of the attribute should be the guid of the list item (e.g. ). Example: {"_default_title_":"Found a bug","_default_description_":"The button is not working"} ## Response 200 fields (application/json): - `type` (string) Always ticket Enum: "ticket" - `id` (string) The unique identifier for the ticket which is given by Intercom. Example: "1295" - `ticket_id` (string) The ID of the Ticket used in the Intercom Inbox and Messenger. Do not use ticket_id for API queries. Example: "1390" - `category` (string) Category of the Ticket. Enum: "Customer", "Back-office", "Tracker" - `ticket_attributes` (object) An object containing the different attributes associated to the ticket as key-value pairs. For the default title and description attributes, the keys are and . Example: {"_default_title_":"Found a bug","_default_description_":"The button's not working"} - `ticket_state` (object,null) A ticket state, used to define the state of a ticket. - `ticket_state.type` (string) String representing the object's type. Always has the value . Example: "ticket_state" - `ticket_state.id` (string) The id of the ticket state Example: "12" - `ticket_state.category` (string) The category of the ticket state Enum: "submitted", "in_progress", "waiting_on_customer", "resolved" - `ticket_state.internal_label` (string) The state the ticket is currently in, in a human readable form - visible in Intercom Example: "With Dev Team" - `ticket_state.external_label` (string) The state the ticket is currently in, in a human readable form - visible to customers, in the messenger, email and tickets portal. Example: "In Progress" - `ticket_type` (object,null) A ticket type, used to define the data fields to be captured in a ticket. - `ticket_type.id` (string) The id representing the ticket type. Example: "1295" - `ticket_type.category` (string) Category of the Ticket Type. Enum: "Customer", "Back-office", "Tracker" - `ticket_type.name` (string) The name of the ticket type Example: "Bug" - `ticket_type.description` (string) The description of the ticket type Example: "A bug that has been reported." - `ticket_type.icon` (string) The icon of the ticket type Example: "🐞" - `ticket_type.workspace_id` (string) The id of the workspace that the ticket type belongs to. Example: "ecahpwf5" - `ticket_type.ticket_type_attributes` (object) A list of attributes associated with a given ticket type. - `ticket_type.ticket_type_attributes.ticket_type_attributes` (array) A list of ticket type attributes associated with a given ticket type. - `ticket_type.ticket_type_attributes.ticket_type_attributes.id` (string) The id representing the ticket type attribute. Example: "1" - `ticket_type.ticket_type_attributes.ticket_type_attributes.workspace_id` (string) The id of the workspace that the ticket type attribute belongs to. Example: "ecahpwf5" - `ticket_type.ticket_type_attributes.ticket_type_attributes.name` (string) The name of the ticket type attribute Example: "Title" - `ticket_type.ticket_type_attributes.ticket_type_attributes.description` (string) The description of the ticket type attribute Example: "Bug title." - `ticket_type.ticket_type_attributes.ticket_type_attributes.data_type` (string) The type of the data attribute (allowed values: "string list integer decimal boolean datetime files") Example: "string" - `ticket_type.ticket_type_attributes.ticket_type_attributes.input_options` (object) Input options for the attribute Example: "multiline: true" - `ticket_type.ticket_type_attributes.ticket_type_attributes.order` (integer) The order of the attribute against other attributes Example: 1 - `ticket_type.ticket_type_attributes.ticket_type_attributes.required_to_create` (boolean) Whether the attribute is required or not for teammates. - `ticket_type.ticket_type_attributes.ticket_type_attributes.required_to_create_for_contacts` (boolean) Whether the attribute is required or not for contacts. - `ticket_type.ticket_type_attributes.ticket_type_attributes.visible_on_create` (boolean) Whether the attribute is visible or not to teammates. - `ticket_type.ticket_type_attributes.ticket_type_attributes.visible_to_contacts` (boolean) Whether the attribute is visible or not to contacts. - `ticket_type.ticket_type_attributes.ticket_type_attributes.default` (boolean) Whether the attribute is built in or not. Example: true - `ticket_type.ticket_type_attributes.ticket_type_attributes.ticket_type_id` (integer) The id of the ticket type that the attribute belongs to. Example: 42 - `ticket_type.ticket_type_attributes.ticket_type_attributes.archived` (boolean) Whether the ticket type attribute is archived or not. - `ticket_type.ticket_type_attributes.ticket_type_attributes.created_at` (integer) The date and time the ticket type attribute was created. - `ticket_type.ticket_type_attributes.ticket_type_attributes.updated_at` (integer) The date and time the ticket type attribute was last updated. - `ticket_type.ticket_states` (object) A list of ticket states associated with a given ticket type. - `ticket_type.ticket_states.data` (array) A list of ticket states associated with a given ticket type. - `ticket_type.archived` (boolean) Whether the ticket type is archived or not. - `ticket_type.created_at` (integer) The date and time the ticket type was created. - `ticket_type.updated_at` (integer) The date and time the ticket type was last updated. - `contacts` (object) The list of contacts affected by a ticket. - `contacts.type` (string) always contact.list Enum: "contact.list" - `contacts.contacts` (array) The list of contacts affected by this ticket. - `contacts.contacts.type` (string) always contact Enum: "contact" - `contacts.contacts.id` (string) The unique identifier for the contact which is given by Intercom. Example: "5ba682d23d7cf92bef87bfd4" - `contacts.contacts.external_id` (string,null) The unique identifier for the contact which is provided by the Client. Example: "70" - `admin_assignee_id` (string) The id representing the admin assigned to the ticket. Example: "1295" - `team_assignee_id` (string) The id representing the team assigned to the ticket. Example: "1295" - `created_at` (integer) The time the ticket was created as a UTC Unix timestamp. Example: 1663597223 - `updated_at` (integer) The last time the ticket was updated as a UTC Unix timestamp. Example: 1663597260 - `open` (boolean) Whether or not the ticket is open. If false, the ticket is closed. Example: true - `snoozed_until` (integer) The time the ticket will be snoozed until as a UTC Unix timestamp. If null, the ticket is not currently snoozed. Example: 1663597260 - `linked_objects` (object) An object containing metadata about linked conversations and linked tickets. Up to 1000 can be returned. - `linked_objects.type` (string) Always list. Enum: "list" - `linked_objects.total_count` (integer) The total number of linked objects. Example: 100 - `linked_objects.has_more` (boolean) Whether or not there are more linked objects than returned. - `linked_objects.data` (array) An array containing the linked conversations and linked tickets. - `linked_objects.data.type` (string) ticket or conversation Enum: "ticket", "conversation" - `linked_objects.data.id` (string) The ID of the linked object Example: "7583" - `linked_objects.data.category` (string,null) Category of the Linked Ticket Object. Enum: "Customer", "Back-office", "Tracker", null - `ticket_parts` (object) A list of Ticket Part objects for each note and event in the ticket. There is a limit of 500 parts. - `ticket_parts.type` (string) Enum: "ticket_part.list" - `ticket_parts.ticket_parts` (array) A list of Ticket Part objects for each ticket. There is a limit of 500 parts. - `ticket_parts.ticket_parts.type` (string) Always ticket_part Example: "ticket_part" - `ticket_parts.ticket_parts.id` (string) The id representing the ticket part. Example: "3" - `ticket_parts.ticket_parts.part_type` (string) The type of ticket part. Example: "comment" - `ticket_parts.ticket_parts.body` (string,null) The message body, which may contain HTML. Example: "

Okay!

" - `ticket_parts.ticket_parts.previous_ticket_state` (string) The previous state of the ticket. Enum: "submitted", "in_progress", "waiting_on_customer", "resolved" - `ticket_parts.ticket_parts.ticket_state` (string) The state of the ticket. Enum: "submitted", "in_progress", "waiting_on_customer", "resolved" - `ticket_parts.ticket_parts.created_at` (integer) The time the ticket part was created. Example: 1663597223 - `ticket_parts.ticket_parts.updated_at` (integer) The last time the ticket part was updated. Example: 1663597260 - `ticket_parts.ticket_parts.assigned_to` (object) reference to another object - `ticket_parts.ticket_parts.assigned_to.id` (string,null) Example: "1a2b3c" - `ticket_parts.ticket_parts.author` (object) The author that wrote or triggered the part. Can be a bot, admin, team or user. - `ticket_parts.ticket_parts.author.type` (string) The type of the author Enum: "admin", "bot", "team", "user" - `ticket_parts.ticket_parts.author.id` (string) The id of the author Example: "274" - `ticket_parts.ticket_parts.author.name` (string,null) The name of the author Example: "Operator" - `ticket_parts.ticket_parts.author.email` (string) The email of the author Example: "operator+abcd1234@intercom.io" - `ticket_parts.ticket_parts.attachments` (array) A list of attachments for the part. - `ticket_parts.ticket_parts.attachments.type` (string) The type of attachment Example: "upload" - `ticket_parts.ticket_parts.attachments.name` (string) The name of the attachment Example: "example.png" - `ticket_parts.ticket_parts.attachments.url` (string) The URL of the attachment Example: "https://picsum.photos/200/300" - `ticket_parts.ticket_parts.attachments.content_type` (string) The content type of the attachment Example: "image/png" - `ticket_parts.ticket_parts.attachments.filesize` (integer) The size of the attachment Example: 100 - `ticket_parts.ticket_parts.attachments.width` (integer) The width of the attachment Example: 100 - `ticket_parts.ticket_parts.attachments.height` (integer) The height of the attachment Example: 100 - `ticket_parts.ticket_parts.external_id` (string,null) The external id of the ticket part Example: "abcd1234" - `ticket_parts.ticket_parts.redacted` (boolean) Whether or not the ticket part has been redacted. - `ticket_parts.ticket_parts.app_package_code` (string) The app package code if this part was created via API. Note this field won't show if the part was not created via API. Example: "text-integration" - `ticket_parts.total_count` (integer) Example: 2 - `is_shared` (boolean) Whether or not the ticket is shared with the customer. Example: true ## Response 400 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"