Create a webhook
Register an endpoint that receives a signed POST for the email events you pick.
/v1/webhooksAPI keyFlaresend POSTs a JSON payload to url every time one of the chosen events happens to an email in this project. The response contains the signing secret. It is only shown here and when you rotate the secret, so store it now. Use it to verify signatures.
Body parameters
The endpoint to call. Must be an http:// or https:// URL.
The event types to send. "*" means every type. At least one entry. Duplicates are removed. Allowed values:
email.queued, email.sent, email.delivered, email.deferred, email.bounced, email.complained, email.rejected, email.failed, email.opened, email.clicked, email.canceled, *
See Event types.
A disabled webhook receives nothing, and deliveries that were still pending when it was disabled are marked failed.
Response
Status 201.
The webhook ID, for example wh_01K6B3C8R2M5T7V9X1Z3B5D7F9.
The project the webhook belongs to.
The endpoint URL.
The subscribed event types, without duplicates.
Whether the webhook receives events.
The signing secret, whsec_ followed by 32 letters and digits. Returned only on create and on rotate.
ISO 8601 timestamp.
ISO 8601 timestamp.
Errors
| Status | Code | When |
|---|---|---|
| 400 | missing_body | The request has no body. |
| 400 | invalid_body | url is not an http(s) URL, or events is empty or has an unknown type. param names the field. |