Skip to content

Webhooks (API)

These endpoints manage webhook endpoint subscriptions programmatically. For an overview of how webhooks work, payload format, event types, and delivery behavior, see Webhooks.

Required scopes: webhooks:read for GET requests, webhooks:write for POST / DELETE.


{
"id": 7,
"url": "https://yourapp.com/webhooks/kotauth",
"description": "Production webhook receiver",
"events": ["user.created", "login.failed"],
"enabled": true,
"createdAt": "2026-07-01T10:00:00Z"
}
FieldTypeDescription
idintegerInternal numeric ID
urlstringHTTPS URL that receives webhook POST requests
descriptionstringHuman-readable description
eventsstring[]Event types this endpoint is subscribed to
enabledbooleanWhether deliveries are active
createdAtstringISO-8601 creation timestamp

GET /t/{slug}/api/v1/webhooks

Response 200 OK:

{
"data": [
{
"id": 7,
"url": "https://yourapp.com/webhooks/kotauth",
"description": "Production webhook receiver",
"events": ["user.created", "login.failed"],
"enabled": true,
"createdAt": "2026-07-01T10:00:00Z"
}
],
"meta": { "total": 1, "offset": 0, "limit": 1 }
}

POST /t/{slug}/api/v1/webhooks
Content-Type: application/json
{
"url": "https://yourapp.com/webhooks/kotauth",
"description": "Production webhook receiver",
"events": ["user.created", "login.failed", "session.revoked"]
}
FieldRequiredDescription
urlYesHTTPS URL to receive webhook deliveries
descriptionNoDescription (defaults to empty string)
eventsYesArray of event type strings to subscribe to

Response 201 Created:

{
"endpoint": {
"id": 8,
"url": "https://yourapp.com/webhooks/kotauth",
"description": "Production webhook receiver",
"events": ["user.created", "login.failed", "session.revoked"],
"enabled": true,
"createdAt": "2026-07-17T12:00:00Z"
},
"secret": "whsec_a1b2c3d4e5f6..."
}

Unknown event names are rejected with 422 Unprocessable Entity listing the invalid values.


DELETE /t/{slug}/api/v1/webhooks/{endpointId}

Permanently removes the endpoint. Pending deliveries in the retry queue are discarded.

Path parameters:

ParameterTypeDescription
endpointIdintegerThe endpoint’s numeric ID

Response 204 No Content