Webhooks
Webhook subscriptions and delivery targets
Retrieve all webhooks in your organization.
Authorization
ApiKeyAuth Bearer token with your API key. Example: Bearer sk_live_xxx
In: header
Query Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/webhooks"{
"recType": "webhook-collection",
"items": [
{
"id": "wh_abc123",
"recType": "webhook",
"url": "https://example.com/webhooks/tempivo",
"status": "active",
"events": [
"data.measurement.alert",
"alert.created"
],
"createdAt": "2024-05-21T10:30:00.000Z",
"updatedAt": "2024-05-21T10:30:00.000Z"
}
],
"totalItems": 1
}{
"success": false,
"message": "Invalid or inactive API key"
}Create a webhook endpoint for event delivery.
Authorization
ApiKeyAuth Bearer token with your API key. Example: Bearer sk_live_xxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/webhooks" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/webhooks/tempivo", "secret": "whsec_xxx", "status": "active", "events": [ "data.measurement.alert", "alert.created" ] }'{
"id": "wh_abc123",
"recType": "webhook",
"url": "https://example.com/webhooks/tempivo",
"status": "active",
"events": [
"data.measurement.alert",
"alert.created"
],
"createdAt": "2024-05-21T10:30:00.000Z",
"updatedAt": "2024-05-21T10:30:00.000Z"
}{
"success": false,
"message": "Invalid or inactive API key"
}Retrieve a single webhook by ID.
Authorization
ApiKeyAuth Bearer token with your API key. Example: Bearer sk_live_xxx
In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/webhooks/string"{
"id": "wh_abc123",
"recType": "webhook",
"url": "https://example.com/webhooks/tempivo",
"status": "active",
"events": [
"data.measurement.alert",
"alert.created"
],
"createdAt": "2024-05-21T10:30:00.000Z",
"updatedAt": "2024-05-21T10:30:00.000Z"
}{
"success": false,
"message": "Invalid or inactive API key"
}Update URL, secret, status or subscribed events.
Authorization
ApiKeyAuth Bearer token with your API key. Example: Bearer sk_live_xxx
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X PATCH "https://example.com/webhooks/string" \ -H "Content-Type: application/json" \ -d '{ "status": "disabled" }'{
"id": "wh_abc123",
"recType": "webhook",
"url": "https://example.com/webhooks/tempivo",
"status": "active",
"events": [
"data.measurement.alert",
"alert.created"
],
"createdAt": "2024-05-21T10:30:00.000Z",
"updatedAt": "2024-05-21T10:30:00.000Z"
}{
"success": false,
"message": "Invalid or inactive API key"
}{
"success": false,
"message": "Invalid or inactive API key"
}Delete a webhook endpoint.
Authorization
ApiKeyAuth Bearer token with your API key. Example: Bearer sk_live_xxx
In: header
Path Parameters
Response Body
application/json
curl -X DELETE "https://example.com/webhooks/string"{
"success": false,
"message": "Invalid or inactive API key"
}How is this guide?