跳转到内容
EN

Archive one of your letters

Code Mode: praxis.organization.notifications.letters.archive

HTTP: POST /organization/v1/notifications/letters/{id}:archive

Archive one letter addressed to you: it leaves the default letters list (ask for archived=true to see archived ones) and is marked read, with its bell notice. Repeating the call changes nothing and keeps the first archive time. A letter that is not in your mailbox in this organization, or does not exist, answers 404 the same way. Returns how many delivered letters you still have unread. No usage charge.

签名

praxis.organization.notifications.letters.archive(args:{path:{/** pattern: ^ltr_[0-9a-f]+$ e.g. "ltr_3f9a1c7e5b2d4a60" */ id:string}}):Promise<{/** How many delivered letters you have not read, across all pages. */ unread:number}>;

参数

名称位置类型必填说明
idpathstring是The letter’s id, from the letters list.

响应

状态码内容类型说明
200application/jsonThe letter is archived; your unread count after it.
400The id is not a letter id — `INVALID_PARAMS` from the service (RFC 9457 problem).
401Missing or invalid credential (RFC 9457 problem).
404No such letter in your mailbox in this organization — `MESSAGE_NOT_FOUND` (RFC 9457 problem).
502The 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.