Skip to content

Webhook Endpoints

Webhooks allow you to receive real-time HTTP callbacks when events occur in VeraID. Each webhook is configured with a target URL and a list of event types to subscribe to. All webhook payloads are signed with HMAC-SHA256 for verification.

List Webhooks

Retrieve all configured webhooks for your organization.

GET /api/v1/webhooks

Example Request

Terminal window
curl -X GET https://app.veraid.io/api/v1/webhooks \
-H "Authorization: Bearer kd_live_abc123..."

Example Response

{
"data": [
{
"id": "wh_abc123",
"name": "Production Event Handler",
"url": "https://api.company.com/webhooks/veraid",
"events": [
"identity.created",
"identity.suspended",
"credential.rotated",
"anomaly.detected"
],
"status": "ACTIVE",
"signingSecret": "whsec_••••••••",
"createdAt": "2026-01-15T10:00:00Z",
"updatedAt": "2026-03-01T14:30:00Z",
"stats": {
"totalDeliveries": 4521,
"successfulDeliveries": 4498,
"failedDeliveries": 23,
"lastDeliveryAt": "2026-03-19T09:30:00Z",
"lastDeliveryStatus": "SUCCESS"
}
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1,
"totalPages": 1,
"hasMore": false
}
}

Create Webhook

Register a new webhook endpoint.

POST /api/v1/webhooks

Request Body

FieldTypeRequiredDescription
namestringYesDisplay name (2-100 characters)
urlstringYesTarget URL (must be a valid URI with HTTPS scheme)
eventsstring[]YesList of event types to subscribe to

Example Request

Terminal window
curl -X POST https://app.veraid.io/api/v1/webhooks \
-H "Authorization: Bearer kd_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"name": "Security Event Handler",
"url": "https://api.company.com/webhooks/veraid-security",
"events": [
"identity.created",
"identity.updated",
"identity.suspended",
"identity.revoked",
"credential.created",
"credential.used",
"credential.expired",
"credential.revoked",
"policy.violated",
"anomaly.detected",
"alert.triggered"
]
}'

Example Response

{
"id": "wh_def456",
"name": "Security Event Handler",
"url": "https://api.company.com/webhooks/veraid-security",
"events": [
"identity.created",
"identity.updated",
"identity.suspended",
"identity.revoked",
"credential.created",
"credential.used",
"credential.expired",
"credential.revoked",
"policy.violated",
"anomaly.detected",
"alert.triggered"
],
"status": "ACTIVE",
"signingSecret": "whsec_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"createdAt": "2026-03-19T10:00:00Z",
"updatedAt": "2026-03-19T10:00:00Z"
}

Get Webhook

Retrieve a single webhook by ID.

GET /api/v1/webhooks/{id}

Example Request

Terminal window
curl -X GET https://app.veraid.io/api/v1/webhooks/wh_abc123 \
-H "Authorization: Bearer kd_live_abc123..."

Example Response

{
"id": "wh_abc123",
"name": "Production Event Handler",
"url": "https://api.company.com/webhooks/veraid",
"events": [
"identity.created",
"identity.suspended",
"credential.rotated",
"anomaly.detected"
],
"status": "ACTIVE",
"signingSecret": "whsec_••••••••",
"createdAt": "2026-01-15T10:00:00Z",
"updatedAt": "2026-03-01T14:30:00Z",
"stats": {
"totalDeliveries": 4521,
"successfulDeliveries": 4498,
"failedDeliveries": 23,
"lastDeliveryAt": "2026-03-19T09:30:00Z",
"lastDeliveryStatus": "SUCCESS"
}
}

Update Webhook

Update an existing webhook’s name, URL, or event subscriptions.

PUT /api/v1/webhooks/{id}

Example Request

Terminal window
curl -X PUT https://app.veraid.io/api/v1/webhooks/wh_abc123 \
-H "Authorization: Bearer kd_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"name": "Production Event Handler (Updated)",
"events": [
"identity.created",
"identity.suspended",
"identity.revoked",
"credential.rotated",
"credential.revoked",
"anomaly.detected",
"alert.triggered"
]
}'

Example Response

