POST/webhook-endpoints

Registers an HTTPS endpoint to receive signed webhook events. The response carries the signing secret, the only time it is returned.

https://api.postfa.st/Auth: pf-api-keyRate limit: 180 requests per hour

Store the secret now

secret is in this response and nowhere else: no other route returns it. If you lose it, delete the endpoint and create a new one.

Before you register

A workspace can have 5 active endpoints. Disabled ones do not count. If you need more, ask support.

Each endpoint receives the events you pick for the whole workspace, so one endpoint per integration is usually enough.

A URL can be registered more than once: each registration is a separate endpoint with its own secret. If a create call fails without a response, check GET /webhook-endpoints before you try again, because the endpoint may already exist.

Events, signature verification and delivery rules are under /docs/webhooks.

Request body

urlstringrequired

HTTPS URL of your receiver, up to 2,048 characters. It must use port 443 and a public hostname: the full rules are under /docs/webhooks#registering.

eventsstring[]required

The events to receive: 1 to 4 of these, each once. webhook.test cannot be subscribed to.

post.publishedpost.failedaccount.connectedaccount.disconnected
descriptionstringoptional

Your own label for the endpoint, up to 255 characters.

Errors

StatusmessageWhen
400webhook.invalidUrlThe url is not a URL PostFast can read, or it is null on an update.
400webhook.urlNotHttpsThe url is not https.
400webhook.urlHostNotAllowedThe hostname is an IP address, localhost, has no dot, or uses an internal suffix such as .local or .internal, or the URL carries credentials.
400webhook.urlPortNotAllowedThe url uses a port other than 443.
400webhook.urlPrivateAddressThe hostname resolves to an address that is not public.
400webhook.urlResolutionFailedThe hostname does not resolve.
400webhook.limitReachedThe workspace already has 5 active endpoints. Applies when creating an endpoint and when re-enabling one.

Other problems with the body (a missing url, an unknown or repeated event, a description that is too long) return the usual validation 400, with message as an array of strings.

Response

201 Created The new endpoint, with its signing secret.

idstring (UUID)required

The endpoint's id. Every other route takes it.

workspaceIdstring (UUID)required

The workspace the API key belongs to.

urlstringrequired

Where PostFast sends events, as stored: a query string is kept and a #fragment is dropped.

eventsstring[]required

The events this endpoint receives. Never empty.

post.publishedpost.failedaccount.connectedaccount.disconnected
descriptionstring | nulloptional

Your own label for the endpoint.

activebooleanrequired

Whether PostFast sends events to this endpoint.

disabledReasonstring | nulloptional

Why PostFast turned the endpoint off: GONE (the receiver answered 410) or FAILING (it kept failing, see /docs/webhooks#delivery). null while it is active, and when you turned it off yourself with active: false.

GONEFAILING
lastSuccessAtISO 8601 | nulloptional

When a delivery to this endpoint last succeeded.

lastFailureAtISO 8601 | nulloptional

When a delivery to this endpoint last failed.

createdAtISO 8601required

When the endpoint was created.

updatedAtISO 8601required

When the endpoint last changed.

secretstringrequired

The signing secret (whsec_...). This response is the only time it is returned.