The webhooks area has 6 methods on the client. Each takes one object of path, query and body arguments and an optional CallOptions, and returns a promise of the response body. A refused call rejects with OverlaneApiError (see the SDK index).
webhooksCreate
Create an outbound webhook; the signing secret is shown once (bots class)
- Request:
POSTon/v1/tenants/{tenantId}/webhooks - Needs an approval for agents: class
bots
webhooksCreate(args: { tenantId: string; body: CreateWebhookRequest }, options?: CallOptions): Promise<WebhookCreated>webhooksDelete
Disable a webhook (bots class)
- Request:
DELETEon/v1/tenants/{tenantId}/webhooks/{webhookId} - Needs an approval for agents: class
bots
webhooksDelete(args: { tenantId: string; webhookId: string }, options?: CallOptions): Promise<WebhookSubscription>webhooksDeliveries
A webhook’s recent deliveries with status, attempts and next attempt
- Request:
GETon/v1/tenants/{tenantId}/webhooks/{webhookId}/deliveries
webhooksDeliveries(args: { tenantId: string; webhookId: string }, options?: CallOptions): Promise<WebhookDeliveryList>webhooksList
List outbound webhooks
- Request:
GETon/v1/tenants/{tenantId}/webhooks
webhooksList(args: { tenantId: string }, options?: CallOptions): Promise<WebhookList>webhooksRotate
Rotate a webhook’s signing secret; shown once (bots class)
- Request:
POSTon/v1/tenants/{tenantId}/webhooks/{webhookId}/rotate-key - Needs an approval for agents: class
bots
webhooksRotate(args: { tenantId: string; webhookId: string; body?: Record<string, unknown> }, options?: CallOptions): Promise<WebhookCreated>webhooksTest
Send a test event to a webhook
- Request:
POSTon/v1/tenants/{tenantId}/webhooks/{webhookId}/test
webhooksTest(args: { tenantId: string; webhookId: string; body?: Record<string, unknown> }, options?: CallOptions): Promise<WebhookDeliveryList>