curl --request POST \
  --url https://{domain}-be.glean.com/rest/api/v1/updateannouncement \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "startTime": "2023-11-07T05:31:56Z",
  "endTime": "2023-11-07T05:31:56Z",
  "title": "<string>",
  "body": {
    "text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.",
    "structuredList": [
      {
        "link": "https://en.wikipedia.org/wiki/Diffuse_sky_radiation",
        "document": {
          "id": "<string>",
          "datasource": "<string>",
          "connectorType": "API_CRAWL",
          "docType": "<string>",
          "content": {
            "fullTextList": [
              "<string>"
            ]
          },
          "containerDocument": {},
          "parentDocument": {},
          "title": "<string>",
          "url": "<string>",
          "metadata": {
            "container": "container",
            "parentId": "JIRA_EN-1337",
            "createTime": "2000-01-23T04:56:07.000Z",
            "datasource": "datasource",
            "author": {
              "name": "name"
            },
            "documentId": "documentId",
            "updateTime": "2000-01-23T04:56:07.000Z",
            "mimeType": "mimeType",
            "objectType": "Feature Request",
            "components": [
              "Backend",
              "Networking"
            ],
            "status": [
              "Done"
            ],
            "customData": {
              "someCustomField": "someCustomValue"
            }
          },
          "sections": [
            {
              "title": "<string>",
              "url": "<string>"
            }
          ]
        },
        "text": "Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."
      }
    ]
  },
  "emoji": "<string>",
  "thumbnail": {
    "photoId": "<string>",
    "url": "<string>"
  },
  "banner": {
    "photoId": "<string>",
    "url": "<string>"
  },
  "audienceFilters": [
    {
      "fieldName": "type",
      "values": [
        {
          "value": "Spreadsheet",
          "relationType": "EQUALS"
        },
        {
          "value": "Presentation",
          "relationType": "EQUALS"
        }
      ]
    }
  ],
  "sourceDocumentId": "<string>",
  "hideAttribution": true,
  "channel": "MAIN",
  "postType": "TEXT",
  "isPrioritized": true,
  "viewUrl": "<string>",
  "id": 123
}'
{
  "draftId": 342
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Scio-Actas
string

Email address of a user on whose behalf the request is intended to be made (should be non-empty only for global tokens).

X-Glean-Auth-Type
string

Auth type being used to access the endpoint (should be non-empty only for global tokens).

Body

application/json
Announcement content. Id need to be specified for the announcement.
id
integer
required

The opaque id of the announcement.

startTime
string
required

The date and time at which the announcement becomes active.

endTime
string
required

The date and time at which the announcement expires.

title
string
required

The headline of the announcement.

body
object
emoji
string

An emoji used to indicate the nature of the announcement.

thumbnail
object
banner
object

Optional variant of thumbnail cropped for header background.

audienceFilters
object[]

Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search.

sourceDocumentId
string

The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread).

hideAttribution
boolean

Whether or not to hide an author attribution.

channel
enum<string>

This determines whether this is a Social Feed post or a regular announcement.

Available options:
MAIN,
SOCIAL_FEED
postType
enum<string>

This determines whether this is an external-link post or a regular announcement post. TEXT - Regular announcement that can contain rich text. LINK - Announcement that is linked to an external site.

Available options:
TEXT,
LINK
isPrioritized
boolean

Used by the Social Feed to pin posts to the front of the feed.

viewUrl
string

URL for viewing the announcement. It will be set to document URL for announcements from other datasources e.g. simpplr. Can only be written when channel="SOCIAL_FEED".

Response

200
application/json
OK
id
integer

The opaque id of the announcement.

author
object
Example:
{
  "name": "George Clooney",
  "obfuscatedId": "abc123"
}
createTimestamp
integer

Server Unix timestamp of the creation time (in seconds since epoch UTC).

lastUpdateTimestamp
integer

Server Unix timestamp of the last update time (in seconds since epoch UTC).

updatedBy
object
Example:
{
  "name": "George Clooney",
  "obfuscatedId": "abc123"
}
viewerInfo
object
sourceDocument
object

The source document if the announcement is created from one.

isPublished
boolean

Whether or not the announcement is published.

startTime
string

The date and time at which the announcement becomes active.

endTime
string

The date and time at which the announcement expires.

title
string

The headline of the announcement.

body
object
emoji
string

An emoji used to indicate the nature of the announcement.

thumbnail
object
banner
object

Optional variant of thumbnail cropped for header background.

audienceFilters
object[]

Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search.

sourceDocumentId
string

The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread).

hideAttribution
boolean

Whether or not to hide an author attribution.

channel
enum<string>

This determines whether this is a Social Feed post or a regular announcement.

Available options:
MAIN,
SOCIAL_FEED
postType
enum<string>

This determines whether this is an external-link post or a regular announcement post. TEXT - Regular announcement that can contain rich text. LINK - Announcement that is linked to an external site.

Available options:
TEXT,
LINK
isPrioritized
boolean

Used by the Social Feed to pin posts to the front of the feed.

viewUrl
string

URL for viewing the announcement. It will be set to document URL for announcements from other datasources e.g. simpplr. Can only be written when channel="SOCIAL_FEED".

draftId
integer

The opaque id of the associated draft.

permissions
object

The permissions the current viewer has with respect to a particular object.