unPLUGDevelopers

Webhook endpoints API

Update a webhook endpoint

PATCH/v1/webhook_endpoints/{id}

Changes the URL, the event types, the description or the status. Send only the fields you change. Set status to enabled to turn an endpoint back on after unPLUG disabled it; deliveries start again with new events.

Permissions: Secret key with webhooks:manage.

Path parameters#

  • idstring (uuid)Required

Request body#

  • urlstring (uri)
    New HTTPS URL. The secret stays the same.
  • event_typesarray of string
    Replaces the whole list.
    Min Items 1
  • descriptionstring
    Your label.
    Max Length 255
  • statusstring
    enabled or disabled.
    One of enabled, disabled

Response fields#

Returns 200 with WebhookEndpoint

  • idstring (uuid)
    The endpoint's id.
  • urlstring (uri)
    Where events are sent. HTTPS on a public hostname.
  • descriptionstringNullable
    Your label, up to 255 characters.
    Max Length 255
  • event_typesarray of string
    Types this endpoint gets, or ["*"] for all types, including types added later. See Webhook event types.
  • statusstring
    enabled or disabled. unPLUG sets disabled after 3 days of failed deliveries.
    One of enabled, disabled
  • secretstring
    The signing secret, whsec_ followed by base64. Returned only when you create the endpoint or rotate the secret.
  • created_atstring (date-time)
    When the endpoint was created.
  • updated_atstring (date-time)
    When the endpoint last changed.

Error descriptions#

400Bad request
invalid_param

Bad URL, unknown event type or unknown status.

404Not found
not_found

No endpoint with this id in this environment.

Any endpoint can also return the common errors.