Register a webhook
Register a webhook for any updates using one or multiple of the following resource types comma separated: room_update, recording_update.
Note that you
can register a single webhook, use the received response type to detect its
purpose. The webhook endpoint on your server requires to accept an HTTPS POST
request, the body of the request is provided in JSON format.
You can verify your requests using a SHA256 HMAC on the request body using your
API key, the corresponding hash is sent within header X-Eyeson-Signature
.
POST /webhooks
HEADERS Authorization
RESPONSES 201 CREATED, 400 BAD REQUEST, 403 FORBIDDEN
Parameters | Type | Description |
---|---|---|
url | String (required) | Target URL. |
types | String (required) | Comma separated resource types. |
Check the current registered webhook as well as the last sent message timestamp and response code.
GET /webhooks
HEADERS Authorization
RESPONSES 200 OK, 403 FORBIDDEN
Example Response
{
"id": "63ede98fb20526000f64378a",
"types": [
"room_update"
],
"url": "https://myawesomeapp.com/meeting-webhook",
"last_request_sent_at": "2021-01-01T09:00:00.000+00:00",
"last_response_code": "201"
}
DELETE /webhooks/<webhook_id>
HEADERS Authorization
RESPONSES 204 NO CONTENT, 400 BAD REQUEST, 403 FORBIDDEN, 404 NOT FOUND
In order to get notified for new recordings in any room session, you can
register a webhook upfront, using your target location and the webhook type
recording_update
. See the recording resource on details of the received JSON
document.
Example Webhook
{
"timestamp": 1609493400,
"type": "recording_update",
"recording": {
"id": "63ede57ff3e015000fbe1af5",
"created_at": 1609491600,
"duration": 1800,
"links": {
"self": "https://api.eyeson.team/recordings/63ede57ff3e015000fbe1af5",
"download": "https://fs.eyeson.com/meetings/<key>.webm?..."
},
"user": {
"id": "63ede350b20526000f64376d",
"name": "Jane Doe",
"avatar": "https://myawesomeapp.com/images/avatar.png",
"guest": false,
"joined_at": "2021-01-01T09:00:00.000Z"
},
"room": {
"id": "63ede350b20526000f64376b",
"name": "eyeson room",
"ready": true,
"started_at": "2021-01-01T09:00:00.000Z",
"shutdown": false,
"sip": {
...
},
"guest_token": "gKsiVlrvkFyL3klk1wBHLlm3"
}
}
}
If you want to build up a meeting history in your application, register a
webhook for room_update
and track when receiving a room update where
shutdown
attribute is true
.
Example Webhook
{
"timestamp": 1609493400,
"type": "room_update",
"room": {
"id": "63ede350b20526000f64376b",
"name": "eyeson room",
"ready": false,
"started_at": null,
"shutdown": true,
"sip": {
...
}
}
}