Create webhook
Registers an endpoint. The signing secret is returned only in this response.
POST/webhooks
Body parameters
urlstringrequiredPublic HTTPS URL.
eventsstring[]Event types to send. Empty or omitted means all events.
The webhook object
An endpoint that receives events.
objectstringAlways
webhook.idstringUnique ID of the webhook.
urlstringWhere events are posted.
eventsstring[]Event types it receives. Empty means all of them.
activebooleanfalsewhile paused.created_atstringWhen it was created (ISO 8601, UTC).
secretstringOnly in the create response: the secret for verifying signatures.
Request
curl -X POST 'https://api.mailvina.com/webhooks' \
-H 'Authorization: Bearer mv_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://acme.com/webhooks/mailvina",
"events": [
"email.delivered",
"email.bounced",
"email.complained"
]
}'Response
{
"object": "webhook",
"id": "a1f9c1d2-7d3e-4b8f-9a0c-2e5b6d7f8a90",
"secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"
}