Skip to content
中文

Mark one of your bell messages read or archived

Code Mode: praxis.organization.notifications.messages.update

HTTP: POST /organization/v1/notifications/messages/{name}

Change the read or archived flag of one of the calling person’s own bell messages and return it. Name at least one flag. Reading a message also tells the notification still waiting on it, so it is not emailed later as unread. A message that is not theirs answers 404 like one that does not exist. No usage charge.

Signature

praxis.organization.notifications.messages.update(args:{path:{/** e.g. "subscribers/usr_8a21c4/messages/msg_3f9a1c7e" */ name:string};body:{/** Mark the message read (true) or unread (false); omit to leave it. e.g. true */ read?:boolean;/** Archive the message (true) or move it back to the inbox (false); omit to leave it. e.g. true */ archived?:boolean}}):Promise<{/** The message's resource name, subscribers/{user}/messages/{id}; pass it URL-encoded as the {name} of the other message operations. e.g. "subscribers/usr_8a21c4/messages/msg_3f9a1c7e" */ name:string;/** The organization the message belongs to; empty for a message that belongs to no organization. */ organizationId:string;/** The notification group the message belongs to: members, usage, alerts, agent, or nonConfigurable. e.g. "agent" */ group:"members"|"usage"|"alerts"|"agent"|"nonConfigurable";/** The notification workflow that wrote it, as the preferences page names it. */ workflow:string;/** The message's headline, as the bell shows it. */ title:string;/** The message text. */ body:string;/** Where the bell opens this message; absent when it has no page. */ actionUrl?:string;/** Whether the bell has been opened since the message arrived. */ seen:boolean;/** Whether this person has read it. */ read:boolean;/** Whether this person archived it; archived messages are not in the inbox tab. */ archived:boolean;/** When the message arrived. */ createTime:string}>;

Parameters

NameInTypeRequiredDescription
namepathstringyesThe message’s `name` from the messages list, subscribers/{user}/messages/{id}, URL-encoded.

Request body

RequiredContent typesDescription
yesapplication/json

Responses

StatusContent typesDescription
200application/jsonThe message after the change.
400The body is not a JSON object, names neither `read` nor `archived`, a flag is not true or false, or `name` is malformed (RFC 9457 problem).
401Missing or invalid credential (RFC 9457 problem).
403`PERMISSION_DENIED`: an agent credential has no person inbox; read its own letters instead (RFC 9457 problem).
404No such message of yours 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.