Skip to main content
POST
Create Webhook Subscription

Path Parameters

portfolio_id
string
required

Populated from the URL path.

Body

application/json

CreateWebhookSubscriptionRequest specifies the events, destination, and authentication for a new subscription.

event_types
string[]
target_url
string
auth_type
enum<string>

WebhookAuthType identifies the authentication method used to deliver webhook events.

Available options:
WEBHOOK_AUTH_TYPE_HMAC,
WEBHOOK_AUTH_TYPE_OAUTH,
WEBHOOK_AUTH_TYPE_MTLS,
WEBHOOK_AUTH_TYPE_OAUTH_MTLS
oauth_config
object

WebhookOAuthConfigInput supplies OAuth credentials and scopes for a subscription.

custom_headers
object
description
string
idempotency_key
string

Response

A successful response.

CreateWebhookSubscriptionResponse returns the created subscription and its one-time HMAC secret.

subscription
object

WebhookSubscription is the customer-facing representation of a webhook subscription. auth secrets (hmac_secret, oauth client_secret) are never included; hmac_secret is returned exactly once in CreateWebhookSubscriptionResponse.

hmac_secret
string

hmac_secret is the plaintext HMAC signing secret. Returned exactly once on creation; store it securely — it is never surfaced again.