Create Webhook
POST
Create a new webhook subscription for a tenant
header
X-Api-Key<token>API key in format: sti_env_prefix_secret
idempotency-key*stringRequired for mutating calls. Use a V4 UUID. The server stores the first result for 24h and returns it on subsequent retries with the same key.
Match
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Format
uuidapplication/json- body
name*stringWebhook subscription name
url*stringWebhook endpoint URL
Format
urieventTypes*array<>Event types to subscribe to
secret?stringOptional webhook signing secret
metadata?Default Response
application/json- response
subscription*curl -X POST 'https://api.sandbox.stables.money/api/v1/webhooks' \ -H 'idempotency-key: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "url": "http://example.com", "eventTypes": [ "customer.created" ]}'Example Response200
{ "subscription": { "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f", "name": "string", "url": "http://example.com", "eventTypes": [ "customer.created" ], "active": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "metadata": { "property1": "string", "property2": "string" } }}