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

# Mark customer as spam

<Snippet file="graphql/sdk-note.mdx" />

You can flag a customer as spam to hide their threads from the main inbox and stop them being included in metrics. This is useful for closing the loop on automated handling of throwaway accounts, bot traffic or known abusers.

When a customer is marked as spam their `markedAsSpamAt` timestamp is set. The mutation is idempotent — calling it on an already-spam customer leaves the timestamp unchanged.

This operation requires the following permissions:

* `customer:edit`

## Mark a customer as spam

<Snippet file="graphql/mark-customer-as-spam.mdx" />

## Unmark a customer as spam

To reverse the above, use `unmarkCustomerAsSpam`. The customer's `markedAsSpamAt` timestamp is cleared and their threads start appearing in the inbox again.

<Snippet file="graphql/unmark-customer-as-spam.mdx" />
