---
title: "Close a ticket as spam (agent verdict)"
url: https://docs.gleap.ai/en/reference/rest-api/close-ticket-as-spam
method: PUT
path: "/tickets/{ticketId}/close-as-spam"
api: "API Reference"
tag: "Ticket"
operationId: "CloseTicketAsSpam"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Close a ticket as spam (agent verdict)

`PUT https://api.gleap.io/v3/tickets/{ticketId}/close-as-spam`

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.

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Path parameters

- `ticketId` (string, required)

## Headers

- `project` (string, required)

## Request body (`application/json`, required)

- `reason` (string): Short internal justification shown in the activity log / status reason.

## Example request

```bash
curl --request PUT \
  --url 'https://api.gleap.io/v3/tickets/{ticketId}/close-as-spam' \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>' \
  --header 'Content-Type: application/json' \
  --data '{
  "reason": "<reason>"
}'
```

## Responses

### 200 (`application/json`)

Ok
