Skip to Content
API referenceWebhook endpoints

Webhook endpoints

The Webhook endpoint object

Attributes

  • idstring

    Unique identifier of the object (prefixed, opaque).

  • objectstring

    webhook_endpoint

  • urlstring
  • descriptionstringnullable
  • enabled_eventsarray of string
  • brandsarray of objectnullable
  • statusenum

    Possible values: enabled · disabled

  • api_versionstring
  • livemodeboolean

    true for live data, false for the test-mode sandbox.

  • createdinteger

    Time at which the object was created (unix timestamp, seconds).

  • secretstring
The Webhook endpoint object
{ "id": "we_034eTM6NVwPXgyvF595hZZ", "object": "webhook_endpoint", "url": "https://hooks.example.com/skoup", "description": "Rewrite the product copy so the frame warranty is stated.", "enabled_events": [ "string" ], "brands": [ {} ], "status": "enabled", "api_version": "v1", "livemode": true, "created": 1790000000, "secret": "whsec_9fW2kLq7Rt4mXz1Vb8Nc3Hy6" }

Create a webhook endpoint

POST/v1/webhook_endpoints

The response carries the signing secret (whsec_…) — the only time the API returns it. Store it to verify the X-Skoup-Signature header.

Parameters

  • urlstringrequired
  • descriptionstringnullable
  • enabled_eventsarray of stringrequired
  • brandsarray of stringnullable
  • disabledboolean

Returns

Returns the created webhook_endpoint object. Raises an error if something goes wrong.

curl -X POST https://api.skoup.ai/v1/webhook_endpoints \ -H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc" \ -H "Content-Type: application/json" \ -d '{"url":"https://nordvelo.fr","enabled_events":["string"],"description":"Rewrite the product copy so the frame warranty is stated."}'
Response
{ "id": "we_034eTM6NVwPXgyvF595hZZ", "object": "webhook_endpoint", "url": "https://hooks.example.com/skoup", "description": "Rewrite the product copy so the frame warranty is stated.", "enabled_events": [ "string" ], "brands": [ {} ], "status": "enabled", "api_version": "v1", "livemode": true, "created": 1790000000, "secret": "whsec_9fW2kLq7Rt4mXz1Vb8Nc3Hy6" }

Update a webhook endpoint

PATCH/v1/webhook_endpoints/{endpoint}

Send disabled: true to pause it, false to enable it again.

Parameters

  • endpointstringrequired

    Webhook Endpoint id (we_…).

  • urlstringrequired
  • descriptionstringnullable
  • enabled_eventsarray of stringrequired
  • brandsarray of stringnullable
  • disabledboolean

Returns

Returns the updated webhook_endpoint object. Raises an error if something goes wrong.

curl -X PATCH https://api.skoup.ai/v1/webhook_endpoints/we_034ebikiyFV76y9oiMvhxm \ -H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc" \ -H "Content-Type: application/json" \ -d '{"url":"https://nordvelo.fr","enabled_events":["string"],"description":"Rewrite the product copy so the frame warranty is stated."}'
Response
{ "id": "we_034eTM6NVwPXgyvF595hZZ", "object": "webhook_endpoint", "url": "https://hooks.example.com/skoup", "description": "Rewrite the product copy so the frame warranty is stated.", "enabled_events": [ "string" ], "brands": [ {} ], "status": "enabled", "api_version": "v1", "livemode": true, "created": 1790000000, "secret": "whsec_9fW2kLq7Rt4mXz1Vb8Nc3Hy6" }

Retrieve a webhook endpoint

GET/v1/webhook_endpoints/{endpoint}

Parameters

  • endpointstringrequired

    Webhook Endpoint id (we_…).

Returns

Returns the webhook_endpoint object. Raises an error if something goes wrong.

curl https://api.skoup.ai/v1/webhook_endpoints/we_034ebikiyFV76y9oiMvhxm \ -H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"
Response
{ "id": "we_034eTM6NVwPXgyvF595hZZ", "object": "webhook_endpoint", "url": "https://hooks.example.com/skoup", "description": "Rewrite the product copy so the frame warranty is stated.", "enabled_events": [ "string" ], "brands": [ {} ], "status": "enabled", "api_version": "v1", "livemode": true, "created": 1790000000, "secret": "whsec_9fW2kLq7Rt4mXz1Vb8Nc3Hy6" }

List webhook endpoints

GET/v1/webhook_endpoints

Parameters

  • limitinteger

    Number of objects to return, between 1 and 100 (default 20).

  • starting_afterstring

    Cursor: the id of the last object of the previous page.

Returns

A dictionary with a data property holding up to limit webhook_endpoint objects, newest first, and has_more telling whether another page exists. Raises an error if something goes wrong.

curl https://api.skoup.ai/v1/webhook_endpoints?limit=3 \ -H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"
Response
{ "object": "list", "url": "/v1/webhook_endpoints", "has_more": false, "data": [ { "id": "we_034eTM6NVwPXgyvF595hZZ", "object": "webhook_endpoint", "url": "https://hooks.example.com/skoup", "description": "Rewrite the product copy so the frame warranty is stated.", "enabled_events": [ "string" ], "brands": [ {} ], "status": "enabled", "api_version": "v1", "livemode": true, "created": 1790000000, "secret": "whsec_9fW2kLq7Rt4mXz1Vb8Nc3Hy6" } ] }

Delete a webhook endpoint

DELETE/v1/webhook_endpoints/{endpoint}

Parameters

  • endpointstringrequired

    Webhook Endpoint id (we_…).

Returns

Returns an object with deleted: true. Raises an error if something goes wrong.

curl -X DELETE https://api.skoup.ai/v1/webhook_endpoints/we_034ebikiyFV76y9oiMvhxm \ -H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"
Response
{ "id": "we_034ebikiyFV76y9oiMvhxm", "object": "webhook_endpoint", "deleted": true }
Last updated on