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.
pf-api-keyRate limit: 180 requests per hourHow 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)requiredThe endpoint's id, from POST /webhook-endpoints or GET /webhook-endpoints. A non-UUID returns 400.
Request body
urlstringoptionalA new receiver URL, checked by the same rules as on create. A different URL starts a fresh failure streak.
eventsstring[]optionalReplaces the endpoint's events: 1 to 4 of these, each once.
post.publishedpost.failedaccount.connectedaccount.disconnecteddescriptionstring | nulloptionalYour own label, up to 255 characters. null clears it.
activebooleanoptionalfalse turns the endpoint off, and disabledReason stays null. true turns a disabled endpoint back on and resets its failure state.
Errors
| Status | message | When |
|---|---|---|
400 | webhook.invalidUrl | The url is not a URL PostFast can read, or it is null on an update. |
400 | webhook.urlNotHttps | The url is not https. |
400 | webhook.urlHostNotAllowed | The hostname is an IP address, localhost, has no dot, or uses an internal suffix such as .local or .internal, or the URL carries credentials. |
400 | webhook.urlPortNotAllowed | The url uses a port other than 443. |
400 | webhook.urlPrivateAddress | The hostname resolves to an address that is not public. |
400 | webhook.urlResolutionFailed | The hostname does not resolve. |
400 | webhook.invalidEvents | events is null on an update. |
400 | webhook.limitReached | The workspace already has 5 active endpoints. Applies when creating an endpoint and when re-enabling one. |
404 | webhook.notFound | No 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)requiredThe endpoint's id. Every other route takes it.
workspaceIdstring (UUID)requiredThe workspace the API key belongs to.
urlstringrequiredWhere PostFast sends events, as stored: a query string is kept and a #fragment is dropped.
eventsstring[]requiredThe events this endpoint receives. Never empty.
post.publishedpost.failedaccount.connectedaccount.disconnecteddescriptionstring | nulloptionalYour own label for the endpoint.
activebooleanrequiredWhether PostFast sends events to this endpoint.
disabledReasonstring | nulloptionalWhy 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.
GONEFAILINGlastSuccessAtISO 8601 | nulloptionalWhen a delivery to this endpoint last succeeded.
lastFailureAtISO 8601 | nulloptionalWhen a delivery to this endpoint last failed.
createdAtISO 8601requiredWhen the endpoint was created.
updatedAtISO 8601requiredWhen the endpoint last changed.