On this page
myMessages
query · in the family Your own session
What it does
Your inbox — messages to you and to your teams, newest first. Unread ones have no read mark yet.
Your merged inbox. limit defaults 50, clamps at 100. Requires authentication.
Who may call it
Capability area: Your own session — What every signed-in person may do for themselves — their session, their profile and their own work.
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
- An API key whose scope allows
api:myMessages
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
limit | Int | no | How many records to answer at most; a page may hold fewer. |
nextToken | String | no | The cursor from the previous page, passed back exactly as received. |
Returns
MessageRefPage MessageRefPage! — One page of the merged inbox walk.
This is a page: items holds the records and nextToken the cursor for the next page — pass it back verbatim until it is null. See paging.
Example request
query ExampleMyMessages($limit: Int) {
myMessages(limit: $limit) {
items {
id
toKind
toId
fromKind
fromUserId
body
targetType
targetId
createdAt
readAt
}
nextToken
}
}
Variables:
{
"limit": 1
}
Example response
{
"data": {
"myMessages": {
"items": [
{
"id": "01900000-0000-7000-8000-37386ae00000",
"toKind": "USER",
"toId": "01900000-0000-7000-8000-4dc937890000",
"fromKind": "USER",
"fromUserId": "01900000-0000-7000-8000-f626b68f0000",
"body": "Restock before the weekend.",
"targetType": "<target type>",
"targetId": "01900000-0000-7000-8000-446adfd50000",
"createdAt": "2027-01-31T00:00:00.000Z",
"readAt": "2027-01-31T00:00:00.000Z"
}
],
"nextToken": "<the cursor from the previous page>"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. (RATE_LIMIT)