---
title: "/tickets"
method: POST
path: "/tickets"
tags: ["Tickets"]
---

# /tickets

`POST /tickets`

## Request

- Base URL: `<<api-url>>` (relative, and the document’s source URL is not known)
- URL: `<<api-url>>/tickets`
- Auth: API key in header `X-API-KEY`

Create a new ticket

## Headers

- `octa-agent-email` string

## Request body

- TicketDTO
  - `summary` string, required: Ticket summary
  - `description` string, required: Ticket description
  - `status` Status: Current ticket status
    - `id` string, required: Status ID
    - `name` string, required: Status name
  - `channel` Channel: Ticket channel
    - `id` string, required: Channel ID
    - `name` string, required: Channel name
  - `type` TicketType: Ticket type
    - `id` string, required: Type ID
    - `name` string, required: Type name
  - `requester` Requester: Requester
    - `id` string, required: Requester ID
    - `name` string, required: Requester name
    - `email` string, required: Requester email
    - `customField` CustomFields[], required: Requester custom fields
      - `key` string, required: Key of the field
      - `value` union, required: Value of the field
        - string
        - number
        - boolean
  - `group` Group: The group to which the ticket belongs
    - `id` string, required: Group ID
    - `name` string, required: Group name
  - `form` TicketForm: Ticket form
    - `id` string, required: Form ID
    - `name` string: Form name
  - `priority` Priority: The priority of the ticket
    - `id` string, required: Priority ID
    - `name` string, required: Priority name
  - `organization` Organization
    - `id` string, required: Organization ID
    - `name` string, required: Organization name
    - `customField` CustomFields[], required: Organization custom fields
      - `key` string, required: Key of the field
      - `value` union, required: Value of the field
        - string
        - number
        - boolean
  - `assigned` Assigned: Agent assigned to ticket
    - `id` string, required: Agent ID
    - `name` string, required: Agent name
    - `email` string, required: Agent email
  - `participatingAssigned` Assigned[]: Agents assigned to ticket
    - `id` string, required: Agent ID
    - `name` string, required: Agent name
    - `email` string, required: Agent email
  - `cc` string[]
  - `cco` string[]
  - `tags` string[]
  - `customField` CustomFields[]: Ticket custom fields
    - `key` string, required: Key of the field
    - `value` union, required: Value of the field
      - string
      - number
      - boolean
  - `apps` App[]
    - `id` string, required: App ID
    - `name` string, required: App name
    - `customField` CustomFields[], required: App custom fields
      - `key` string, required: Key of the field
      - `value` union, required: Value of the field
        - string
        - number
        - boolean
  - `attachments` AttachmentSend[]: Attached files
    - `name` string, required: Name of the attachment sent
    - `base64` string: The attachment content encoded in Base64. Ensure that the string only contains the Base64 encoded data without any metadata like "data:image/png;base64,". Required if url is not provided.
    - `mimeType` string: The MIME type of the attachment, which indicates the format of the file. This is important for correctly interpreting the attachment. Common examples include "application/pdf", "image/png", "text/plain". Required if base64 is provided.
    - `url` string: URL of the attachment. Must be from a Octadesk bucket. Provide either url OR base64+mimeType.

## Response `201`

