---
title: "Archive one or many Events."
method: POST
path: "/oc-event"
---

# Archive one or many Events.

`POST /oc-event`

## Request

- Base URL: `https://eventfeed.api.globalrelay.com/v2`
- URL: `https://eventfeed.api.globalrelay.com/v2/oc-event`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://iam-oauth2.globalrelay.com/oauth2/token` scopes: `eventfeed`, `write`, `openid`
- TypeScript: <https://skmtc.dev/globalrelay/apis/event-archiving-api/docs/oc-event/post.ts> (a function with typed inputs; its response is checked against the schema)

The data you send in each API request will be stored in an individual Archive message, rendered in Cards and Sections. In order to connect the data from separate API requests you should use the same 'overview.threadId' value in each of those requests.

## Headers

- `Host` string, required

## Request body

- EventFeed: Object that will be converted into an Archive message
  - `requestInfo` EventFeedRequestInfo, required: Top level information that must be included in every request payload.
    - `requestId` string, uuid, required: Client generated UUID for tracking purposes (A UUID specified by RFC4122). Every call to the API should have a distinct UUID.
  - `overview` EventFeedOverview, required: Meta information related to the event thread that will be used to populate headers on the archive record.
    - `owner` EventFeedUser, required: The owner of an individual event within a thread, for example the creator of a comment on a social media post. Typically a user or a company. Used to populate the TO header on the archive record.
      - `identifier` string, required: Typically this will be an email address, but alternatives are acceptable. This value will be populated to the headers of the archive record.
      - `displayName` string: Typically the name of the user. This value will be rendered alongside a corresponding event, and also populated to the headers of the archive record.
      - `portrait` EventFeedFileInfo
        - `fileKey` string, required: Unique identifier for a file. This should correlate to the fileKey used while uploading the file using the /files endpoint, including the /default/ prefix.
        - `filename` string, required: Name of the file, displayed in the Archive.
        - `isAvailable` boolean: Use to indicate if the file was successfully uploaded to Global Relay using the files endpoint. When true, the file will subsequently fetched for inclusion in the archive record. When false, the archive record will proceed and render the filename without attaching the file.
        - `href` string: If populated and isAvailable was ‘false’, the ‘filename’ is rendered as a hyperlink to an external site defined in "href". Use case: The file was not uploaded to Global Relay but you want to provide a link to the file where it is located at the external platform.
        - `isInlined` boolean: Particularly for image files, use isInlined = true to indicate that the image should be rendered in the archive record and not just included as an attachment.
      - `headline` string: Populate this field to render text below the displayName. Use-case: to render a user’s job title or department below their name
      - `href` string: Populating this field creates a hyperlink on the ‘displayName’ field, pointing to the external site specified in "href"
    - `threadId` string: An Id that connects request payloads related to the same thread/conversation. For example, payloads related to a social media post and its subsequent comments and replies should use the same threadId so they can be easily linked in your Archive.
    - `eventFeedProperties` EventFeedProperty[]: Any additional properties for this Event Feed payload. These properties will be added to a Properties table on the record body. Where xheader is set to true then the associated property will also be added to the record headers (At most 10 properties with the xheader flag set to true are allowed.)
      - `name` string, required: The name of the property. If xheader is true, then this field is limited to 30 characters and may only contain printable US-ASCII characters (excluding spaces and colons).
      - `value` string, required: The value of the property. If xheader is true, then this field is limited to 900 characters.
      - `xheader` boolean: If true then this name-value pair is added to the record headers with the name prefixed by "X-GR-OC-"
    - `subjectOverride` string: You can create custom subjects for your archived messages instead of using the default subject. This field is limited to 400 characters. <br><br>Note, the default subject follows this format: <br>Data type: Subtype: owner, number of Compliance Events <br>e.g. Instagram: MediaPost: Joe Bloggs, 4 Compliance Events
  - `cards` EventFeedCard[], required
    - `title` string: Title of a card. Optional, but recommended
    - `collapsible` boolean: Indicates if a card should be rendered with the accordion feature that allows the archive user to expand/collapse the area of the card
    - `collapsed` boolean: Indicates if a card should be collapsed by default when viewed in the archive, leaving only the card title visible. This field should only be used if collapsible is set to "true".
    - `sections` EventFeedSection[], required
      - `title` string: (Optional) title for a section on a card
      - `events` EventFeedEvent[]: A rich form of event that can include information about the event owner, text/media related to the event plus meta-data about the event. Example use case: a new social media post containing text and attachments.
        - `eventTime` string, date-time, required: Event date and time in UTC formatted as RFC 3339 (ISO 8601 full time). Each event is expected to have its own distinct eventTime. Example scenario: A new ‘Post’ event has an eventTime of 2023-01-01T08:30:00Z and a subsequent ‘Post Edited’ event has an eventTime of 2023-01-01T09:15:00Z
        - `user` EventFeedUser, required: The owner of an individual event within a thread, for example the creator of a comment on a social media post. Typically a user or a company. Used to populate the TO header on the archive record.
          - `identifier` string, required: Typically this will be an email address, but alternatives are acceptable. This value will be populated to the headers of the archive record.
          - `displayName` string: Typically the name of the user. This value will be rendered alongside a corresponding event, and also populated to the headers of the archive record.
          - `portrait` EventFeedFileInfo
            - `fileKey` string, required: Unique identifier for a file. This should correlate to the fileKey used while uploading the file using the /files endpoint, including the /default/ prefix.
            - `filename` string, required: Name of the file, displayed in the Archive.
            - `isAvailable` boolean: Use to indicate if the file was successfully uploaded to Global Relay using the files endpoint. When true, the file will subsequently fetched for inclusion in the archive record. When false, the archive record will proceed and render the filename without attaching the file.
            - `href` string: If populated and isAvailable was ‘false’, the ‘filename’ is rendered as a hyperlink to an external site defined in "href". Use case: The file was not uploaded to Global Relay but you want to provide a link to the file where it is located at the external platform.
            - `isInlined` boolean: Particularly for image files, use isInlined = true to indicate that the image should be rendered in the archive record and not just included as an attachment.
          - `headline` string: Populate this field to render text below the displayName. Use-case: to render a user’s job title or department below their name
          - `href` string: Populating this field creates a hyperlink on the ‘displayName’ field, pointing to the external site specified in "href"
        - `eventType` 'Post' | 'Post Edited' | 'Post Deleted' | 'Response to Post' | 'Response to Post Edited' | 'Response to Post Deleted' | 'Reaction' | 'Profile' | 'Profile Deleted' | 'Profile Edited' | 'User Added' | 'User Removed' | 'History Post', required: Each event must be categorized by eventType. eventType contributes to the Analytics available within the archive.
        - `participants` EventFeedSimpleUser[]: List of users to be added to the 'TO' header in the archive message. Example use case: A user is tagged within a social media post.
          - `identifier` string: Typically this will be an email address, but alternatives are acceptable. This value will be populated to the headers of the archive record.
          - `displayName` string: Typically the name of the user. This value will be rendered alongside a corresponding event, and also populated to the headers of the archive record.
          - `href` string: Populating this field creates a hyperlink on the ‘displayName’ field, pointing to the external site specified in ‘href’
        - `body` EventFeedEventContent
          - `text` string: Event content in format defined by 'textType'.
          - `textType` 'plain' | 'html': Format of text.
          - `textHref` string: If populated, the ‘text’ field is rendered as a hyperlink to an external site defined in "textHref".
          - `file` EventFeedFileInfo
            - `fileKey` string, required: Unique identifier for a file. This should correlate to the fileKey used while uploading the file using the /files endpoint, including the /default/ prefix.
            - `filename` string, required: Name of the file, displayed in the Archive.
            - `isAvailable` boolean: Use to indicate if the file was successfully uploaded to Global Relay using the files endpoint. When true, the file will subsequently fetched for inclusion in the archive record. When false, the archive record will proceed and render the filename without attaching the file.
            - `href` string: If populated and isAvailable was ‘false’, the ‘filename’ is rendered as a hyperlink to an external site defined in "href". Use case: The file was not uploaded to Global Relay but you want to provide a link to the file where it is located at the external platform.
            - `isInlined` boolean: Particularly for image files, use isInlined = true to indicate that the image should be rendered in the archive record and not just included as an attachment.
        - `originalBody` EventFeedEventContent
          - `text` string: Event content in format defined by 'textType'.
          - `textType` 'plain' | 'html': Format of text.
          - `textHref` string: If populated, the ‘text’ field is rendered as a hyperlink to an external site defined in "textHref".
          - `file` EventFeedFileInfo
            - `fileKey` string, required: Unique identifier for a file. This should correlate to the fileKey used while uploading the file using the /files endpoint, including the /default/ prefix.
            - `filename` string, required: Name of the file, displayed in the Archive.
            - `isAvailable` boolean: Use to indicate if the file was successfully uploaded to Global Relay using the files endpoint. When true, the file will subsequently fetched for inclusion in the archive record. When false, the archive record will proceed and render the filename without attaching the file.
            - `href` string: If populated and isAvailable was ‘false’, the ‘filename’ is rendered as a hyperlink to an external site defined in "href". Use case: The file was not uploaded to Global Relay but you want to provide a link to the file where it is located at the external platform.
            - `isInlined` boolean: Particularly for image files, use isInlined = true to indicate that the image should be rendered in the archive record and not just included as an attachment.
        - `eventFields` EventFeedField[]: Use to render one or more individual fields related to the event, represented as key-value pairs
          - `fieldTitle` string: Title of a key/value pair
          - `fieldValues` EventFeedFieldValue[]: Value(s) of a key/value pair.
            - `content` EventFeedEventContent
              - …
            - `originalContent` EventFeedEventContent
              - …
        - `indentation` integer: Use to define a level of indentation (shifted right) for rendering an event. Use case: nested replies can be rendered more clearly where child replies have a higher indentation level than their parent event.
      - `simpleEvents` EventFeedSimpleEvent[]: A reduced form of event that simply captures the event owner and timestamp of that event. Example use case: create events for each user that "liked" a post.
        - `eventTime` string, date-time, required: Event date and time in UTC formatted as RFC 3339 (ISO 8601 full time). Each event is expected to have its own distinct eventTime.
        - `user` EventFeedSimpleUser, required
          - `identifier` string: Typically this will be an email address, but alternatives are acceptable. This value will be populated to the headers of the archive record.
          - `displayName` string: Typically the name of the user. This value will be rendered alongside a corresponding event, and also populated to the headers of the archive record.
          - `href` string: Populating this field creates a hyperlink on the ‘displayName’ field, pointing to the external site specified in ‘href’
        - `eventType` 'Reaction', required: Supports only reactions(likes)

## Response `200`

Successful operation.

- CreateEventFeedResponse: API responses.
  - `reconciliationId` string: Unique ID assigned by Global Relay for each request

## Other responses

- `202`: Accepted
- `400`: Bad Request. Request is not well-formed.
- `401`: Unauthorized.
- `404`: Resource Not Found
- `413`: Request size exceeds the allowable limit.
- `429`: Rate Limit for this endpoint has been exceeded. Check headers for more information.
- `500`: Internal server error.

---

[API](https://skmtc.dev/globalrelay/apis/event-archiving-api.md) - [All operations](https://skmtc.dev/globalrelay/apis/event-archiving-api/llms.txt) - [OpenAPI document](https://skmtc.dev/globalrelay/apis/event-archiving-api/revisions/0678c3625505?raw)
