markMessageRead
mutation · in the family Your own session
What it does
Mark one of your messages as read. Team messages don’t track per-person reads.
Mark one of your messages read. An absent row refuses NOT_FOUND/MESSAGE (team messages are unreachable here — no per-member team read state v1); an already-read message returns unchanged (first read wins). Requires authentication.
Before you call
A signed-in user’s session — the call refuses an API key (AUTHZ/FORBIDDEN).
Capability area: Your own session — What every signed-in person may do for themselves — their session, their profile and their own work.
Roles that may call it:
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
What happens
The first read sets the time; reading again changes nothing.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
messageId | ID ID! | yes |
Returns
MessageRef MessageRef! — One inbox message.
Example request
mutation ExampleMarkMessageRead($messageId: ID!) {
markMessageRead(messageId: $messageId) {
id
toKind
toId
fromKind
fromUserId
body
targetType
targetId
createdAt
readAt
}
}Variables:
{
"messageId": "01900000-0000-7000-8000-ae0ed9840000"
}Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"markMessageRead": {
"id": "01900000-0000-7000-8000-37386ae00000",
"toKind": "USER",
"toId": "01900000-0000-7000-8000-41f596440000",
"fromKind": "USER",
"fromUserId": "01900000-0000-7000-8000-e7f2c3020000",
"body": "Restock before the weekend.",
"targetType": "<target type>",
"targetId": "01900000-0000-7000-8000-8b67f1680000",
"createdAt": "2027-01-31T00:00:00.000Z",
"readAt": "2027-01-31T00:00:00.000Z"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)CONFLICT/*— The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. (CONFLICT)VALIDATION/VERSION_REQUIRED— The request did not say which app version it came from. Retry: no. (VALIDATION)