Skip to content

View Engagement API

This API records the viewing engagement data of the videos.

Endpoint

POST /v2/watch/stream/view-engagement

Query Parameters

Parameter Type Requirement Description
sk String Required Stream key received in the playback API response.
sp Object Required Stream policy received in the playback API response.

Request Body

    {
        "seconds_viewed": [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620]
    }
Parameter Type Requirement Description
seconds_viewed Array Required An array of integers that indicates the seconds viewed.

Response Body

    {
        "status_code": "W0000",
         "detail": <str> # Returned in case of an error status code
    }
Field Type Description
status_code String Status code sent by Indee. See details in the table below.
detail String Returned in case of an error status code. See Status Codes section below for more.

Status Codes

Following are the API status codes provided by Indee.

Indee Status Code HTTP Response Code Description
W0000 HTTP 200 Success
W1001 HTTP 200 Success
W2000 HTTP 401 Authorization header was either not passed or there was an issue parsing it.
W2001 HTTP 401 Invalid API key - Revoked, expired, or non-existent key.
W2002 HTTP 401 Invalid Credentials
W2003 HTTP 401 Invalid or expired refresh token.
W2101 HTTP 403 Permission Denied - User not authorized to perform action
W4900 HTTP 400 Invalid body - Missing / incomplete / incorrect format
W4901 HTTP 400 Invalid device - Device not found
W5000 HTTP 500 Server error
W5001 HTTP 429 Rate limited