Skip to main content
GET
/
webhooks
List Webhooks
curl --request GET \
  --url https://api.example.com/webhooks \
  --header 'Authorization: <authorization>'
{
  "data": [
    {}
  ],
  "total": 123,
  "id": "<string>",
  "apiKeyId": "<string>",
  "companyId": "<string>",
  "url": "<string>",
  "name": "<string>",
  "description": "<string>",
  "headers": [
    {}
  ],
  "events": [
    {}
  ],
  "isActive": true,
  "maxRetries": 123,
  "timeoutMs": 123,
  "consecutiveFailures": 123,
  "circuitOpenedAt": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>"
}
Lists all webhook configurations for your API key.

Overview

The list webhooks endpoint returns all webhook configurations associated with your API key. Use this to monitor webhook health, check subscription status, and manage your webhook configurations.

Authentication

Authorization
string
required
Bearer token with read:webhooks scope

Query Parameters

companyId
string
Filter webhooks by company ID. If provided, returns only webhooks associated with that specific company (excludes global webhooks). If omitted, returns all webhooks including global ones. Useful for ATS integrations managing multiple companies.

Response

data
array
Array of webhook configuration objects
total
number
Total number of webhook configurations

Webhook Configuration Object

id
string
Unique identifier for the webhook
apiKeyId
string
The API key ID this webhook belongs to
companyId
string
Company ID this webhook is associated with. Null if webhook receives events for all companies (global webhook).
url
string
The endpoint URL receiving webhook notifications
name
string
Human-readable name for the webhook
description
string
Description of the webhook’s purpose
headers
array
Custom headers configured for this webhook. Sensitive header values are masked.
events
array
Array of subscribed event type labels (e.g., “interview.completed”)
isActive
boolean
Whether the webhook is currently active
maxRetries
number
Maximum retry attempts for failed deliveries
timeoutMs
number
Request timeout in milliseconds
consecutiveFailures
number
Current count of consecutive delivery failures
circuitOpenedAt
string
ISO 8601 timestamp when circuit breaker was triggered (null if closed)
createdAt
string
ISO 8601 timestamp when webhook was created
updatedAt
string
ISO 8601 timestamp when webhook was last updated

Example Request

curl -X GET "https://api.instaview.sk/webhooks?companyId=company-uuid" \
  -H "Authorization: Bearer sk_your_key_here"

Example Response

{
  "success": true,
  "data": {
    "data": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "apiKeyId": "api-key-uuid",
        "companyId": "company-uuid",
        "url": "https://api.example.com/webhooks/instaview",
        "name": "Production Webhook",
        "description": "Receives interview completion notifications",
        "headers": [
          { "name": "Authorization", "isMasked": true },
          { "name": "X-Custom-Header", "isMasked": false }
        ],
        "events": ["interview.completed", "analysis.completed"],
        "isActive": true,
        "maxRetries": 3,
        "timeoutMs": 30000,
        "consecutiveFailures": 0,
        "circuitOpenedAt": null,
        "createdAt": "2024-01-15T10:30:00Z",
        "updatedAt": "2024-01-15T10:30:00Z"
      }
    ],
    "total": 1
  }
}

Monitoring Webhook Health

Check webhook health by examining consecutiveFailures and circuitOpenedAt:
async function checkWebhookHealth() {
  const response = await fetch("https://api.instaview.sk/webhooks", {
    headers: { Authorization: `Bearer ${apiKey}` },
  });

  const { data } = await response.json();

  const unhealthy = data.data.filter(
    (w) => w.consecutiveFailures > 0 || w.circuitOpenedAt
  );

  for (const webhook of unhealthy) {
    console.warn(`Webhook ${webhook.name || webhook.id}:`);
    console.warn(`  Failures: ${webhook.consecutiveFailures}`);
    console.warn(`  Circuit Open: ${webhook.circuitOpenedAt || "No"}`);
  }

  return unhealthy;
}