Register Webhook
POST/v1/webhook/register
This endpoint registers a webhook.
Conditional rules:
- When
eventisEMAIL_EVENT, at least one flag insidewebhook_options.eventsmust be true (delivery, open, click, bounce, spam, unsubscribe, policy_rejection, generation_failure, generation_rejection, smtp_error). - When
eventisDOMAIN_VERIFICATION, allwebhook_options.events.*flags must be false (or omitted).
Request
- application/json
Body
required
Webhook Payload
event stringrequired
Possible values: [EMAIL_EVENT, DOMAIN_VERIFICATION]
headers object
method stringrequired
Possible values: [POST]
Default value: POST
webhook_options
object
events
object
bounce boolean
click boolean
delivery boolean
generation_failure boolean
generation_rejection boolean
imap_error boolean
open boolean
phishing boolean
policy_rejection boolean
smtp_error boolean
spam boolean
unsubscribe boolean
webhook_url stringrequired
Responses
- 200
- 400
- 409
- 422
Webhook created
- application/json
- Schema
- Example (from schema)
Schema
message string
success boolean
{
"message": "webhook created",
"success": true
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
details
object
property name* any
error string
success boolean
{
"details": {},
"error": "string",
"success": false
}
Conflict Webhook Already Exists
- application/json
- Schema
- Example (from schema)
Schema
details
object
property name* any
error string
success boolean
{
"details": {},
"error": "string",
"success": false
}
Unprocessable Entity Not able to connect to the provided url
- application/json
- Schema
- Example (from schema)
Schema
details
object
property name* any
error string
success boolean
{
"details": {},
"error": "string",
"success": false
}
Loading...