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

# Create a new ticket

> Create a new ticket in a project. Every field is optional. Common fields include: `title`, `description`,
`type` (BUG, FEATURE_REQUEST, etc.), `status`, `priority` (LOW, MEDIUM, HIGH), `session` (contact/session ID
if manually added), and `customData` (custom fields). Use `linkedTickets` to reference existing tickets.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /tickets
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /tickets:
    post:
      tags:
        - Ticket
      summary: Create a new ticket
      description: >-
        Create a new ticket in a project. Every field is optional. Common fields
        include: `title`, `description`,

        `type` (BUG, FEATURE_REQUEST, etc.), `status`, `priority` (LOW, MEDIUM,
        HIGH), `session` (contact/session ID

        if manually added), and `customData` (custom fields). Use
        `linkedTickets` to reference existing tickets.
      operationId: CreateTicket
      parameters:
        - in: header
          name: project
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTicketDto'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema: {}
              examples:
                Example 1:
                  value:
                    _id: 507f1f77bcf86cd799439011
                    id: 507f1f77bcf86cd799439011
                    bugId: 42
                    title: Login button not working
                    description: Users cannot log in when clicking the login button
                    type: BUG
                    status: OPEN
                    priority: HIGH
                    archived: false
                    isSpam: false
                    shareToken: ubjvxvxpuvz7d9zwqyi9v4jekjif5skn
                    project: 507f1f77bcf86cd799439010
                    session: 507f1f77bcf86cd799439013
                    customData:
                      browser: Chrome
                      version: 120.0.0.0
                    createdAt: '2024-01-15T10:30:00.000Z'
                    updatedAt: '2024-01-15T10:30:00.000Z'
      security:
        - jwt: []
components:
  schemas:
    CreateTicketDto:
      properties:
        title:
          type: string
        conversationClosed:
          type: boolean
        bot:
          $ref: '#/components/schemas/BotDto'
        content: {}
        plainContent:
          type: string
        imageUrl:
          type: string
        description:
          type: string
        latestComment:
          type: string
        latestPublicComment:
          type: string
        slaBreached:
          type: boolean
        hidden:
          type: boolean
        needInitialPush:
          type: boolean
        noHumanInteraction:
          type: boolean
        snoozed:
          type: boolean
        snoozedUntil:
          type: string
          format: date-time
          nullable: true
        processingUser:
          type: string
        processingTeam:
          type: string
        queued:
          type: boolean
        queuedAt:
          type: string
          format: date-time
        mentions:
          items:
            type: string
          type: array
        emailRefs:
          items: {}
          type: array
        attributes: {}
        formData: {}
        form: {}
        aiSummary:
          type: string
        aiSupportSummary:
          type: string
        dueDate:
          anyOf:
            - type: string
              format: date-time
            - type: string
        linkedTickets:
          items:
            type: string
          type: array
        duplicateOf:
          type: string
        duplicatesCount:
          type: number
          format: double
        session: {}
        sessions:
          items: {}
          type: array
        outbound:
          type: string
        priority:
          $ref: '#/components/schemas/BugPriority'
        type:
          type: string
        sentiment:
          $ref: '#/components/schemas/Sentiment'
        status:
          type: string
        shareToken:
          type: string
        secretShareToken:
          type: string
        lexorank:
          type: string
        bugId:
          type: number
          format: double
        project:
          type: string
        organisation:
          type: string
        screenshotUrl:
          type: string
        screenshotBroke:
          type: string
          format: date-time
        generatingScreenshot:
          type: boolean
        screenshotRenderingFailed:
          type: boolean
        screenshotLive:
          type: boolean
        screenshotDataUrl: {}
        isSilent:
          type: boolean
        replayDataUrl:
          type: string
        replayUrl:
          type: string
        generatingReplay:
          type: boolean
        replayStartDate:
          type: string
          format: date-time
        replayRenderingStartedAt:
          type: string
          format: date-time
        replayRenderingFailed:
          type: boolean
        replayLive:
          type: boolean
        originalEmailContent:
          type: string
        hasWebReplay:
          type: boolean
        integrations: {}
        metaData: {}
        actionLog: {}
        customData: {}
        replay: {}
        lastResponse:
          $ref: '#/components/schemas/LastResponseDto'
        attachments:
          items:
            $ref: '#/components/schemas/AttachmentDto'
          type: array
        lastNotification:
          type: string
          format: date-time
        faqSuggested:
          type: boolean
        notificationsUnread:
          type: boolean
        sessionNotificationsUnread:
          type: boolean
        hasAgentReply:
          type: boolean
        conversationRating:
          type: number
          format: double
        upvotesCount:
          type: number
          format: double
        upvotes:
          items:
            $ref: '#/components/schemas/UpvoteDto'
          type: array
        screenRecordingUrl:
          type: string
        firstAssignmentAt:
          type: string
          format: date-time
        archived:
          type: boolean
        archivedAt:
          type: string
          format: date-time
        disabled:
          type: boolean
        isSpam:
          type: boolean
        tags:
          items:
            type: string
          type: array
        score:
          type: number
          format: double
        channel:
          $ref: '#/components/schemas/TicketChannelDto'
        manuallyAdded:
          type: boolean
        fromData: {}
        consoleLog: {}
        customEventLog: {}
        networkLogs: {}
        isManualStart:
          type: boolean
        botId:
          type: string
        preventAutoReply:
          type: boolean
        skipDuplicateCheck:
          type: boolean
          description: |-
            FEATURE_REQUEST creates run a duplicate guard (409 with the existing
            request's payload). Pass true to opt out deliberately (e.g. a human
            already reviewed the suggestions).
        pipelineEntry:
          items:
            type: string
          type: array
          description: >-
            CRM pipeline entries to link this ticket to. Verified against the
            project in

            createTicket — foreign or unknown ids are dropped, never an error. A
            ticket

            may sit on several entries at once (one shared task blocking several
            deals).
      type: object
      additionalProperties: false
    BotDto:
      properties:
        active:
          type: boolean
        currentBot:
          type: string
        currentActionFlow:
          type: string
        currentAction:
          type: number
          format: double
        forwardedToSupportAt:
          type: string
          format: date-time
        kaiActive:
          type: boolean
        noAnswerFound:
          type: boolean
      type: object
      additionalProperties: false
    BugPriority:
      enum:
        - LOW
        - MEDIUM
        - HIGH
      type: string
    Sentiment:
      enum:
        - positive
        - negative
        - neutral
      type: string
    LastResponseDto:
      properties:
        contact:
          type: string
          format: date-time
        admin:
          type: string
          format: date-time
      type: object
      additionalProperties: false
    AttachmentDto:
      properties:
        name:
          type: string
        url:
          type: string
        type:
          type: string
      required:
        - name
        - url
      type: object
      additionalProperties: false
    UpvoteDto:
      properties:
        email:
          type: string
      type: object
      additionalProperties: false
    TicketChannelDto:
      properties:
        id:
          type: string
        type:
          type: string
        metaData: {}
      required:
        - id
      type: object
      additionalProperties: false
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````