Announcements

Announcements are a way to send system-level messages to users. Announcements are global (they are not part of a single conversation). In fact, an Announcement is a special type of Message. However, it is different in the following ways:

  • Announcements can only be sent by the Server API, and cannot be sent by individual users via any Client SDK.
  • The object will not have a conversation property
  • The id will be of the format layer:///announcements/UUID
  • The object does not show the recipient status
  • The recipients property is added to identify all users who should receive the Announcement.
{
  "id": "layer:///announcements/940de862-3c96-11e4-baad-164230d1df67",
  "url": "https://api.layer.com/announcements/940de862-3c96-11e4-baad-164230d1df67",
  "parts": [
    {
      "id": "layer:///announcements/940de862-3c96-11e4-baad-164230d1df67/parts/0",
      "mime_type": "text/plain",
      "body": "This is the announcement."
    }
  ],
  "sent_at": "2014-09-09T04:44:47+00:00",
  "sender": {
    "user_id": null,
    "name": "Admin"
  },
  "recipients": ["layer:///identities/999", "layer:///identities/777"]
}

You can not operate upon an Announcement once it has been sent using the Server APIs, but you can use the User Data Services to execute any Client API command including deletion, sending read receipts and retrieving the Announcement to see if its been read.