Create a webhook subscription
POST
/v1/admin/webhooks
Registers a new webhook endpoint to receive events.
The signing_secret is returned ONLY in this response — store it securely. If not provided in the request, the server generates a cryptographically random secret.
TENANT SCOPING: - Provide tenant_id in query to scope the subscription to a specific tenant. - Omit tenant_id to create a system-wide subscription (receives events from all tenants). - System-wide subscriptions still respect scope_filter if provided.
AUTHORIZATION: - Requires admin key (X-Admin-API-Key)
Authorizations
AdminKeyAuth
Administrative API key with full system access
Type
API Key (header: X-Admin-API-Key)
Parameters
Query Parameters
tenant_id
Scope subscription to a specific tenant. Omit for system-wide.
Type
string
Request Body
application/json
JSON "name": "string", "description": "string", "url": "string", "event_types": [ "string" ], "event_categories": [ "string" ], "scope_filter": "string", "thresholds": { "budget_utilization": [ 0 ], "burn_rate_multiplier": 3, "burn_rate_window_seconds": 300, "denial_rate_threshold": 0.1, "expiry_rate_threshold": 0.05, "auth_failure_rate_threshold": 0.1, "rate_window_seconds": 300 }, "signing_secret": "string", "headers": { "additionalProperties": "string" }, "retry_policy": { "max_retries": 5, "initial_delay_ms": 1000, "backoff_multiplier": 2, "max_delay_ms": 60000 }, "disable_after_failures": 10, "metadata": { "additionalProperties": "string" }
{
}
Responses
Subscription created
application/json
JSON "subscription": { "subscription_id": "string", "tenant_id": "string", "name": "string", "description": "string", "url": "string", "event_types": [ "string" ], "event_categories": [ "string" ], "scope_filter": "string", "thresholds": { "budget_utilization": [ 0 ], "burn_rate_multiplier": 3, "burn_rate_window_seconds": 300, "denial_rate_threshold": 0.1, "expiry_rate_threshold": 0.05, "auth_failure_rate_threshold": 0.1, "rate_window_seconds": 300 }, "signing_secret": "string", "headers": { "additionalProperties": "string" }, "status": "string", "retry_policy": { "max_retries": 5, "initial_delay_ms": 1000, "backoff_multiplier": 2, "max_delay_ms": 60000 }, "disable_after_failures": 10, "consecutive_failures": 0, "created_at": "string", "updated_at": "string", "last_triggered_at": "string", "last_success_at": "string", "last_failure_at": "string", "metadata": { "additionalProperties": "string" } }, "signing_secret": "string"
{
}