deleteMessage
Requires an authenticated session.
Deletes one message. Only the owner of the conversation can delete its messages, and a message of another organization reads as missing. Needs a signed-in user.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation DeleteMessage($id: String!) {
deleteMessage(id: $id) {
message
success
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation DeleteMessage($id: String!) {\n deleteMessage(id: $id) {\n message\n success\n }\n}",
"variables": {
"id": "string"
}
}
EOF
Variables:
{
"id": "string"
}
Response:
{
"data": {
"deleteMessage": {
"message": "string",
"success": true
}
}
}
deleteMessage(
id: String!
): DeleteResponse!
Arguments
deleteMessage.id ● String! non-null scalar
The ID of the message.
Type
DeleteResponse object
The result of a mutation that deletes a record and has nothing left to return.