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

# Mark a ticket as spam

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

Mark a ticket as spam: flags the ticket (and its merged duplicates) as spam, archives it into the spam tab, and blocks the contact — future tickets from them are auto-flagged as spam and inbound emails from them are dropped unless whitelisted. Undo via unarchive ("Not spam"), which clears the spam flag and unblocks the contact again.

## Authorization

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

## Path parameters

- `ticketId` (string, required)

## Headers

- `project` (string, required)

## Example request

```bash
curl --request PUT \
  --url 'https://api.gleap.io/v3/tickets/{ticketId}/spam' \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>'
```

## Responses

### 200 (`application/json`)

Ok
