markNotificationRead
Requires permission notifications:user-notification:mark-read.
Marks one of the signed-in user's own notifications as read. Anyone else's notification reads as missing. Requires permission to mark notifications read.
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 MarkNotificationRead($id: ID!) {
markNotificationRead(id: $id) {
id
title
type
createdAt
body
entityId
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation MarkNotificationRead($id: ID!) {\n markNotificationRead(id: $id) {\n id\n title\n type\n createdAt\n body\n entityId\n }\n}",
"variables": {
"id": "id"
}
}
EOF
Variables:
{
"id": "id"
}
Response:
{
"data": {
"markNotificationRead": {
"id": "id",
"title": "string",
"type": "string",
"createdAt": "2025-01-15T00:00:00Z",
"body": "string",
"entityId": "string"
}
}
}
markNotificationRead(
id: ID!
): UserNotification!
Arguments
markNotificationRead.id ● ID! non-null scalar
The ID of the notification.
Type
UserNotification object
An in-app notification for a staff user. Buyer notifications are a separate type.