PATCH/webhook-endpoints/{id}

Changes an endpoint's URL, events or description, or turns it off and on. active: true re-enables a disabled endpoint and resets its failure state.

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

How updates work

Send only what you want to change: omitted fields keep their value, and only description accepts null.

Re-enabling counts toward the 5 active endpoints, so it returns webhook.limitReached when the workspace is already at the limit.

Events that happened while the endpoint was off are not replayed. See /docs/webhooks#delivery.

Path parameters

idstring (UUID)required

The endpoint's id, from POST /webhook-endpoints or GET /webhook-endpoints. A non-UUID returns 400.

Request body

urlstringoptional

A new receiver URL, checked by the same rules as on create. A different URL starts a fresh failure streak.

eventsstring[]optional

Replaces the endpoint's events: 1 to 4 of these, each once.

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

Your own label, up to 255 characters. null clears it.

activebooleanoptional

false turns the endpoint off, and disabledReason stays null. true turns a disabled endpoint back on and resets its failure state.

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.invalidEventsevents is null on an update.
400webhook.limitReachedThe workspace already has 5 active endpoints. Applies when creating an endpoint and when re-enabling one.
404webhook.notFoundNo endpoint with this id in the workspace: it was deleted, it never existed, or it belongs to another workspace.

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

200 OK The updated endpoint. secret is never included.

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.