Webhook Configuration

Create a new webhook configuration.

This endpoint allows you to create a new webhook configuration. A maximum of 10 webhook configurations can be created at any time.

post/api/v1/webhooks/

Request

Request body

urlstring url required

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

enabledboolean required

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[] 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 request

{
  "url": "https://example.com/webhooks",
  "enabled": true,
  "event_types": [
    "v1:order.*",
    "v1:product.update"
  ]
}

Response

Webhook configuration was created successfully.

webhook_idstring uuid required

The ID of the newly created webhook configuration.

secretstring required

The secret which can be used to verify that incoming webhooks were generated by Depop. Use this string as-is as the HMAC-SHA256 key when verifying the X-Depop-Signature header — do not base64-decode it. It should be kept secret and never shared with anyone. You can use this secret to verify the legitimacy of webhooks by following the guide at https://partnerapi.depop.com/api-docs/how-to-guides/validate-webhooks/.

Example response

{
  "webhook_id": "33a735f2-e68f-49b4-8192-45fb7ec50ce6",
  "secret": "rncxmdh5v2b37etli3ajb0e8f3xvopel"
}

Changes

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