---
title: "Create an event used to record user actions"
method: POST
path: "/events"
tags: ["Events"]
---

# Create an event used to record user actions

`POST /events`

## Request

- Base URL: `https://partners.disconetwork.com`
- URL: `https://partners.disconetwork.com/events`
- Auth: none declared. Required headers: `version`
- TypeScript: <https://skmtc.dev/disconetwork/apis/external-api-for-disco-integration-partners/docs/events/post.ts> (a function with typed inputs; its response is checked against the schema)

Report what the shopper saw and did with the offers returned by `/recommendations`. Send the `session_id` from the recommendations response with every event. The `event_name` values, what triggers each one and how often to send it:

| Event name | Description | Frequency |
|---|---|---|
| `WIDGET_LOAD` | Triggered when the ad unit (widget) displaying Disco-powered recommendations successfully loads into the UI | Once per session |
| `WIDGET_DISPLAY` | Triggered when the widget is visible within the viewport (even if partially) | Once per session |
| `WIDGET_VIEW` | Triggered when the widget is visible within the viewport and meets IAB viewability standards (at least 50% in view for a minimum of 1 second) | Once per session |
| `BRAND_DISPLAY` | Triggered when a specific brand/offer is visible within the viewport (even if partially) | Once per every advertiser |
| `BRAND_VIEW` | Triggered when a specific brand/offer is visible within the viewport and meets IAB viewability standards (at least 50% in view for a minimum of 1 second) | Once per every advertiser |
| `BRAND_CLICK` | Triggered when the user clicks on a specific brand/offer | |
| `PRODUCT_DISPLAY` | Triggered when a specific product is visible within the viewport (even if partially) | Once per every product |
| `PRODUCT_VIEW` | Triggered when a specific product is visible within the viewport and meets IAB viewability standards (at least 50% in view for a minimum of 1 second) | Once per every product |
| `PRODUCT_CLICK` | Triggered when the user clicks on a specific product | |
| `ELEMENT_CLICK` | Triggered when the user clicks on a non-significant element, such as: skipping an offer button, the privacy policy link, etc. | |

## Headers

- `version` string, required

## Request body

- union: Request body for hitting the /event endpoint
  - WidgetEventRequest: The properties shared on all events
    - `event_name` 'WIDGET_LOAD' | 'WIDGET_DISPLAY' | 'WIDGET_VIEW' | 'BRAND_DISPLAY' | 'BRAND_VIEW' | 'BRAND_CLICK' | 'PRODUCT_DISPLAY' | 'PRODUCT_VIEW' | 'PRODUCT_CLICK' | 'ELEMENT_CLICK', required: The name of the event you are sending to Disco. Casing must be all caps
    - `event_datetime` string, date-time, required: The [RFC-3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) datetime at which the event occurred on the shopper's device
    - `session_id` string, uuid, required: An identifier provided on the response of the recommendations endpoint to identify the session associated with the event
  - ElementClickRequest: The properties shared on all events
    - `event_name` 'WIDGET_LOAD' | 'WIDGET_DISPLAY' | 'WIDGET_VIEW' | 'BRAND_DISPLAY' | 'BRAND_VIEW' | 'BRAND_CLICK' | 'PRODUCT_DISPLAY' | 'PRODUCT_VIEW' | 'PRODUCT_CLICK' | 'ELEMENT_CLICK', required: The name of the event you are sending to Disco. Casing must be all caps
    - `event_datetime` string, date-time, required: The [RFC-3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) datetime at which the event occurred on the shopper's device
    - `session_id` string, uuid, required: An identifier provided on the response of the recommendations endpoint to identify the session associated with the event
    - `initiating_target` 'INLINE_NAV_FORWARD' | 'INLINE_NAV_BACKWARD' | 'INLINE_FOOTER_DISCO' | 'INLINE_FOOTER_PRIVACY', required: Indicates the UI element that triggered this event
    - `brand_properties` BrandEventProperties
      - `offer_id` string, uuid, required: Unique identifier of the offer this event is being sent for
      - `advertiser_id` string, uuid, required: Unique identifier of the advertiser this event is being sent for
      - `insertion_id` string, required: Unique identifier associated with this advertiser provided from the recommendations endpoint
  - BrandDisplayRequest: The properties shared on all events
    - `event_name` 'WIDGET_LOAD' | 'WIDGET_DISPLAY' | 'WIDGET_VIEW' | 'BRAND_DISPLAY' | 'BRAND_VIEW' | 'BRAND_CLICK' | 'PRODUCT_DISPLAY' | 'PRODUCT_VIEW' | 'PRODUCT_CLICK' | 'ELEMENT_CLICK', required: The name of the event you are sending to Disco. Casing must be all caps
    - `event_datetime` string, date-time, required: The [RFC-3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) datetime at which the event occurred on the shopper's device
    - `session_id` string, uuid, required: An identifier provided on the response of the recommendations endpoint to identify the session associated with the event
    - `initiating_target` 'INLINE_SLOT', required: Indicates the UI element that triggered this event
    - `brand_properties` BrandEventProperties, required
      - `offer_id` string, uuid, required: Unique identifier of the offer this event is being sent for
      - `advertiser_id` string, uuid, required: Unique identifier of the advertiser this event is being sent for
      - `insertion_id` string, required: Unique identifier associated with this advertiser provided from the recommendations endpoint
  - BrandClickRequest: The properties shared on all events
    - `event_name` 'WIDGET_LOAD' | 'WIDGET_DISPLAY' | 'WIDGET_VIEW' | 'BRAND_DISPLAY' | 'BRAND_VIEW' | 'BRAND_CLICK' | 'PRODUCT_DISPLAY' | 'PRODUCT_VIEW' | 'PRODUCT_CLICK' | 'ELEMENT_CLICK', required: The name of the event you are sending to Disco. Casing must be all caps
    - `event_datetime` string, date-time, required: The [RFC-3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) datetime at which the event occurred on the shopper's device
    - `session_id` string, uuid, required: An identifier provided on the response of the recommendations endpoint to identify the session associated with the event
    - `initiating_target` 'INLINE_ACTION_BUTTON' | 'INLINE_ASSET_TILE', required: Indicates the UI element that triggered this event
    - `asset_id` string: The id of the asset clicked, if an asset click triggered this event
    - `brand_properties` BrandEventProperties, required
      - `offer_id` string, uuid, required: Unique identifier of the offer this event is being sent for
      - `advertiser_id` string, uuid, required: Unique identifier of the advertiser this event is being sent for
      - `insertion_id` string, required: Unique identifier associated with this advertiser provided from the recommendations endpoint

## Response `201`

The request was successful, and a new resource was created.

## Other responses

- `400`: The server could not understand the request due to invalid syntax. The client should modify the request and try again.
- `401`: Authentication is required to access the requested resource. The client must include the appropriate credentials.
- `403`: The server understood the request, but refuses to authorize it. Ensure the client has appropriate permissions.
- `500`: The server encountered an unexpected condition that prevented it from fulfilling the request. Report the issue to the support team if it persists.

---

[API](https://skmtc.dev/disconetwork/apis/external-api-for-disco-integration-partners.md) - [All operations](https://skmtc.dev/disconetwork/apis/external-api-for-disco-integration-partners/llms.txt) - [OpenAPI document](https://skmtc.dev/disconetwork/apis/external-api-for-disco-integration-partners/revisions/6daa87b07a73?raw)
