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

# Delete a ticket

> Delete a ticket and its tasks: they no longer appear anywhere and cannot be restored from the API. To close a ticket and keep its history, use `updateTicketStatus` instead.

Key: WriteScope: Company


## OpenAPI

````yaml https://api.getprimo.com/openapi.json delete /tickets/{ticketId}
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /tickets/{ticketId}:
    delete:
      tags:
        - Tickets
      summary: Delete a ticket
      description: >-
        Delete a ticket and its tasks: they no longer appear anywhere and cannot
        be restored from the API. To close a ticket and keep its history, use
        `updateTicketStatus` instead.
      operationId: deleteTicket
      parameters:
        - name: ticketId
          required: true
          in: path
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteTicketResult_Output'
components:
  schemas:
    DeleteTicketResult_Output:
      type: object
      properties:
        deleted:
          type: boolean
      required:
        - deleted
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.