Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 740 Bytes

send-event.md

File metadata and controls

43 lines (29 loc) · 740 Bytes

send event - Devices API

The send event method of the devices API enables sending an event to listeners of specific devices events.

HTTP Request

POST /api/devices/<device_token>/events

Request Payload

{
    "type": "<String>",
    "data": "<Any>"
}
  • type defines what type of event has been triggered.
  • data contains the event specific payload.

Event Types

See device specific events

Example

Request:

POST /api/devices/1d9f5d30-830f-11ea-8dcb-0021ccd76152/events

{
    "type": "start_session",
    "data": {
      "session_token": "974c84e0-c35d-11e9-8f8d-47bb5bb0037d"
    }
}

Response:

200 OK