Firsty

Search...

Search...

ManagementExperimental

Update a webhook endpoint

Changes the URL, the subscribed event types, their settings, the label or active. Only the fields sent change; the signing secret stays as issued.

patch/management/webhooks/{webhookEndpointReference}

Authorization

Authorization: Bearer {token} — an OAuth2 access token from the client-credentials flow. How authentication works

Path parameters

webhookEndpointReferencestringrequired

Webhook endpoint reference, as returned by GET /management/webhooks.

Request body

application/json · required

urlstring · uri
eventTypesarray of string

Replaces the subscription list. Values from GET /catalog/webhook-event-types.

configurationobject

Settings per event type. An event type sent replaces that event type's settings; the others keep theirs.

Show properties
package.usage.thresholdobject
Show properties
thresholdPercentsarray of integerrequired

Shares of a package's allowance, in whole percents, at which this endpoint receives package.usage.threshold. At most 5, at least 10 percent apart. An endpoint that never set them receives the event at 33 and 66.

descriptionstring
activeboolean

False keeps the endpoint but stops deliveries to it.

Responses

200The updated endpointapplication/json
Show response body
dataobject
Show properties
webhookEndpointReferencestring

Identifies the endpoint in the /management/webhooks/{webhookEndpointReference} operations.

urlstring · uri

Destination Firsty posts events to.

eventTypesarray of string

Event types delivered to this endpoint. Values this client subscribed to before an event type was retired are returned as stored, so an entry may be absent from GET /catalog/webhook-event-types.

configurationobject

The settings in effect per event type, defaults included. They apply once the endpoint is subscribed to the event type.

Show properties
package.usage.thresholdobject
Show properties
thresholdPercentsarray of integer

Shares of a package's allowance, in whole percents, at which this endpoint receives package.usage.threshold. At most 5, at least 10 percent apart. An endpoint that never set them receives the event at 33 and 66.

descriptionstring | null

Free-text label for the endpoint.

activeboolean

Whether events are delivered to this endpoint.

createdAtstring · date-time
updatedAtstring · date-time
400Bad request - invalid parameters401Unauthorized - missing or invalid API key404Resource not found429Rate limit exceeded. A `429` can also arrive without these headers or this body; handle it by its status code.500Internal server error