Webhooks
Create a webhook
POST
Creates an outbound webhook endpoint for organization events. Requires owner access.
cookiecookie
better-auth.session_token<token>Dashboard session cookie
application/json- body
url*stringFormat
uriLength
length <= 2048events*array<>Items
1 <= itemsapplication/json- response
id*stringurl*stringevents*array<>enabled*booleanconsecutiveFailures*integerlastError*string|nulllastDeliveredAt*|Format
date-timecreatedAt*stringFormat
date-timecurl -X POST 'https://api.example.com/api/v1/webhooks' \
-H 'Content-Type: application/json' \
-d '{
"url": "http://example.com",
"events": [
"error.created"
]
}'Example Response
{
"id": "string",
"url": "string",
"events": [
"error.created"
],
"enabled": true,
"consecutiveFailures": 0,
"lastError": "string",
"lastDeliveredAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z"
}