Webhook endpoints
L’objet Webhook endpoint
Attributs
idstringIdentifiant unique de l'objet (préfixé, opaque).
objectstringwebhook_endpointurlstringdescriptionstringnullableenabled_eventsarray of stringbrandsarray of objectnullablestatusenumValeurs possibles :
enabled·disabledapi_versionstringlivemodebooleantruepour les données réelles,falsepour le bac à sable du mode test.createdintegerTime at which the object was created (unix timestamp, seconds).
secretstring
{
"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
urlstringobligatoiredescriptionstringnullableenabled_eventsarray of stringobligatoirebrandsarray of stringnullabledisabledboolean
Retour
Renvoie l’objet webhook_endpoint créé. Lève une erreur en cas de problème.
curl
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."}'{
"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
endpointstringobligatoireWebhook Endpoint id (
we_…).urlstringobligatoiredescriptionstringnullableenabled_eventsarray of stringobligatoirebrandsarray of stringnullabledisabledboolean
Retour
Renvoie l’objet webhook_endpoint mis à jour. Lève une erreur en cas de problème.
curl
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."}'{
"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
endpointstringobligatoireWebhook Endpoint id (
we_…).
Retour
Renvoie l’objet webhook_endpoint. Lève une erreur en cas de problème.
curl
curl https://api.skoup.ai/v1/webhook_endpoints/we_034ebikiyFV76y9oiMvhxm \
-H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"{
"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
limitintegerNombre d'objets à renvoyer, entre 1 et 100 (20 par défaut).
starting_afterstringCurseur : l'
iddu 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
curl https://api.skoup.ai/v1/webhook_endpoints?limit=3 \
-H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"{
"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
endpointstringobligatoireWebhook Endpoint id (
we_…).
Retour
Renvoie un objet avec deleted: true. Lève une erreur en cas de problème.
curl
curl -X DELETE https://api.skoup.ai/v1/webhook_endpoints/we_034ebikiyFV76y9oiMvhxm \
-H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"{
"id": "we_034ebikiyFV76y9oiMvhxm",
"object": "webhook_endpoint",
"deleted": true
}