Mutation
mutation MarkCustomerAsSpam($input: MarkCustomerAsSpamInput!) {
markCustomerAsSpam(input: $input) {
customer {
id
externalId
fullName
shortName
email {
email
isVerified
verifiedAt {
__typename
}
}
avatarUrl
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customerId": "id"
}
}Response
{
"data": {
"markCustomerAsSpam": {
"customer": {
"id": "id",
"externalId": "id",
"fullName": "string",
"shortName": "string",
"email": {
"email": "string",
"isVerified": true,
"verifiedAt": {
"__typename": "DateTime"
}
},
"avatarUrl": "string"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
markCustomerAsSpam
Flags a customer as spam, hiding their threads from the inbox and excluding them from metrics.
The operation is idempotent — marking an already-spam customer leaves their markedAsSpamAt
timestamp unchanged. Requires the customer:edit permission.
MUTATION
markCustomerAsSpam(input: MarkCustomerAsSpamInput!): MarkCustomerAsSpamOutput!Arguments
input
required
Returns
customer
error
Mutation
mutation MarkCustomerAsSpam($input: MarkCustomerAsSpamInput!) {
markCustomerAsSpam(input: $input) {
customer {
id
externalId
fullName
shortName
email {
email
isVerified
verifiedAt {
__typename
}
}
avatarUrl
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customerId": "id"
}
}Response
{
"data": {
"markCustomerAsSpam": {
"customer": {
"id": "id",
"externalId": "id",
"fullName": "string",
"shortName": "string",
"email": {
"email": "string",
"isVerified": true,
"verifiedAt": {
"__typename": "DateTime"
}
},
"avatarUrl": "string"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

