curl -X POST https://api.merrin.ai/v1/webhooks \
-H "Authorization: Bearer $MERRIN_KEY" \
--json '{
"url": "https://hooks.brightwater.example/merrin",
"events": [
"firm.activated",
"submission.rejected"
]
}'
const response = await fetch("https://api.merrin.ai/v1/webhooks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.MERRIN_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://hooks.brightwater.example/merrin",
"events": [
"firm.activated",
"submission.rejected"
]
}),
})
const result = await response.json()
$response = Http::withToken(env('MERRIN_KEY'))
->post('https://api.merrin.ai/v1/webhooks', [
'url' => 'https://hooks.brightwater.example/merrin',
'events' => ['firm.activated', 'submission.rejected'],
]);
response = requests.post(
"https://api.merrin.ai/v1/webhooks",
headers={
"Authorization": f"Bearer {os.environ['MERRIN_KEY']}",
},
json={
"url": "https://hooks.brightwater.example/merrin",
"events": ["firm.activated", "submission.rejected"],
},
)
Example body
{
"url": "https://hooks.brightwater.example/merrin",
"events": [
"firm.activated",
"submission.rejected"
]
}
{
"data": {
"id": "2c7e9a14-3b5d-4f86-9e21-7a0c4d8b1f63",
"url": "https://hooks.brightwater.example/merrin",
"events": [
"firm.activated",
"submission.rejected"
],
"secret": "whsec_4f8b2c9d1e7a3f6b0c5d8e2a9b4f1c7d",
"created_at": "2026-11-02T09:30:12+00:00"
}
}
{
"message": "Send a valid API key as a bearer token.",
"reason": "unauthenticated"
}
{
"message": "This API key cannot use webhooks:manage.",
"reason": "missing_ability"
}
{
"message": "string",
"errors": {}
}
{
"message": "Too many requests. Wait a minute and try again.",
"reason": "rate_limited"
}