Mettre à jour un endpoint de webhook
curl --request PATCH \
--url https://www.qwairy.co/api/v1/webhooks/{webhookId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"url": "<string>",
"description": {},
"events": [
"<string>"
],
"brandIds": [
"<string>"
],
"enabled": true
}
'import requests
url = "https://www.qwairy.co/api/v1/webhooks/{webhookId}"
payload = {
"url": "<string>",
"description": {},
"events": ["<string>"],
"brandIds": ["<string>"],
"enabled": True
}
headers = {
"Authorization": "<authorization>",
"If-Match": "<if-match>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: '<authorization>',
'If-Match': '<if-match>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: '<string>',
description: {},
events: ['<string>'],
brandIds: ['<string>'],
enabled: true
})
};
fetch('https://www.qwairy.co/api/v1/webhooks/{webhookId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Endpoints de webhook
Mettre à jour un endpoint de webhook
Modifiez l’URL, la description, les événements, le filtre de workspaces ou l’activation d’un endpoint de webhook. Réactiver un endpoint efface son état d’échec.
PATCH
https://www.qwairy.co
/
api
/
v1
/
webhooks
/
{webhookId}
Mettre à jour un endpoint de webhook
curl --request PATCH \
--url https://www.qwairy.co/api/v1/webhooks/{webhookId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"url": "<string>",
"description": {},
"events": [
"<string>"
],
"brandIds": [
"<string>"
],
"enabled": true
}
'import requests
url = "https://www.qwairy.co/api/v1/webhooks/{webhookId}"
payload = {
"url": "<string>",
"description": {},
"events": ["<string>"],
"brandIds": ["<string>"],
"enabled": True
}
headers = {
"Authorization": "<authorization>",
"If-Match": "<if-match>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: '<authorization>',
'If-Match': '<if-match>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: '<string>',
description: {},
events: ['<string>'],
brandIds: ['<string>'],
enabled: true
})
};
fetch('https://www.qwairy.co/api/v1/webhooks/{webhookId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Met à jour l’URL, la description, les événements, les workspaces ou l’activation d’un endpoint. N’envoyez que les champs à modifier. Réactiver un endpoint désactivé pour cause d’échecs efface son état d’échec.
Les webhooks d’intégration nécessitent une offre Business, Agency Business ou Enterprise active. Modifier un endpoint exige aussi un jeton d’API dont l’accès en écriture a été activé par un Propriétaire ou un Manager. Consultez Webhooks d’intégration et Écrire des données.
Fournissez au moins un champ.
Consultez Codes d’erreur pour les erreurs d’authentification, d’offre, d’idempotence et de serveur. Un jeton sans accès en écriture renvoie
L’
ETag de Obtenir un endpoint de webhook, guillemets compris. Utilisez * pour écrire sans condition.Liste de remplacement complète de types d’événements, au moins un.
Liste de remplacement complète de 100 workspaces au maximum. Un tableau vide reçoit les événements de tous les workspaces.
Réponse
Renvoie200, le nouvel ETag et l’endpoint, avec les champs décrits dans Lister les endpoints de webhook.
Requête et réponse synthétiques
Cet exemple suppose que l’ETag que vous avez lu en dernier est "0".
curl -X PATCH "https://www.qwairy.co/api/v1/webhooks/$WEBHOOK_ID" \
-H "Authorization: Bearer $QWAIRY_API_TOKEN" \
-H 'If-Match: "0"' \
-H "Content-Type: application/json" \
-d '{"events":["run.completed","run.failed","run.cancelled"],"enabled":true}'
{
"id": "eeeeeeee-0000-4000-8000-000000000000",
"url": "https://hooks.example.com/qwairy",
"description": "Production receiver",
"events": ["run.completed", "run.failed", "run.cancelled"],
"brandIds": [],
"enabled": true,
"disabledReason": null,
"failingSince": null,
"previousSecretExpiresAt": null,
"version": 1,
"createdAt": "2026-10-12T09:00:00.000Z",
"updatedAt": "2026-10-12T10:00:00.000Z"
}
Erreurs
| Statut | Code | Cause |
|---|---|---|
400 | INVALID_REQUEST | Aucun champ, ou une valeur invalide |
404 | RESOURCE_NOT_FOUND | L’endpoint est absent ou appartient à une autre équipe |
412 | PRECONDITION_FAILED | L’endpoint a changé depuis votre lecture |
428 | PRECONDITION_REQUIRED | If-Match est absent |
403 API_KEY_READ_ONLY. Sur 429, respectez Retry-After. Si le limiteur d’écriture est indisponible ou si les écritures sont suspendues, la requête renvoie 503 SERVICE_UNAVAILABLE et rien ne change.