- TicketPayload
  - `id` string: Ticket ID
  - `number` number: Ticket number
  - `summary` string, required: Ticket summary
  - `description` string, required: Ticket description
  - `status` Status: Current ticket status
    - `id` string, required: Status ID
    - `name` string, required: Status name
  - `channel` Channel: Ticket channel
    - `id` string, required: Channel ID
    - `name` string, required: Channel name
  - `type` TicketType: Ticket type
    - `id` string, required: Type ID
    - `name` string, required: Type name
  - `requester` Requester: Requester
    - `id` string, required: Requester ID
    - `name` string, required: Requester name
    - `email` string, required: Requester email
    - `customField` CustomFields[], required: Requester custom fields
      - `key` string, required: Key of the field
      - `value` union, required: Value of the field
        - string
        - number
        - boolean
  - `group` Group: The group to which the ticket belongs
    - `id` string, required: Group ID
    - `name` string, required: Group name
  - `form` TicketForm: Ticket form
    - `id` string, required: Form ID
    - `name` string: Form name
  - `priority` Priority: The priority of the ticket
    - `id` string, required: Priority ID
    - `name` string, required: Priority name
  - `organization` Organization
    - `id` string, required: Organization ID
    - `name` string, required: Organization name
    - `customField` CustomFields[], required: Organization custom fields
      - `key` string, required: Key of the field
      - `value` union, required: Value of the field
        - string
        - number
        - boolean
  - `assigned` Assigned: Agent assigned to ticket
    - `id` string, required: Agent ID
    - `name` string, required: Agent name
    - `email` string, required: Agent email
  - `participatingAssigned` Assigned[]: Agents assigned to ticket
    - `id` string, required: Agent ID
    - `name` string, required: Agent name
    - `email` string, required: Agent email
  - `cc` string[]
  - `cco` string[]
  - `tags` string[]
  - `createdAt` string, date-time: Ticket opening date
  - `resolutionDate` string, date-time: Ticket resolution/closed date
  - `interactionsCount` number: Interaction quantities on the ticket
  - `totalEmployeeInteractions` number, required: Total employee interactions on the ticket
  - `timePerAssigned` string: Time per assigned (from SLA)
  - `timePerGroupAssigned` string: Time per group assigned (from SLA)
  - `updatedAt` string, date-time: Ticket last updated date
  - `updatedBy` PersonTicket: Last person to update ticket
    - `id` string, required: Person ID
    - `name` string, required: Person name
    - `email` string, required: Person email
  - `customField` CustomFields[]: Ticket custom fields
    - `key` string, required: Key of the field
    - `value` union, required: Value of the field
      - string
      - number
      - boolean
  - `apps` App[]
    - `id` string, required: App ID
    - `name` string, required: App name
    - `customField` CustomFields[], required: App custom fields
      - `key` string, required: Key of the field
      - `value` union, required: Value of the field
        - string
        - number
        - boolean
  - `lastInteraction` Interaction, required
    - `id` string, required: Interaction ID
    - `person` PersonTicket, required
      - `id` string, required: Person ID
      - `name` string, required: Person name
      - `email` string, required: Person email
    - `createdAt` string, date-time, required: Interaction created date
    - `comments` InteractionComment[], required: Interaction comments
      - `title` string, required: Comment title
      - `content` string, required: Comment body
      - `type` number, required: Comment type
      - `multiChannelType` number, required
      - `isPublic` boolean, required: If comment is public
    - `attachments` Attachment[], required: Interaction attachments
      - `id` string, required: The attachment id
      - `name` string: Name of the attachment sent
      - `url` string: Attachment link in Octadesk files
    - `propertiesChanges` PropertiesChanges, required
      - `assigned` string, required: Assigned name
      - `channel` string, required: Channel name
      - `requester` string, required: Requester name
      - `organization` string, required: Organization name
      - `status` string, required: Status name
      - `tags` string, required: Tags name
      - `form` string, required: Form name
  - `lastHumanInteraction` Interaction, required
    - `id` string, required: Interaction ID
    - `person` PersonTicket, required
      - `id` string, required: Person ID
      - `name` string, required: Person name
      - `email` string, required: Person email
    - `createdAt` string, date-time, required: Interaction created date
    - `comments` InteractionComment[], required: Interaction comments
      - `title` string, required: Comment title
      - `content` string, required: Comment body
      - `type` number, required: Comment type
      - `multiChannelType` number, required
      - `isPublic` boolean, required: If comment is public
    - `attachments` Attachment[], required: Interaction attachments
      - `id` string, required: The attachment id
      - `name` string: Name of the attachment sent
      - `url` string: Attachment link in Octadesk files
    - `propertiesChanges` PropertiesChanges, required
      - `assigned` string, required: Assigned name
      - `channel` string, required: Channel name
      - `requester` string, required: Requester name
      - `organization` string, required: Organization name
      - `status` string, required: Status name
      - `tags` string, required: Tags name
      - `form` string, required: Form name
  - `attachments` Attachment[]: Attached files
    - `id` string, required: The attachment id
    - `name` string: Name of the attachment sent
    - `url` string: Attachment link in Octadesk files
  - `product` Product: Ticket product
    - `id` string, required: Product ID
    - `sku` string, required: Product SKU
    - `name` string, required: Product name
    - `customField` CustomField[], required: Fields to be used on the template (key / value)
      - `key` string, required: Key of the field (as it is shown inside octadesk)
      - `value` union, required: Value to use on the template
        - string
        - number

---

[API](https://skmtc.dev/octadesk/apis/octadesk-api.md) - [All operations](https://skmtc.dev/octadesk/apis/octadesk-api/llms.txt) - [OpenAPI document](https://skmtc.dev/octadesk/apis/octadesk-api/revisions/cf3224b37a34?raw)