{
"id": "wh_abc123",
"name": "Production Event Handler (Updated)",
"url": "https://api.company.com/webhooks/veraid",
"events": [
"identity.created",
"identity.suspended",
"identity.revoked",
"credential.rotated",
"credential.revoked",
"anomaly.detected",
"alert.triggered"
],
"status": "ACTIVE",
"signingSecret": "whsec_••••••••",
"createdAt": "2026-01-15T10:00:00Z",
"updatedAt": "2026-03-19T10:05:00Z"
}

Delete Webhook

Delete a webhook. No further events will be delivered to the endpoint.

DELETE /api/v1/webhooks/{id}

Example Request

Terminal window
curl -X DELETE https://app.veraid.io/api/v1/webhooks/wh_abc123 \
-H "Authorization: Bearer kd_live_abc123..."

Example Response

{
"message": "Webhook deleted successfully",
"id": "wh_abc123"
}

Test Webhook

Send a test event to the webhook endpoint to verify connectivity and signature verification.

POST /api/v1/webhooks/{id}/test

Example Request

Terminal window
curl -X POST https://app.veraid.io/api/v1/webhooks/wh_abc123/test \
-H "Authorization: Bearer kd_live_abc123..."

Example Response

{
"status": "SUCCESS",
"message": "Test event delivered successfully",
"details": {
"responseCode": 200,
"latency": "120ms",
"responseBody": "{\"received\": true}"
}
}

Event Types

Subscribe to any combination of the following event types:

Identity Events

EventDescription
identity.createdA new identity was created
identity.updatedAn identity’s configuration was modified
identity.suspendedAn identity was suspended
identity.revokedAn identity was permanently revoked or deleted

Credential Events

EventDescription
credential.createdA new credential was issued
credential.usedA credential was used to authenticate
credential.expiredA credential reached its expiration date
credential.revokedA credential was manually revoked or rotated

Security Events

EventDescription
policy.violatedAn identity attempted an action that violates a policy
anomaly.detectedAnomalous behavior was detected by the analysis engine
alert.triggeredA new security alert was generated

Webhook Payload Format

All webhook deliveries use the following envelope format:

{
"id": "evt_abc123",
"type": "credential.rotated",
"timestamp": "2026-03-19T10:00:00Z",
"webhookId": "wh_abc123",
"data": {
"credentialId": "cred_xyz789",
"identityId": "id_def456",
"identityName": "aws-deploy-prod",
"rotatedBy": "SYSTEM",
"reason": "Scheduled rotation (90-day policy)",
"previousCredentialExpiry": "2026-03-20T10:00:00Z"
}
}

Signature Verification

All webhook payloads are signed using HMAC-SHA256. Verify the signature to ensure the payload was sent by VeraID and has not been tampered with.

Headers

HeaderDescription
X-VeraID-SignatureHMAC-SHA256 signature of the raw request body
X-VeraID-TimestampUnix timestamp of when the webhook was sent

Verification Process

  1. Concatenate the timestamp and raw request body: {timestamp}.{body}
  2. Compute the HMAC-SHA256 using your webhook’s signing secret.
  3. Compare the computed signature with the X-VeraID-Signature header.
import crypto from 'crypto';
function verifyWebhookSignature(
payload: string,
signature: string,
timestamp: string,
secret: string
): boolean {
const signedPayload = `${timestamp}.${payload}`;
const expectedSignature = crypto
.createHmac('sha256', secret)
.update(signedPayload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expectedSignature)
);
}

Retry Policy

Failed webhook deliveries are retried automatically with exponential backoff:

AttemptDelay
1st retry1 minute
2nd retry5 minutes
3rd retry30 minutes
4th retry2 hours
5th retry12 hours

A delivery is considered failed if:

  • The endpoint returns a non-2xx HTTP status code.
  • The endpoint does not respond within 30 seconds.
  • A network error occurs (DNS resolution failure, connection refused, etc.).

Dead-Letter Queue

After all retry attempts are exhausted, the failed event is moved to a dead-letter queue (DLQ). You can review and replay DLQ events from the VeraID dashboard under Settings > Webhooks > Dead Letter Queue.

DLQ events are retained for 30 days. Each entry includes the original payload, delivery attempts with timestamps and error details, and a one-click replay option.