Skip to main content
POST
/
webhooks
Register a webhook
curl --request POST \
  --url https://api.leokit.dev/webhooks \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://your-server.com/webhooks/leokit",
  "events": [
    "swap.success",
    "swap.failed",
    "swap.refunded"
  ],
  "type": "standard"
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "url": "<string>",
    "events": [
      "<string>"
    ],
    "type": "standard",
    "is_active": true,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "secret": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.leokit.dev/llms.txt

Use this file to discover all available pages before exploring further.

The full lifecycle, payload formats, signature verification, and Discord/Slack auto-detection are documented at Webhooks.
The secret is only returned at creation time. Save it immediately — you’ll need it to verify HMAC signatures on incoming webhook deliveries.

Authorizations

Api-Key
string
header
required

Demo API-Key (Sandbox): 7037d2b3-9c76-4f62-b730-c544f7570fa4

Body

application/json
url
string<uri>
required

HTTPS URL. Discord/Slack URLs are auto-detected.

events
enum<string>[]

Defaults to all 6 events.

Available options:
quote.created,
deposit.initiated,
swap.pending,
swap.success,
swap.failed,
swap.refunded
type
enum<string>

Auto-detected from URL if omitted.

Available options:
standard,
discord,
slack

Response

Webhook created. The secret is only returned once.

data
object
required