Skip to main content
POST

Create a webhook subscription

Method: POST | Endpoint: /v1/webhooks Description: Register an HTTPS URL to receive webhook events. The response is the only time the signing secret is shown. Authentication: API key in the Authorization header: Authorization: Bearer ib_pk_<64 hex>. Create keys in the dashboard under Settings → API access.

Request Body

Responses

201 Created
Store secret now; later responses only show secret_prefix. See Signatures. 401 Unauthorized
Other message values: Authorization Bearer token required, API key required (use Authorization: Bearer ib_pk_…), Invalid API key format, Customer account not found. 403 Forbidden
Your iBubbl account is suspended or cancelled (message is then Account is cancelled). Every API-key endpoint returns this. 422 Unprocessable Entity
Other error value: validation_error, for example an unknown event type:
500 Internal Server Error
The subscription was not saved. Retry the request.

Authorizations

Authorization
string
header
required

Bearer API key. Format: Authorization: Bearer ib_pk_<64 hex> (70 characters). Generate keys from Dashboard → Settings → API Access.

Body

application/json
url
string
required

HTTPS URL that will receive webhook POST requests. HTTP is rejected (422 invalid_url).

Example:

"https://api.example.com/ibubbl-webhooks"

event_types
string[] | null

Filter to a specific subset of events. Omit, or pass null or [], to receive ALL event types, including ones added later. Every entry must be a type from the Webhook Events catalog; an unknown type returns 422 validation_error.

Example:

Response

Subscription created. Secret returned ONCE.

id
string
required

Unique subscription identifier (UUID).

url
string
required

The HTTPS URL receiving events.

secret_prefix
string
required

First 14 characters of the signing secret (whsec_ + 8 hex). Useful for identifying which subscription's secret is in use without revealing the full value. The full secret is returned only once, at creation time.

Example:

"whsec_a3f2c8d9"

created_at
string
required

ISO 8601 UTC timestamp.

secret
string
required

Full signing secret. Save it now — this is the only time it is returned. Use it to verify the X-iBubbl-Signature header on incoming webhook POSTs (HMAC-SHA256 over {t}.{raw request body}, keyed with this whole string). See Signature verification.

Example:

"whsec_a3f2c8d9e0f1b4d52c8a1f4e23b9d4f7ca8e51d2c3b4a5e6f7a8b9c0d1e2f3a4"

warning
string
required

Reminder that the secret cannot be retrieved again. Present only on the create response.

event_types
string[] | null

Event filter, or null if subscribed to all events.

last_delivered_at
string | null

ISO 8601 UTC timestamp of the most recent successful delivery to this subscription, or null if no event has been delivered yet.

revoked_at
string | null

ISO 8601 UTC timestamp the subscription was revoked, or null if active. Revoked subscriptions stop receiving events.