Create spam report
On this page
GraphQL endpoint: /user
Creates a spam report to report unwanted or malicious communications.
Required fields:
channelType: The communication channel (SMS, MMS, RCS, VOICE, EMAIL, OTHER)
Optional fields:
source: The source/origin of the communicationdestination: The destination of the communicationfromNumber: Deprecated - usesourceinsteadtoNumber: Deprecated - usedestinationinsteadreportedAt: When the report was createdtimestamp: Deprecated - usereportedAtinsteadissueType: Type of issue (SPAM, FRAUD, SCAM, HARASSMENT, ILLEGAL_CONTENT)userNote: User's description of the issuemessageContent: Content of the message being reportedmetadata: Additional metadata as key-value pairs (flat structure only)
The report is created with status SUBMITTED and can be tracked using the spamReports query.
Query
mutation (
$source: String
$fromNumber: String
$destination: String
$toNumber: String
$channelType: SpamReportChannelType!
$reportedAt: NaiveDateTime
$timestamp: NaiveDateTime
$issueType: SpamReportIssueType
$userNote: String
$messageContent: String
$metadata: JSON
) {
createSpamReport (
source: $source
fromNumber: $fromNumber
destination: $destination
toNumber: $toNumber
channelType: $channelType
reportedAt: $reportedAt
timestamp: $timestamp
issueType: $issueType
userNote: $userNote
messageContent: $messageContent
metadata: $metadata
) {
id
source
fromNumber
destination
toNumber
userNote
messageContent
channelType
issueType
status
createdAt
updatedAt
reportedAt
timestamp
metadata
user {
id
}
}
}
Variables
{
"channelType": "RCS",
"destination": "1",
"issueType": "SCAM",
"messageContent": "message content",
"metadata": {
"test": "value"
},
"reportedAt": "2024-10-04 02:52:00",
"source": "213450",
"userNote": "user note"
}
Response
{
"data": {
"createSpamReport": {
"channelType": "RCS",
"createdAt": null,
"destination": "1",
"fromNumber": "213450",
"id": "00000000-0000-4000-8000-000000000001",
"issueType": "SCAM",
"messageContent": "message content",
"metadata": {
"test": "value"
},
"reportedAt": "2026-01-15T09:00:00.000000",
"source": "213450",
"status": "SUBMITTED",
"timestamp": "2026-01-15T09:00:00.000000",
"toNumber": "1",
"updatedAt": "2026-01-15T09:00:01.000000",
"user": {
"id": "00000000-0000-4000-8000-000000000002"
},
"userNote": "user note"
}
}
}