Webhook management
A webhook is a URL on your server that Hovi calls when something happens in an organization, for example when a holder accepts a credential. These methods add, list and delete an organization's webhooks. The events, the payloads and how to check a webhook's signature are explained in Webhooks.
Add webhook
Adds a webhook URL to an organization.
EU Digital Identity
Microsoft Entra
cheqd
Indicio
Polygon
import { OpenIdEcosystem } from '@hovi/core-sdk';
const openid = new OpenIdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const webhook = await openid.addWebhook({
organizationId: '<ORGANIZATION_ID>',
webhookUrl: 'https://example.com/hovi-webhook',
});
import { EntraEcosystem } from '@hovi/core-sdk';
const entra = new EntraEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const webhook = await entra.addWebhook({
organizationId: '<ORGANIZATION_ID>',
webhookUrl: 'https://example.com/hovi-webhook',
});
import { CheqdEcosystem } from '@hovi/core-sdk';
const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const webhook = await cheqd.addWebhook({
organizationId: '<ORGANIZATION_ID>',
webhookUrl: 'https://example.com/hovi-webhook',
});
import { IndicioEcosystem } from '@hovi/core-sdk';
const indicio = new IndicioEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const webhook = await indicio.addWebhook({
organizationId: '<ORGANIZATION_ID>',
webhookUrl: 'https://example.com/hovi-webhook',
});
import { PrivadoEcosystem } from '@hovi/core-sdk';
const privado = new PrivadoEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const webhook = await privado.addWebhook({
organizationId: '<ORGANIZATION_ID>',
webhookUrl: 'https://example.com/hovi-webhook',
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| webhookUrl | string (Required) | The HTTPS URL that receives the events. |
The response contains the new webhookId.
Get webhooks
Lists an organization's webhooks.
EU Digital Identity
Microsoft Entra
cheqd
Indicio
Polygon
import { OpenIdEcosystem } from '@hovi/core-sdk';
const openid = new OpenIdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const webhooks = await openid.getWebhooks({
organizationId: '<ORGANIZATION_ID>',
});
import { EntraEcosystem } from '@hovi/core-sdk';
const entra = new EntraEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const webhooks = await entra.getWebhooks({
organizationId: '<ORGANIZATION_ID>',
});
import { CheqdEcosystem } from '@hovi/core-sdk';
const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const webhooks = await cheqd.getWebhooks({
organizationId: '<ORGANIZATION_ID>',
});
import { IndicioEcosystem } from '@hovi/core-sdk';
const indicio = new IndicioEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const webhooks = await indicio.getWebhooks({
organizationId: '<ORGANIZATION_ID>',
});
import { PrivadoEcosystem } from '@hovi/core-sdk';
const privado = new PrivadoEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const webhooks = await privado.getWebhooks({
organizationId: '<ORGANIZATION_ID>',
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| webhookId | string (Optional) | Return only this webhook. |
Delete webhook
Removes a webhook from an organization. Hovi stops sending events to its URL.
EU Digital Identity
Microsoft Entra
cheqd
Indicio
Polygon
import { OpenIdEcosystem } from '@hovi/core-sdk';
const openid = new OpenIdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await openid.deleteWebhook({
organizationId: '<ORGANIZATION_ID>',
webhookId: '<WEBHOOK_ID>',
});
import { EntraEcosystem } from '@hovi/core-sdk';
const entra = new EntraEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await entra.deleteWebhook({
organizationId: '<ORGANIZATION_ID>',
webhookId: '<WEBHOOK_ID>',
});
import { CheqdEcosystem } from '@hovi/core-sdk';
const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await cheqd.deleteWebhook({
organizationId: '<ORGANIZATION_ID>',
webhookId: '<WEBHOOK_ID>',
});
import { IndicioEcosystem } from '@hovi/core-sdk';
const indicio = new IndicioEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await indicio.deleteWebhook({
organizationId: '<ORGANIZATION_ID>',
webhookId: '<WEBHOOK_ID>',
});
import { PrivadoEcosystem } from '@hovi/core-sdk';
const privado = new PrivadoEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await privado.deleteWebhook({
organizationId: '<ORGANIZATION_ID>',
webhookId: '<WEBHOOK_ID>',
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| webhookId | string (Required) | The ID of the webhook to delete. |