Skip to main content

Webhook Management

Webhooks enable event-driven notifications for tenant-related activities, such as credential issuance or proof requests, across multiple ecosystems (OpenID, Privado ID, Indicio, Cheqd). This section covers methods to add, retrieve, and delete webhooks associated with a tenant.

Add Webhook

Adds a new webhook URL to a tenant for event notifications.

import { OpenIDEcosystem } from '@openid/core-sdk';

const openid = new OpenIDEcosystem({
apiKey: 'your-ecosystem-api-key',
});

const webhook = await openid.addWebhook({
tenantId: 'your-tenant-id',
webhookUrl: 'https://webhook.example.com/receive',
});

Params

ParameterTypeDescription
tenantIdstring (Required)The ID of the tenant to associate the webhook with.
webhookUrlstring (Required)The URL where webhook notifications will be sent.
note
  • Ensure the webhookUrl is a secure, publicly accessible HTTPS endpoint.
  • Webhooks are tenant-specific; verify the tenantId matches your configuration.

Get Webhooks

Retrieves a list of webhooks associated with a tenant, with an optional filter by webhook ID.

import { OpenIDEcosystem } from '@openid/core-sdk';

const openid = new OpenIDEcosystem({
apiKey: 'your-ecosystem-api-key',
});

const webhooks = await openid.getWebhooks({
tenantId: 'your-tenant-id',
});

Params

ParameterTypeDescription
tenantIdstring (Required)The ID of the tenant to query.
webhookIdstring (Optional)The ID of a specific webhook to retrieve (if omitted, returns all webhooks for the tenant).
note
  • Use the webhookId filter to retrieve a single webhook’s details or omit it for a full list.
  • Responses may include additional metadata (e.g., last event time); check the GetWebhooksResponse type for full structure.

Delete Webhook

Removes a webhook from a tenant, stopping all associated notifications.

import { OpenIDEcosystem } from '@openid/core-sdk';

const openid = new OpenIDEcosystem({
apiKey: 'your-ecosystem-api-key',
});

const result = await openid.deleteWebhook({
tenantId: 'your-tenant-id',
webhookId: 'your-webhook-id',
});

Params

ParameterTypeDescription
tenantIdstring (Required)The ID of the tenant owning the webhook.
webhookIdstring (Required)The ID of the webhook to delete.
note
  • This action is irreversible; ensure the webhookId is correct before deletion.
  • Deleting a webhook stops all event notifications to the associated URL.