List the letters addressed to you, or the ones you sent
Code Mode: praxis.organization.notifications.letters.list
HTTP: GET /organization/v1/notifications/letters
The letters this person received (or, with direction=sent, wrote) in this organization, newest first, as the notification center lists them (ADR-193 §5, #4107): the sender, the summary and the whole body are the copy this reader receives — every human:/agent: address is rendered as the directory’s display name, and one the directory cannot name reads 「未知成员」, never an address or an internal id. Also the kind, when it arrived, whether it is read, and one line saying why it reached this person. The address is the credential’s own and is never a request field. Details stay whole in body; open one by its id. Pass next_cursor unchanged as cursor; null ends the list. Read-only; no usage charge.
Signature
praxis.organization.notifications.letters.list(args?:{query?:{/** e.g. "sent" */ direction?:"received"|"sent";/** e.g. "scheduled" */ status?:"unread"|"read"|"scheduled";/** e.g. "ticket:praxis:5015" */ thread?:string;archived?:boolean;limit?:number;cursor?:string}}):Promise<{/** The page, newest arrival first. */ letters:Array<{/** The letter's id; open the letter by it. */ id:string;/** The sender's display name. */ sender:string;/** One line saying what the letter asks or tells, written for this reader (addresses already rendered as display names). */ summary:string;/** The whole letter, for the detail view, written for this reader: every human:/agent: address already rendered as a display name (or 「未知成员」). */ body:string;/** The conversation the letter belongs to; a ticket letter uses ticket:<repository>:<number>. */ thread:(string)|null;/** The letter's kind (ADR-193 §2, #4107): notice, mention, decision, or event (a subscribed event, ADR-218); the kind is its category and decides the channels. e.g. "mention" */ kind:"notice"|"mention"|"decision"|"event";/** Where the letter came from (a ticket number, a comment, a change); null when the sender gave none. */ source:({[key:string]:unknown})|null;/** Whether this person has read it. */ read:boolean;/** When it arrived; null while still scheduled. */ deliveredAt:(string)|null;/** When it was written. */ createTime:string;/** Why it reached this person, in their words — 「在工单 #4109 的评论里 @ 了你」. */ reason:string;/** Whether this person archived it. */ archived:boolean;/** The organization the letter belongs to: its own. */ organization:({/** The organization's id, from the directory. */ id:string;/** The organization's readable slug (ADR-101), the one a Console link carries as org=. */ slug:string;/** The organization's display name, as a person reads it. */ name:string})|null}>;/** Pass unchanged as cursor for the next page; null at the end. */ nextCursor:(string)|null;/** How many delivered letters this person has not read, across all pages. */ unread:number}>;Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| direction | query | “received” | “sent” | no | received (the default) lists the letters addressed to you; sent lists the letters you wrote, scheduled ones included, in the same row shape — a script or an agent finds its own alarm clocks there. A run credential’s sent list is the letters automation wrote on behalf of the person it acts for. |
| status | query | “unread” | “read” | “scheduled” | no | Only unread letters, only read ones, or (direction=sent only) only letters written but not yet delivered, whose deliveredAt is null; omit for all. On a sent list, unread and read are the recipient’s state. |
| thread | query | string | no | Only letters of this conversation, for received and sent alike; omit for all. |
| archived | query | boolean | no | false (the default) hides archived letters; true lists only the archived ones. Archiving is the addressee’s act, so it is ignored when direction=sent. |
| limit | query | number | no | Letters per page, 1 to 50; defaults to 20. |
| cursor | query | string | no | Opaque next_cursor from the previous response; omit for the first page. |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | One page of this person’s letters. |
| 400 | A bad `direction`, `status` (scheduled needs direction=sent), `thread`, `archived` or `limit`, or `INVALID_PARAMS` from the service for a cursor it did not issue (RFC 9457 problem). | |
| 401 | Missing or invalid credential (RFC 9457 problem). | |
| 502 | The notification service did not answer, or failed in a way it did not classify (RFC 9457 problem, `UNAVAILABLE`). A refusal the service classifies is never a 502 — it reaches the caller in its own class (400, 403, 404), so a client may act on it. |