> ## 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.

# Unarchive a ticket

> Unarchive a ticket for standard and enterprise tier organizations.



## OpenAPI

````yaml patch /v1/tickets/{id}/unarchive
openapi: 3.0.0
info:
  title: Thena Platform
  description: The Thena Platform API description
  version: 1.0.0
  contact: {}
servers:
  - url: https://platform.thena.ai
    description: Platform
  - url: http://localhost:8000
    description: Local
security:
  - ApiKey: []
tags: []
paths:
  /v1/tickets/{id}/unarchive:
    patch:
      tags:
        - Tickets
      description: Unarchive a ticket for standard and enterprise tier organizations.
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: Operation successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonTicketResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  error:
                    type: string
                    example: Bad Request
                  message:
                    type: string
                    example: Ticket is not archived!
        '401':
          description: User is not authenticated!
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 403
                  error:
                    type: string
                    example: Forbidden
                  message:
                    type: string
                    example: You are not authorized to unarchive this ticket!
        '404':
          description: Ticket not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  error:
                    type: string
                    example: Not Found
                  message:
                    type: string
                    example: Ticket not found!
        '429':
          description: Too many requests!
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: Failed to unarchive ticket, please try again later!
        '503':
          description: This service/resource is currently unavailable.
components:
  schemas:
    CommonTicketResponse:
      type: object
      properties:
        status:
          type: boolean
          default: true
          description: The status of the response
        message:
          type: string
          default: Success
          description: The message of the response
        timestamp:
          format: date-time
          type: string
          default: '2024-01-01T00:00:00.000Z'
          description: The timestamp of the response
        data:
          description: The response for create/update/delete ticket operations
          allOf:
            - $ref: '#/components/schemas/TicketResponseDto'
      required:
        - status
        - message
        - timestamp
        - data
    TicketResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the ticket
        ticketIdentifier:
          type: string
          description: The unique identifier of the ticket
        title:
          type: string
          description: The title of the ticket
        ticketId:
          type: number
          description: The ticket ID of the ticket
        description:
          type: string
          description: The description of the ticket
        source:
          type: string
          description: The source of the ticket
        accountId:
          type: string
          description: The account ID of the ticket
        status:
          type: string
          description: The status of the ticket
        statusId:
          type: string
          description: The status ID of the ticket
        priority:
          type: string
          description: The priority of the ticket
        priorityId:
          type: string
          description: The priority ID of the ticket
        storyPoints:
          type: number
          description: The story points of the ticket
        account:
          type: string
          description: The account of the ticket
        teamId:
          type: string
          description: The team ID of the ticket
        teamName:
          type: string
          description: The name of the team of the ticket
        teamIdentifier:
          type: string
          description: The identifier of the team of the ticket
        subTeamId:
          type: string
          description: The sub team ID of the ticket
        subTeamName:
          type: string
          description: The name of the sub team of the ticket
        subTeamIdentifier:
          type: string
          description: The identifier of the sub team of the ticket
        isPrivate:
          type: boolean
          description: Whether the ticket is private
        typeId:
          type: string
          description: The type ID of the ticket
        type:
          type: string
          description: The name of the type of the ticket
        assignedAgent:
          type: string
          description: The assigned agent of the ticket
        assignedAgentId:
          type: string
          description: The assigned agent ID of the ticket
        assignedAgentEmail:
          type: string
          description: The assigned agent email of the ticket
        assignedAgentAvatar:
          type: string
          description: The assigned agent avatar of the ticket
        requestorEmail:
          type: string
          description: The requestor email of the ticket
        customerContactId:
          type: string
          description: The customer contact ID of the ticket
        customerContactFirstName:
          type: string
          description: The customer contact first name of the ticket
        customerContactLastName:
          type: string
          description: The customer contact last name of the ticket
        customerContactEmail:
          type: string
          description: The customer contact email of the ticket
        submitterEmail:
          type: string
          description: The submitter email of the ticket
        customFieldValues:
          description: The custom field values
          type: array
          items:
            type: string
        deletedAt:
          type: string
          description: The deleted at date of the ticket
        archivedAt:
          type: string
          description: The archived at date of the ticket
        createdAt:
          type: string
          description: The created at date of the ticket
        updatedAt:
          type: string
          description: The updated at date of the ticket
        formId:
          type: string
          description: The form ID of the ticket
        aiGeneratedTitle:
          type: string
          description: The AI generated title of the ticket
        aiGeneratedSummary:
          type: string
          description: The AI generated summary of the ticket
        sentiment:
          type: string
          description: The sentiment of the ticket
        sentimentId:
          type: string
          description: The sentiment ID of the ticket
        teamIcon:
          type: string
          description: The team icon of the ticket
        teamColor:
          type: string
          description: The team color of the ticket
        teamOrganizationId:
          type: string
          description: The team organization ID of the ticket
        teamParentTeamId:
          type: string
          description: The team parent team ID of the ticket
        teamDescription:
          type: string
          description: The team description of the ticket
        teamConfigurationId:
          type: string
          description: The team configuration ID of the ticket
        teamTeamOwnerId:
          type: string
          description: The team team owner ID of the ticket
        teamIsActive:
          type: boolean
          description: The team is active of the ticket
        teamIsPrivate:
          type: boolean
          description: The team is private of the ticket
        teamCreatedAt:
          type: string
          description: The team created at of the ticket
        teamUpdatedAt:
          type: string
          description: The team updated at of the ticket
        teamDeletedAt:
          type: string
          description: The team deleted at of the ticket
        teamArchivedAt:
          type: string
          description: The team archived at of the ticket
        subTeamIcon:
          type: string
          description: The sub team icon of the ticket
        subTeamColor:
          type: string
          description: The sub team color of the ticket
        subTeamOrganizationId:
          type: string
          description: The sub team organization ID of the ticket
        subTeamParentTeamId:
          type: string
          description: The sub team parent team ID of the ticket
        subTeamDescription:
          type: string
          description: The sub team description of the ticket
        subTeamConfigurationId:
          type: string
          description: The sub team configuration ID of the ticket
        subTeamTeamOwnerId:
          type: string
          description: The sub team team owner ID of the ticket
        subTeamIsActive:
          type: boolean
          description: The sub team is active of the ticket
        subTeamIsPrivate:
          type: boolean
          description: The sub team is private of the ticket
        subTeamCreatedAt:
          type: string
          description: The sub team created at of the ticket
        subTeamUpdatedAt:
          type: string
          description: The sub team updated at of the ticket
        subTeamDeletedAt:
          type: string
          description: The sub team deleted at of the ticket
        subTeamArchivedAt:
          type: string
          description: The sub team archived at of the ticket
        lastCustomerComment:
          type: string
          description: The last customer comment timestamp
        lastVendorComment:
          type: string
          description: The last vendor comment timestamp
        closedAt:
          type: string
          description: The closed at date of the ticket
          nullable: true
        closedBy:
          type: string
          description: The display name of the user who closed the ticket
          nullable: true
        closedById:
          type: string
          description: The ID of the user who closed the ticket
          nullable: true
        closedByEmail:
          type: string
          description: The email of the user who closed the ticket
          nullable: true
        lastComment:
          type: string
          description: >-
            The last comment timestamp (max of lastCustomerComment and
            lastVendorComment)
        isEscalated:
          type: boolean
          description: Whether the ticket is escalated
      required:
        - id
        - ticketIdentifier
        - title
        - ticketId
        - description
        - source
        - accountId
        - status
        - statusId
        - priority
        - priorityId
        - storyPoints
        - account
        - teamId
        - teamName
        - teamIdentifier
        - subTeamId
        - subTeamName
        - subTeamIdentifier
        - isPrivate
        - typeId
        - type
        - assignedAgent
        - assignedAgentId
        - assignedAgentEmail
        - assignedAgentAvatar
        - requestorEmail
        - customerContactId
        - customerContactFirstName
        - customerContactLastName
        - customerContactEmail
        - submitterEmail
        - customFieldValues
        - deletedAt
        - archivedAt
        - createdAt
        - updatedAt
        - formId
        - aiGeneratedTitle
        - aiGeneratedSummary
        - sentiment
        - sentimentId
        - teamIcon
        - teamColor
        - teamOrganizationId
        - teamParentTeamId
        - teamDescription
        - teamConfigurationId
        - teamTeamOwnerId
        - teamIsActive
        - teamIsPrivate
        - teamCreatedAt
        - teamUpdatedAt
        - teamDeletedAt
        - teamArchivedAt
        - subTeamIcon
        - subTeamColor
        - subTeamOrganizationId
        - subTeamParentTeamId
        - subTeamDescription
        - subTeamConfigurationId
        - subTeamTeamOwnerId
        - subTeamIsActive
        - subTeamIsPrivate
        - subTeamCreatedAt
        - subTeamUpdatedAt
        - subTeamDeletedAt
        - subTeamArchivedAt
        - lastCustomerComment
        - lastVendorComment
        - lastComment
        - isEscalated
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Enter your API key '

````