HomeGuidesSamplesAPI
API

Heads Up

The SafetyCulture API gives you the ability to list Heads Ups in your organization, and retrieve each Heads Up's completion status and more.

Heads Up format

This section describes the complete format of a Heads Up.

Heads Up top level

Describes the top level details of an Heads Up.

{
  "id":  "0c2100df-3206-4d41-bc08-2c960233114e",
  "created_at":  "2022-04-04T07:12:40.736163Z",
  "modified_at":  "2022-07-26T09:12:23.655252Z",
  "title": "Heads Up!",
  "description": "Additional information",
  "author_id": "user_48b47dee87d24b11b6dcccaab613e5ee",
  "author_name": "John Smith",
  "is_published": true,
  "published_at":  "2022-04-04T07:12:40.736163Z",
  "has_acknowledgement": true,
  "is_comments_disabled": true,
  "media": [
    {
      "media": {
        "id": "f7433168-23d3-4606-abac-08cdad0d5a34",
        "token": "1a38755ad36c62439cba05eb01afd74ac12b2b8df1fcf5f19c29768792c931c4",
        "filename":  "video.mp4",
        "media_type":  "MEDIA_TYPE_VIDEO"
      }
    }
  ]
}
KeyTypeDescription
idstring (UUID)The unique identifier of a Heads Up. This ID is system-generated.
created_atString (ISO8601)The date created timestamp of a Heads Up.
modified_atString (ISO8601)The date last modified timestamp of a Heads Up.
titleStringThe title of a Heads Up.
descriptionStringThe description of a Heads Up.
author_idStringThe unique identifier of the user who published a Heads Up.
author_nameStringThe full name of the user who published a Heads Up.
is_publishedBooleanThe indicator for whether a Heads Up is published or not. Please note that an unpublished Heads Up is considered a draft.
has_acknowledgementBooleanThe indicator for whether acknowledgments has been enabled for a Heads Up or not.
is_comments_disabledBooleanThe indicator for whether commenting has been enabled for a Heads Up or not.
mediaarrayThe attached media files of a Heads Up contained in an array as objects.

Comments top level

Describes the top level details of a comment in a Heads Up.

{
  "id":  "7c9aa03d-8a7f-408b-9bd2-34cf31a3690e",
  "sent_at":  "2022-04-04T07:12:40.736163Z",
  "parent_id": "23cc0239-d771-4668-9fc2-8a2fda7d62ff",
  "reference_id": "ab5917f7-1c8c-4d8a-98e8-83ec36601fa6",
  "reference_type": "MESSAGE_REFERENCE_TYPES_HEADS_UP",
  "message": [
    {
      "content": {
        "text": {
          "text": "My comment!"
        }
      }
    }
  ],
  "user_id": "user_48b47dee87d24b11b6dcccaab613e5ee",
  "name": "John Smith",
  "reply_count": 10
}
KeyTypeDescription
idstring (UUID)The unique identifier of a comment. This ID is system-generated.
sent_atString (ISO8601)The date sent timestamp of a comment.
parent_idString(Optional). The unique identifier of the parent comment that a comment is attached to. This only applies when a comment is a reply to another comment.
reference_idStringThe unique identifier of the Heads Up a comment is sent to.
reference_typeMessageReferenceTypesThe identification of the resource type a comment is assigned to.
messageMessageContentThe content of a comment. The content is represented in object format but only displays plain text.
user_idStringThe unique identifier of the user who sent a comment.
nameStringThe full name of the user who sent a comment.
reply_countNumberThe number of replies to a comment. This details whether pagination is required or not to see replies to a comment.

Comment reference type

Identifies the resource type of a comment in a Heads Up.

NameDescription
MESSAGE_REFERENCE_TYPES_HEADS_UPThe identification for a comment in a Heads Up.