Create webhook endpoint
Use this when you want to register a webhook endpoint that receives one or more event types (user.verified, user.cancelled, order.*).
Creates a webhook endpoint as a first-class object. The returned signingSecret is the only time the secret is visible — store it now; rotate via POST /v1/webhook_endpoints/{endpointId}/rotate-secret if lost. Per-event subscription is controlled by subscribedEvents. A developer endpoint can subscribe to order.* events from any storefront the caller bootstrapped — Marea resolves the merchant → developer chain at dispatch time, so one endpoint covers every storefront. Hard caps: 16 endpoints per account; URL ≤2048 chars; HTTPS only; rejects loopback / private / metadata hostnames.
Authorizations
Marea API key. mk_dev_* keys are developer-scoped (bootstrap, list users, register webhook). mk_user_* keys are user-scoped (manage that one user's storefronts/products). Scopes: catalog:read, catalog:write, storefront:publish, me:verify, me:resendVerification, developer:bootstrap, developer:read, developer:issueUserKey, developer:webhooks.
Headers
Optional client-supplied key. Replays of the same key within 24h return the original response. Recommended for POSTs that mutate billing/inventory.
200"idem_b2a9f5b9-3e0c-4a5e-b3c2-7a4ce85a6b21"
BCP-47 locale tag for localized error messages (es, en, pt). Defaults to es.
"es-MX"
Body
Request body.
Body for POST /v1/webhook_endpoints.
HTTPS receiver URL. SSRF blocklist applies (loopback, private IP ranges, metadata hosts, .internal, link-local).
2048Event types this endpoint will receive. At least one required; max = all known events.
1Enum of webhook event types a WebhookEndpoint may subscribe to. Developer-scope endpoints can subscribe to any value; merchant-scope endpoints are restricted to order.* (PRD-14).
user.verified, user.cancelled, order.created, order.status_updated, order.paid 256Response
Endpoint created. signingSecret is returned ONCE — store it.
PRD-14 — WebhookEndpoint plus the once-revealed signingSecret. Returned by create + rotate-secret responses only.
Server-generated id (mk_we_ + 16-char lowercase hex).
^mk_we_[0-9a-f]{16}$"mk_we_0123456789abcdef"
Endpoint owner type. developer endpoints receive lifecycle events for users you bootstrapped plus order events from their storefronts; merchant endpoints receive order events for one storefront.
developer, merchant Receiver URL. HTTPS only. Max 2048 chars. SSRF blocklist applies (loopback, private ranges, metadata hosts, .internal, etc).
256When false, the dispatcher skips this endpoint without retiring it.
At least one event subscription is required.
1Enum of webhook event types a WebhookEndpoint may subscribe to. Developer-scope endpoints can subscribe to any value; merchant-scope endpoints are restricted to order.* (PRD-14).
user.verified, user.cancelled, order.created, order.status_updated, order.paid Bumped by one each time the secret is rotated.
x >= 1success, failure, null x >= 0Raw 32-byte hex signing secret. Returned ONCE on create + rotate; not readable thereafter. Store immediately.
^[0-9a-f]{64}$