Create Webhook
Register an HTTP endpoint to receive events for a sender profile.
Register an HTTP endpoint to receive all verification events for a sender profile. A profile can have multiple webhook endpoints.
Scope: verify.webhooks.write
Request Body
sender_profile_idstringrequiredSender profile ID with the prf_ prefix.
urlstringrequiredThe HTTP or HTTPS endpoint that will receive event requests.
enabledbooleanoptionalWhether the webhook receives events. Defaults to true.
The response contains the generated secret. Store it securely so your application can verify signatures.
Sample Request
Request
curl -X POST "https://api.maileroo.com/v1/verify/webhooks" \
-H "Authorization: Bearer roo_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"sender_profile_id":"prf_0123456789abcdef01234567","url":"https://example.com/hooks/otp-verification"}'Sample Response
Returns 201 Created.
Response
{
"data": {
"id": "whk_0123456789abcdef01234567",
"account_id": "12345",
"sender_profile_id": "prf_0123456789abcdef01234567",
"url": "https://example.com/hooks/otp-verification",
"secret": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"enabled": true,
"created_at": "2025-01-01T12:00:00Z",
"updated_at": "2025-01-01T12:00:00Z"
}
}Errors
Common authentication, rate-limit, and service-availability errors are described in the Introduction. This endpoint can also return:
400 Bad Request— invalid JSON, URL, or missing sender profile ID.404 Not Found— the sender profile does not exist for this account.