Tempivo Help
REST API

Webhooks

Webhook subscriptions and delivery targets

REST API overview

GET
/webhooks

Retrieve all webhooks in your organization.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Bearer token with your API key. Example: Bearer sk_live_xxx

In: header

Query Parameters

status?string
limit?integer

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"
}
POST
/webhooks

Create a webhook endpoint for event delivery.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

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"
}
GET
/webhooks/{webhookId}

Retrieve a single webhook by ID.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Bearer token with your API key. Example: Bearer sk_live_xxx

In: header

Path Parameters

webhookId*string

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"
}
PATCH
/webhooks/{webhookId}

Update URL, secret, status or subscribed events.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Bearer token with your API key. Example: Bearer sk_live_xxx

In: header

Path Parameters

webhookId*string

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
/webhooks/{webhookId}

Delete a webhook endpoint.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Bearer token with your API key. Example: Bearer sk_live_xxx

In: header

Path Parameters

webhookId*string

Response Body

application/json

curl -X DELETE "https://example.com/webhooks/string"
Empty
{
  "success": false,
  "message": "Invalid or inactive API key"
}

How is this guide?