{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/safetyculture/json-schema/safetyculture-s12-announcements-v1-heads-up-response-schema.json",
  "title": "HeadsUpResponse",
  "description": "Result returned from `GetHeadsUp`",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/safetyculture-heads-up-api-openapi.yml#/components/schemas/s12.announcements.v1.HeadsUpResponse",
  "type": "object",
  "properties": {
    "heads_up": {
      "allOf": [
        {
          "$ref": "#/$defs/s12.announcements.v1.HeadsUp"
        }
      ],
      "description": "The current HeadsUp object"
    }
  },
  "$defs": {
    "s12.announcements.v1.DocumentMeta": {
      "type": "object",
      "properties": {
        "document_type": {
          "allOf": [
            {
              "$ref": "#/$defs/s12.announcements.v1.DocumentType"
            }
          ],
          "description": "Document type"
        }
      }
    },
    "s12.announcements.v1.DocumentType": {
      "type": "string",
      "enum": [
        "DOCUMENT_TYPE_UNKNOWN_UNSPECIFIED",
        "DOCUMENT_TYPE_PDF"
      ],
      "default": "DOCUMENT_TYPE_UNKNOWN_UNSPECIFIED",
      "title": "- DOCUMENT_TYPE_UNKNOWN_UNSPECIFIED: Defaults to PDF"
    },
    "s12.announcements.v1.HeadsUp": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "An ID uniquely identifying this message."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp representing the instance this Announcement was originally\ncreated."
        },
        "modified_at": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp representing the instance this Announcement was most recently\nmodified."
        },
        "organisation_id": {
          "type": "string",
          "description": "The ID of the organisation that this Announcement belongs to."
        },
        "deleted": {
          "type": "boolean",
          "description": "Whether or not the Announcement has been soft deleted."
        },
        "title": {
          "type": "string",
          "description": "The title of the Announcement."
        },
        "author_id": {
          "type": "string",
          "description": "ID of the author who originally created the Announcement."
        },
        "author_name": {
          "type": "string",
          "description": "Name of the author who originally created the Announcement."
        },
        "is_published": {
          "type": "boolean",
          "description": "Whether or not the Announcement has been published, indicating that it can\nno longer undergo modifications."
        },
        "published_at": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp representing the instance this Announcement was published."
        },
        "has_acknowledgement": {
          "type": "boolean",
          "description": "Defines if it is required that a user taking the Announcement is required\nto explicitly acknowledge that they understand the content of the\nAnnouncement."
        },
        "description": {
          "type": "string",
          "description": "Description of the heads up as provided by the user."
        },
        "video": {
          "allOf": [
            {
              "$ref": "#/$defs/s12.common.Media"
            }
          ],
          "description": "Video media is now held in HeadsUpMedia media. Deprecated in favour of media_ids"
        },
        "images": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/$defs/s12.common.Media"
          },
          "description": "Images are now held in HeadsUpMedia media. Deprecated in favour of media_ids"
        },
        "author_profile_image": {
          "description": "Profile image of the author if any.",
          "allOf": [
            {
              "$ref": "#/$defs/s12.common.Media"
            }
          ]
        },
        "is_assigned": {
          "type": "boolean",
          "description": "Whether or not the requesting user is assigned this Heads Up"
        },
        "is_video_transcoded": {
          "type": "boolean",
          "description": "Video transcoded state will be held in VideoMeta of an individual\nHeadsUpMedia media. Deprecated in favour of media_ids"
        },
        "is_comments_disabled": {
          "type": "boolean",
          "description": "Whether or not comments are disabled for this Heads Up"
        },
        "media": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/$defs/s12.announcements.v1.HeadsUpMedia"
          },
          "description": "Media is a list of HeadsUpMedia objects associated with this HeadsUp"
        },
        "is_reactions_disabled": {
          "type": "boolean",
          "description": "Whether or not reactions are disabled for this Heads Up"
        }
      },
      "title": "HeadsUp represents a communication to one or more users containing\none or more announcement cards"
    },
    "s12.announcements.v1.HeadsUpMedia": {
      "type": "object",
      "properties": {
        "media": {
          "allOf": [
            {
              "$ref": "#/$defs/s12.common.Media"
            }
          ],
          "description": "Media object with details on how to retrieve and view media"
        },
        "video": {
          "allOf": [
            {
              "$ref": "#/$defs/s12.announcements.v1.VideoMeta"
            }
          ],
          "description": "Contains meta information about the video"
        },
        "document": {
          "allOf": [
            {
              "$ref": "#/$defs/s12.announcements.v1.DocumentMeta"
            }
          ],
          "description": "Contains meta information about the document"
        },
        "linked_document": {
          "allOf": [
            {
              "$ref": "#/$defs/s12.announcements.v1.LinkedDocument"
            }
          ],
          "description": "Contains meta information about the linked document"
        }
      },
      "title": "HeadsUpMedia represents media associated with a HeadsUp"
    },
    "s12.announcements.v1.LinkedDocument": {
      "type": "object",
      "properties": {
        "link_id": {
          "type": "string",
          "description": "ID of the link relationship connecting this media to the asset."
        },
        "is_archived": {
          "type": "boolean",
          "description": "Boolean flag indicating whether the linked media is archived."
        },
        "document_node_id": {
          "type": "string",
          "description": "Document node ID the media came from."
        },
        "expiry_status": {
          "description": "Expiry status of the document the media came from.",
          "allOf": [
            {
              "$ref": "#/$defs/s12.common.ExpiryStatus"
            }
          ]
        },
        "acknowledgement_type": {
          "description": "The acknowledgement requirement on this linked document.\nACKNOWLEDGEMENT_TYPE_UNSPECIFIED means no acknowledgement is required.",
          "allOf": [
            {
              "$ref": "#/$defs/s12.documents.v1.AcknowledgementType"
            }
          ]
        },
        "acknowledged": {
          "type": "boolean",
          "description": "Whether the requesting user has satisfied the acknowledgement requirement\nfor this linked document's version. Always true when acknowledgement_type\nis ACKNOWLEDGEMENT_TYPE_UNSPECIFIED."
        },
        "acknowledged_at": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when the requesting user acknowledged this document.\nOnly set when acknowledged is true."
        }
      }
    },
    "s12.announcements.v1.VideoMeta": {
      "type": "object",
      "properties": {
        "video_duration": {
          "type": "integer",
          "format": "int64",
          "description": "Number of milliseconds in the video"
        },
        "is_video_transcoded": {
          "type": "boolean",
          "description": "Whether or not the video has been transcoded"
        }
      }
    },
    "s12.common.ExpiryStatus": {
      "type": "string",
      "enum": [
        "EXPIRY_STATUS_VALID",
        "EXPIRY_STATUS_EXPIRED",
        "EXPIRY_STATUS_EXPIRING_SOON"
      ],
      "description": "The expiry status of an object based on its validity period."
    },
    "s12.common.Media": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "token": {
          "type": "string"
        },
        "filename": {
          "type": "string",
          "description": "full file name, including file extension"
        },
        "media_type": {
          "$ref": "#/$defs/s12.common.MediaType"
        }
      },
      "title": "Represents an image or video"
    },
    "s12.common.MediaType": {
      "type": "string",
      "enum": [
        "MEDIA_TYPE_IMAGE",
        "MEDIA_TYPE_VIDEO",
        "MEDIA_TYPE_PDF",
        "MEDIA_TYPE_DOCX",
        "MEDIA_TYPE_XLSX",
        "MEDIA_TYPE_PPTX",
        "MEDIA_TYPE_CSV"
      ],
      "description": " - MEDIA_TYPE_IMAGE: An image file (GIF, JPG, PNG, WEBP).\n - MEDIA_TYPE_VIDEO: A video file (MP4, MOV).\n - MEDIA_TYPE_PDF: A PDF document.\n - MEDIA_TYPE_DOCX: A Microsoft Word document (DOCX, DOC).\n - MEDIA_TYPE_XLSX: A Microsoft Excel spreadsheet (XLSX, XLS).\n - MEDIA_TYPE_PPTX: A Microsoft PowerPoint presentation (PPTX, PPT).\n - MEDIA_TYPE_CSV: A CSV file."
    },
    "s12.documents.v1.AcknowledgementType": {
      "type": "string",
      "enum": [
        "ACKNOWLEDGEMENT_TYPE_UNSPECIFIED",
        "ACKNOWLEDGEMENT_TYPE_ACKNOWLEDGEMENT",
        "ACKNOWLEDGEMENT_TYPE_SIGNATURE"
      ],
      "default": "ACKNOWLEDGEMENT_TYPE_UNSPECIFIED",
      "description": "The acknowledgement type for a linked node — used both as the requirement on a link\nand as the type recorded when a user acknowledges.\nUNSPECIFIED means no acknowledgement is required.\n\n - ACKNOWLEDGEMENT_TYPE_UNSPECIFIED: No acknowledgement required."
    }
  }
}