webhook
Create a webhook
To create a new webhook, you need to make an API call with the events you want to listen for and the URL that will be called when those events occur.
post/webhook
Request body
Example request
{
"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
"name": "test_webhook",
"kind": "webhook",
"projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
"createdAt": 1587667174725,
"events": [
"stream.started",
"stream.idle"
],
"url": "https://my-service.com/webhook",
"sharedSecret": "my-secret",
"streamId": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
"status": {
"lastFailure": {
"timestamp": 1587667174725,
"error": "Error message",
"response": "Response body",
"statusCode": 500
},
"lastTriggeredAt": 1587667174725
}
}Response
Success
Example response
{
"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
"name": "test_webhook",
"kind": "webhook",
"projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
"createdAt": 1587667174725,
"events": [
"stream.started",
"stream.idle"
],
"url": "https://my-service.com/webhook",
"sharedSecret": "my-secret",
"streamId": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
"status": {
"lastFailure": {
"timestamp": 1587667174725,
"error": "Error message",
"response": "Response body",
"statusCode": 500
},
"lastTriggeredAt": 1587667174725
}
}