Skip to main content

Endpoint

DELETE /api/v1/tickets/{id}

Authentication

Requires authentication with ticket:delete permission.

Path Parameters

ParameterTypeRequiredDescription
idstring (UUID)YesTicket ID to delete

Request Example

curl -X DELETE "http://localhost:3001/api/v1/tickets/550e8400-e29b-41d4-a716-446655440000" \
  -H "Cookie: session=your-session-cookie"

Response

Success Response (204)

No content returned - the ticket has been successfully deleted.

Error Response (400)

{
  "success": false,
  "error": {
    "message": "Invalid ticket ID format",
    "code": "VALIDATION_ERROR"
  }
}

Error Response (404)

{
  "success": false,
  "error": {
    "message": "Ticket not found",
    "code": "NOT_FOUND"
  }
}

Error Response (401)

{
  "success": false,
  "error": {
    "message": "Unauthorized access",
    "code": "UNAUTHORIZED"
  }
}

Error Response (403)

{
  "success": false,
  "error": {
    "message": "Insufficient permissions",
    "code": "FORBIDDEN"
  }
}

Notes

  • This operation permanently deletes the ticket from the database
  • The deletion cannot be undone
  • Consider using Change Ticket Status to mark as CANCELLED instead of deleting
  • Only users with ticket:delete permission can perform this operation
  • The ticket and all its associated data (attachments, notes) are removed