Webhook management endpoints. Webhooks deliver real-time notifications about events to your servers. Configure endpoints, authentication, and event filters.
Base URL: https://api.authpi.com — see the Core API overview for
authentication, pagination, and idempotency, or try these endpoints in the
interactive reference.
GET/v1/accounts/{account_id}/webhooksList Webhooks
Lists all webhooks configured for an account.
Webhooks deliver real-time notifications about events to your servers. Each webhook subscription can filter which events to receive.
Webhook statuses:
Use the status filter to find failing webhooks that may need attention.
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | Required | The unique identifier of the account |
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | Optional | Maximum number of items to return (1-100, default: 50) |
cursor | string | Optional | Pagination cursor (webhook ID from previous response) |
status | active | disabled | deleted | Optional | Filter by webhook status |
| Code | Description | Schema |
|---|---|---|
| 200 | Paginated list of webhooks | object |
| 401 | Unauthorized - Authentication is required or has failed. | ApiError |
| 403 | Forbidden - You don't have permission to perform this action. | ApiError |
POST/v1/accounts/{account_id}/webhooksCreate Webhook
Creates a new webhook subscription for an account.
Webhooks notify your servers about events in real-time via HTTP POST requests.
Authentication options:
Event filtering: Specify which event types to receive. Common patterns:
["user.created", "user.updated", "user.deleted"]["user.verification.succeeded", "user.verification.failed", "session.created"]Important: Secrets (bearer_token_plain, signature_secret_plain) are only returned once at creation. Store them securely.
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | Required | The unique identifier of the account |
Content type: application/json
Schema: CreateWebhookInput
| Code | Description | Schema |
|---|---|---|
| 201 | Webhook created successfully. Secrets are only returned once - store them securely. | object |
| 400 | Bad Request - The request is malformed or contains invalid data. | ApiError |
| 401 | Unauthorized - Authentication is required or has failed. | ApiError |
| 403 | Forbidden - You don't have permission to perform this action. | ApiError |
| 429 | Too Many Requests - Rate limit or resource limit exceeded. | ApiError |
GET/v1/accounts/{account_id}/webhooks/{webhook_id}Get Webhook
Retrieves the full configuration of a webhook by its ID.
Returns complete webhook details including:
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | Required | The unique identifier of the account |
webhook_id | string | Required | The unique identifier of the webhook |
| Code | Description | Schema |
|---|---|---|
| 200 | Webhook retrieved successfully | object |
| 401 | Unauthorized - Authentication is required or has failed. | ApiError |
| 403 | Forbidden - You don't have permission to perform this action. | ApiError |
| 404 | Not Found - The requested resource does not exist. | ApiError |
PATCH/v1/accounts/{account_id}/webhooks/{webhook_id}Update Webhook
Updates a webhook's configuration.
All fields are optional - only include the fields you want to change.
Updatable settings:
Authentication changes: If you change the auth type or request new credentials, new secrets will be generated and returned in the response. Store them immediately - they cannot be retrieved again.
Note: Changing the URL or auth may cause temporary delivery failures while you update your receiving server.
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | Required | The unique identifier of the account |
webhook_id | string | Required | The unique identifier of the webhook |
Content type: application/json
Schema: UpdateWebhook
| Code | Description | Schema |
|---|---|---|
| 200 | Webhook updated successfully. New secrets (if generated) are only returned once. | object |
| 400 | Bad Request - The request is malformed or contains invalid data. | ApiError |
| 401 | Unauthorized - Authentication is required or has failed. | ApiError |
| 403 | Forbidden - You don't have permission to perform this action. | ApiError |
| 404 | Not Found - The requested resource does not exist. | ApiError |
| 412 | Precondition Failed - The resource has been modified since the provided ETag. | PreconditionFailedError |
DELETE/v1/accounts/{account_id}/webhooks/{webhook_id}Delete Webhook
Deletes a webhook subscription (soft delete).
The webhook is soft-deleted and stops receiving events immediately. Data is retained for 31 days before permanent deletion.
What happens on deletion:
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | Required | The unique identifier of the account |
webhook_id | string | Required | The unique identifier of the webhook |
| Code | Description | Schema |
|---|---|---|
| 204 | No Content - The operation completed successfully with no response body. | — |
| 401 | Unauthorized - Authentication is required or has failed. | ApiError |
| 403 | Forbidden - You don't have permission to perform this action. | ApiError |
| 404 | Not Found - The requested resource does not exist. | ApiError |
| 412 | Precondition Failed - The resource has been modified since the provided ETag. | PreconditionFailedError |
GET/v1/accounts/{account_id}/webhooks/{webhook_id}/deliveriesList Webhook Deliveries
Lists delivery records for a webhook, newest first.
Each delivery record summarizes one event's delivery:
event_id and event_typestatus (pending, delivering, delivered, failing, failed), attempt_count, and last_response_statuslast_error and the first/last/next attempt timestampsUse this endpoint to:
Retention: Delivery records are retained for 14 days, then automatically purged. Export anything you need for longer-term audit before then, or reconcile via the events API.
Retry behavior: Failed deliveries (non-2xx response) are automatically retried with exponential backoff. The default policy makes up to 40 total attempts over roughly 28 hours, using a one-hour maximum delay between attempts. Events received while the webhook circuit breaker is open are recorded as pending and retried after the breaker reset window instead of being dropped.
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | Required | The unique identifier of the account |
webhook_id | string | Required | The unique identifier of the webhook |
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | Optional | Maximum number of items to return (1-100, default: 50) |
cursor | string | Optional | Pagination cursor from the previous response's next_cursor |
event_type | string | Optional | Filter by event type |
status | success | failed | Optional | Filter by outcome: success = delivered, failed = permanently failed |
after | number | null | Optional | Deliveries created after this timestamp (Unix milliseconds) |
before | number | null | Optional | Deliveries created before this timestamp (Unix milliseconds) |
| Code | Description | Schema |
|---|---|---|
| 200 | Paginated list of delivery records | object |
| 401 | Unauthorized - Authentication is required or has failed. | ApiError |
| 403 | Forbidden - You don't have permission to perform this action. | ApiError |
| 404 | Not Found - The requested resource does not exist. | ApiError |