FlaresendDocs
Webhooks

Create a webhook

Register an endpoint that receives a signed POST for the email events you pick.

POST/v1/webhooksAPI key

Flaresend 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

urlstringrequired

The endpoint to call. Must be an http:// or https:// URL.

eventsstring[]default: ["*"]

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.

enabledbooleandefault: true

A disabled webhook receives nothing, and deliveries that were still pending when it was disabled are marked failed.

Response

Status 201.

idstring

The webhook ID, for example wh_01K6B3C8R2M5T7V9X1Z3B5D7F9.

projectIdstring

The project the webhook belongs to.

urlstring

The endpoint URL.

eventsstring[]

The subscribed event types, without duplicates.

enabledboolean

Whether the webhook receives events.

secretstring

The signing secret, whsec_ followed by 32 letters and digits. Returned only on create and on rotate.

createdAtstring

ISO 8601 timestamp.

updatedAtstring

ISO 8601 timestamp.

Errors

StatusCodeWhen
400missing_bodyThe request has no body.
400invalid_bodyurl is not an http(s) URL, or events is empty or has an unknown type. param names the field.