Skip to Content
Référence APIWebhook endpoints

Webhook endpoints

L’objet Webhook endpoint

Attributs

  • idstring

    Identifiant unique de l'objet (préfixé, opaque).

  • objectstring

    webhook_endpoint

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

    Valeurs possibles : enabled · disabled

  • api_versionstring
  • livemodeboolean

    true pour les données réelles, false pour le bac à sable du mode test.

  • createdinteger

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

  • secretstring
L'objet Webhook endpoint
{ "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.

Paramètres

  • urlstringobligatoire
  • descriptionstringnullable
  • enabled_eventsarray of stringobligatoire
  • brandsarray of stringnullable
  • disabledboolean

Retour

Renvoie l’objet webhook_endpoint créé. Lève une erreur en cas de problème.

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."}'
Réponse
{ "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.

Paramètres

  • endpointstringobligatoire

    Webhook Endpoint id (we_…).

  • urlstringobligatoire
  • descriptionstringnullable
  • enabled_eventsarray of stringobligatoire
  • brandsarray of stringnullable
  • disabledboolean

Retour

Renvoie l’objet webhook_endpoint mis à jour. Lève une erreur en cas de problème.

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."}'
Réponse
{ "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}

Paramètres

  • endpointstringobligatoire

    Webhook Endpoint id (we_…).

Retour

Renvoie l’objet webhook_endpoint. Lève une erreur en cas de problème.

curl https://api.skoup.ai/v1/webhook_endpoints/we_034ebikiyFV76y9oiMvhxm \ -H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"
Réponse
{ "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

Paramètres

  • limitinteger

    Nombre d'objets à renvoyer, entre 1 et 100 (20 par défaut).

  • starting_afterstring

    Curseur : l'id du dernier objet de la page précédente.

Retour

Un dictionnaire dont la propriété data contient jusqu’à limit objets webhook_endpoint, du plus récent au plus ancien, et has_more indique s’il reste une page. Lève une erreur en cas de problème.

curl https://api.skoup.ai/v1/webhook_endpoints?limit=3 \ -H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"
Réponse
{ "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}

Paramètres

  • endpointstringobligatoire

    Webhook Endpoint id (we_…).

Retour

Renvoie un objet avec deleted: true. Lève une erreur en cas de problème.

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