Skip to main content
POST
/
events
/
subscription
Create a webhook subscription
curl --request POST \
  --url https://payouts.api.trykarat.com/events/subscription \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event_name": "payout.updated",
  "callback_url": "https://example.com/api/webhooks/callback"
}
'
{
  "data": {
    "subscription": {
      "id": "50fe99c8-6412-4557-91c8-c9d112dadbc7",
      "eventName": "payout.updated",
      "callbackUrl": "https://example.com/api/webhooks/callback",
      "createdAt": "2026-03-03T21:17:52.77594+00:00"
    },
    "secret": "example_secret"
  }
}

Authorizations

Authorization
string
header
required

Pass your API key as a bearer token: Authorization: Bearer <API_KEY>.

Body

application/json
event_name
string
required

The event type to subscribe to, e.g. payout.updated.

callback_url
string<uri>
required

The URL to deliver events to.

Response

The subscription was created.

data
object