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

# Close a ticket as spam (agent verdict)

> CLOSE a ticket as spam (agent/MCP verdict): sets the done status, flags +
archives it into the Spam review queue, and suppresses every
customer-facing follow-up — no CSAT, no notifications, no knowledge
extraction. Unlike the manual `PUT {ticketId}/spam` above it does NOT
block the contact: agent verdicts stay recoverable (a genuine customer
reply un-flags the ticket). Used by the Gleap MCP's close_ticket
(asSpam) and the classic close_as_spam tool.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json put /tickets/{ticketId}/close-as-spam
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /tickets/{ticketId}/close-as-spam:
    put:
      tags:
        - Ticket
      summary: Close a ticket as spam (agent verdict)
      description: >-
        CLOSE a ticket as spam (agent/MCP verdict): sets the done status, flags
        +

        archives it into the Spam review queue, and suppresses every

        customer-facing follow-up — no CSAT, no notifications, no knowledge

        extraction. Unlike the manual `PUT {ticketId}/spam` above it does NOT

        block the contact: agent verdicts stay recoverable (a genuine customer

        reply un-flags the ticket). Used by the Gleap MCP's close_ticket

        (asSpam) and the classic close_as_spam tool.
      operationId: CloseTicketAsSpam
      parameters:
        - in: path
          name: ticketId
          required: true
          schema:
            type: string
        - in: header
          name: project
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloseTicketAsSpamDto'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema: {}
      security:
        - jwt: []
components:
  schemas:
    CloseTicketAsSpamDto:
      properties:
        reason:
          type: string
          description: >-
            Short internal justification shown in the activity log / status
            reason.
      type: object
      additionalProperties: false
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````