Webhook Configuration

Update a webhook configuration.

This endpoint allows you to partially update an existing webhook configuration. At least one of url, enabled or event_types must be provided. Any field which is not provided keeps its current value. If event_types is provided it replaces the existing list entirely rather than being merged with it.

patch/api/v1/webhooks/{webhookConfigId}/

Request

Path parameters

webhookConfigIdstring uuid required

The ID of the webhook configuration to be updated.

Request body

urlstring url

The publicly accessible URL where you wish to receive incoming webhooks. This must be a valid HTTPS url.

enabledboolean

If this webhook configuration is enabled webhooks will be sent to the configured URL. If enabled is false no webhooks will be sent.

event_typesstring[]

The Depop event types you wish to receive webhooks for. Event types can either be the full name of an event, e.g. v1:order.new, or an event prefix with a wildcard. For example, if you wished to subscribe to all v1 events you could supply the event type v1:*, or if you wished to subscribe to all order events v1:order.*. Supplying a wildcard will also automatically subscribe you to any new events created in future which match that scheme. Wildcards must specify an event version, and can optionally supply a resource, however this cannot be a partial resource. See below for some examples: Valid:

  • v1:*
  • v1:order.*
  • v1:product.*

Invalid:

  • *
  • v1*
  • v1:ord*
  • v1:product.*like
  • v1:product.u*

Example request

{
  "enabled": false
}

Response

Webhook configuration was updated successfully.

webhook_idstring uuid required

The ID of the updated webhook configuration.

urlstring url required

The URL where incoming webhooks will be received.

enabledboolean required

Whether this webhook configuration is enabled.

event_typesstring[] required

The Depop event types you wish to receive webhooks for. Event types can either be the full name of an event, e.g. v1:order.new, or an event prefix with a wildcard. For example, if you wished to subscribe to all v1 events you could supply the event type v1:*, or if you wished to subscribe to all order events v1:order.*. Supplying a wildcard will also automatically subscribe you to any new events created in future which match that scheme. Wildcards must specify an event version, and can optionally supply a resource, however this cannot be a partial resource. See below for some examples: Valid:

  • v1:*
  • v1:order.*
  • v1:product.*

Invalid:

  • *
  • v1*
  • v1:ord*
  • v1:product.*like
  • v1:product.u*

Example response

{
  "webhook_id": "33a735f2-e68f-49b4-8192-45fb7ec50ce6",
  "url": "https://example.com/webhooks",
  "enabled": false,
  "event_types": [
    "v1:order.*",
    "v1:product.update"
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.