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.
Using TypeScript? Check out our GraphQL SDK for a fully typed client.
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:
Mark a customer as spam
mutation markCustomerAsSpam($input: MarkCustomerAsSpamInput!) {
markCustomerAsSpam(input: $input) {
customer {
id
fullName
markedAsSpamAt {
iso8601
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}
{
"input": {
"customerId": "c_01H14DFQ4PDYBH398J1E99TWSS"
}
}
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.
mutation unmarkCustomerAsSpam($input: UnmarkCustomerAsSpamInput!) {
unmarkCustomerAsSpam(input: $input) {
customer {
id
fullName
markedAsSpamAt {
iso8601
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}
{
"input": {
"customerId": "c_01H14DFQ4PDYBH398J1E99TWSS"
}
}