Announcements

The announcement object

A broadcast announcement shown in the notification (bell) feed, carrying the calling user's own read state.

A single announcement is published to everyone in an account, or to every user on the platform, and each user keeps their own seen, read, and dismissed state for it. The status and timestamps you read are therefore always the caller's, and never reflect what anyone else has done with the same announcement. Notifications addressed to one user are a separate resource.

idstring

Announcement ID.

objectstringenumValues:announcement

Resource type identifier.

scopestringenumValues:accountplatform

Who the announcement reaches.

  • account: published to a single account and shown only to that account's users.
  • platform: published by OpenMRP and shown to every user across all accounts.
categorystringenumValues:chat.messagechat.mentionchat.added

The kind of event the announcement is about.

Announcements draw on the same categories as notifications, such as system.broadcast or order.updated, and the category is chosen by whoever publishes the announcement. The set is open-ended and may grow over time, so clients should tolerate values they do not recognize.

titlestring

Short headline shown in the feed.

bodystringnullable

Supporting detail shown beneath the title.

statusstringenumValues:unseenseenread

Where the announcement is in its lifecycle for the calling user.

  • unseen: not yet surfaced to the caller.
  • seen: surfaced in the caller's feed but not opened.
  • read: explicitly opened by the caller.
  • dismissed: removed from the caller's feed.

The status is derived from the caller's own seen, read, and dismissed timestamps and only ever moves forward, so the same announcement can show a different status for each user in the account.

prioritystringenumValues:lownormalhigh

How prominently the announcement should be surfaced, from low through urgent.

resourceentitynullable

The resource the announcement is about, which the client can link to.

idstring

Unique identifier for the entity.

objectstringenumValues:entity

Resource type identifier.

typestringenumValues:accountactorentity

The resource kind that this entity references, as an object-type value (e.g. user, account).

Unlike object — which is always entity — this names the underlying resource the id points to.

namestringnullable

Human-readable display name for the entity (e.g. a user's full name, a sales order number).

handlestringnullable

Secondary human-readable identifier (e.g. email address, username, redacted API key value).

publish_atstring (date-time)

When the announcement becomes visible in the feed.

An announcement scheduled for the future is not returned by the announcement endpoints until this time passes.

expires_atstring (date-time)nullable

When the announcement stops being shown.

Once it expires the announcement leaves every user's feed and can no longer be retrieved; an announcement with no expiry stays until each user dismisses it.

seen_atstring (date-time)nullable

When the calling user first saw the announcement.

read_atstring (date-time)nullable

When the calling user opened the announcement.

dismissed_atstring (date-time)nullable

When the calling user dismissed the announcement.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last update timestamp.

Used by