Skip to main content
Webhook endpoints receive HTTP POST notifications from Borga when events occur in your account — for example, when a payment succeeds or a subscription is canceled. Register an endpoint with a list of event types to subscribe to, and Borga will deliver a signed payload to your URL each time a matching event occurs.
Every delivery is signed using your endpoint’s secret. Verify the Borga-Signature header on each incoming request by computing an HMAC-SHA256 of the raw request body using the signing secret. Reject any request that does not match.
Supported events

Create a webhook endpoint

POST /v1/webhook_endpoints Registers a new webhook endpoint.

Request parameters

string
required
The HTTPS URL to which Borga will send event payloads.
string[]
required
Array of event type strings to subscribe to (e.g. ["payment.succeeded", "invoice.paid"]). Pass ["*"] to subscribe to all events.
boolean
Whether the endpoint should receive deliveries. Defaults to true.

Response fields

string
required
Unique endpoint identifier.
string
required
The registered HTTPS URL.
string[]
required
Array of subscribed event types.
boolean
required
Whether the endpoint is currently active.
string
required
Signing secret for verifying delivery payloads. This value is only returned at creation — store it securely.
string
required
ISO 8601 timestamp of when the endpoint was created.

List webhook endpoints

GET /v1/webhook_endpoints Returns a list of all registered webhook endpoints.

Response fields

object[]
required
Array of webhook endpoint objects.

Retrieve a webhook endpoint

GET /v1/webhook_endpoints/{id} Retrieves an existing webhook endpoint. The secret is not returned after initial creation.

Path parameters

string
required
The ID of the endpoint to retrieve.

Response fields

string
required
Unique endpoint identifier.
string
required
The registered HTTPS URL.
string[]
required
Array of subscribed event types.
boolean
required
Whether the endpoint is active.
string
required
ISO 8601 timestamp of when the endpoint was created.

Update a webhook endpoint

PATCH /v1/webhook_endpoints/{id} Updates an existing webhook endpoint. Only the fields you provide are changed.

Path parameters

string
required
The ID of the endpoint to update.

Request parameters

string
Updated HTTPS URL.
string[]
Updated array of event types. Replaces the existing list entirely.
boolean
Set to false to pause deliveries to this endpoint.

Response fields

Returns the updated endpoint object. See retrieve a webhook endpoint for the full field reference.

Delete a webhook endpoint

DELETE /v1/webhook_endpoints/{id} Permanently deletes a webhook endpoint. Borga will stop delivering events to this URL immediately.

Path parameters

string
required
The ID of the endpoint to delete.

Response fields

Returns an empty body with a 204 No Content status on success.

List webhook deliveries

GET /v1/webhook_deliveries Returns a paginated list of delivery attempts for a webhook endpoint, ordered by creation date descending. Use this to audit which events were received and identify failures.

Query parameters

string
Filter by endpoint ID.
number
Maximum number of deliveries to return per page.

Response fields

object[]
required
Array of delivery objects.
boolean
required
Whether more deliveries exist beyond this page.

Retry a webhook delivery

POST /v1/webhook_deliveries/{id}/retry Retries a previously failed delivery. Borga re-sends the original event payload to the registered endpoint URL.

Path parameters

string
required
The ID of the delivery to retry.

Response fields

Returns the new delivery attempt object.
string
required
Unique identifier for this retry delivery attempt.
string
required
ID of the webhook endpoint.
string
required
The event type that was retried.
string
required
Delivery status of the retry attempt.
number
HTTP status code returned by your endpoint.
string
required
ISO 8601 timestamp of the retry attempt.