> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thena.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a new ticket draft



## OpenAPI

````yaml post /v1/tickets/draft
openapi: 3.0.0
info:
  title: Thena Platform
  description: The Thena Platform API description
  version: '1.0'
  contact: {}
servers:
  - url: https://platform.thena.ai
    description: production
security:
  - bearerAuth: []
tags:
  - name: Thena Platform APIs
    description: ''
paths:
  /v1/tickets/draft:
    post:
      tags:
        - Draft Tickets
      summary: Create a new ticket draft
      operationId: TicketDraftController_createTicketDraft
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDraftTicketDto'
      responses:
        '201':
          description: Operation successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DraftTicketResponseDto'
        '401':
          description: User is not authenticated!
        '403':
          description: User does not have access to this resource!
        '404':
          description: Resource not found!
        '429':
          description: Too many requests!
        '500':
          description: Something went wrong!
        '503':
          description: This service/resource is currently unavailable.
components:
  schemas:
    CreateDraftTicketDto:
      type: object
      properties:
        assignedAgentId:
          type: string
          description: The ID of the assigned agent
        description:
          type: string
          description: The description of the ticket
        submitterEmail:
          type: string
          description: The email of the submitter
        statusId:
          type: string
          description: The ID of the status
        priorityId:
          type: string
          description: The ID of the priority
        typeId:
          type: string
          description: The ID of the type
        isPrivate:
          type: boolean
          description: Whether the ticket is private
        attachmentUrls:
          description: The attachment URLs
          type: array
          items:
            type: string
        customFieldValues:
          description: The custom field values
          type: array
          items:
            $ref: '#/components/schemas/ExternalCustomFieldValuesDto'
        metadata:
          type: object
          description: Additional metadata for the draft
        title:
          type: string
          description: The title of the ticket
        requestorEmail:
          type: string
          description: The email of the requestor
        accountId:
          type: string
          description: The ID of the account
        teamId:
          type: string
          description: The ID of the team
        draftScope:
          type: string
          description: The scope of the draft
          enum:
            - personal
            - team
          default: personal
      required:
        - title
        - requestorEmail
        - teamId
        - draftScope
    DraftTicketResponseDto:
      type: object
      properties:
        uid:
          type: string
        status:
          type: string
        draftScope:
          type: string
        entityType:
          type: string
        content:
          type: object
        metadata:
          type: object
        createdBy:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        lastModifiedBy:
          type: string
      required:
        - uid
        - status
        - draftScope
        - entityType
        - content
        - metadata
        - createdBy
        - createdAt
        - updatedAt
    ExternalCustomFieldValuesDto:
      type: object
      properties: {}
  securitySchemes:
    bearerAuth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Enter the bearer token

````