Aller au contenu
FanConvert Docs
Référence

Webhooks

Référence générée depuis le contrat OpenAPI : Webhooks.

4 min de lectureOuvrir dans ChatGPTOuvrir dans Claude

Enregistrer une adresse qui recevra les événements

POST /public/v1/webhooks · createWebhook

En-tête Idempotency-Key obligatoire : voir Écritures et idempotence.

Paramètres

NomOùTypeRequisDescription
Idempotency-Keyen-têtestringoui

Corps de la requête

WebhookCreate

ChampTypeRequisDescription
urlstringouihttps://, hôte public, port 443 ou 8443.
events"sale.created" | "emergency.created" | "ai.paused"[]oui

Réponse 201

WebhookCreated

ChampTypeRequisDescription
webhookWebhookoui
secretstringouiLe secret de signature whsec_… : affiché UNE fois, gardez-le.

Webhook

ChampTypeRequisDescription
idstringoui
urlstringoui
eventsstring[]oui
createdAtstring (date-time)oui
disabledAtstring (date-time) | nulloui
disabledReasonstring | nulloui

Erreurs possibles

401 · 403 · 404 · 409 · 422 · 429 · 503 — Format des erreurs : Erreurs.

Exemple

curl -X POST "https://app.fanconvert.ai/public/v1/webhooks" \
  -H "Authorization: Bearer $FANCONVERT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ … }'

Les webhooks de cette clé

GET /public/v1/webhooks · listWebhooks

Réponse 200

Erreurs possibles

401 · 403 · 404 · 409 · 422 · 429 · 503 — Format des erreurs : Erreurs.

Exemple

curl -X GET "https://app.fanconvert.ai/public/v1/webhooks" \
  -H "Authorization: Bearer $FANCONVERT_API_KEY"

Désactiver un webhook (son journal est gardé)

DELETE /public/v1/webhooks/{endpoint_id} · disableWebhook

Paramètres

NomOùTypeRequisDescription
endpoint_idcheminstringoui

Réponse 200

Webhook

ChampTypeRequisDescription
idstringoui
urlstringoui
eventsstring[]oui
createdAtstring (date-time)oui
disabledAtstring (date-time) | nulloui
disabledReasonstring | nulloui

Erreurs possibles

401 · 403 · 404 · 409 · 422 · 429 · 503 — Format des erreurs : Erreurs.

Exemple

curl -X DELETE "https://app.fanconvert.ai/public/v1/webhooks/{endpoint_id}" \
  -H "Authorization: Bearer $FANCONVERT_API_KEY"

Le journal des livraisons, les plus récentes d'abord

GET /public/v1/webhooks/{endpoint_id}/deliveries · listWebhookDeliveries

Paramètres

NomOùTypeRequisDescription
endpoint_idcheminstringoui
limitrequêteintegernon(défaut : 50)
cursorrequêtestring | nullnon

Réponse 200

DeliveryPage

ChampTypeRequisDescription
itemsDelivery[]oui
nextCursorstring | nullnon

Delivery

ChampTypeRequisDescription
idstringoui
eventIdstringoui
eventTypestringoui
status"pending" | "delivered" | "failed"oui
attemptsintegeroui
lastStatusCodeinteger | nulloui
lastErrorstring | nullouiMotif court : timeout, connexion, http_<code>, adresse_refusee…
createdAtstring (date-time)oui
nextAttemptAtstring (date-time) | nulloui
deliveredAtstring (date-time) | nulloui

Erreurs possibles

401 · 403 · 404 · 409 · 422 · 429 · 503 — Format des erreurs : Erreurs.

Exemple

curl -X GET "https://app.fanconvert.ai/public/v1/webhooks/{endpoint_id}/deliveries" \
  -H "Authorization: Bearer $FANCONVERT_API_KEY"

Envoyer un événement ping (aucune donnée) pour tester la réception

POST /public/v1/webhooks/{endpoint_id}/ping · pingWebhook

En-tête Idempotency-Key obligatoire : voir Écritures et idempotence.

Paramètres

NomOùTypeRequisDescription
endpoint_idcheminstringoui

Réponse 202

Webhook

ChampTypeRequisDescription
idstringoui
urlstringoui
eventsstring[]oui
createdAtstring (date-time)oui
disabledAtstring (date-time) | nulloui
disabledReasonstring | nulloui

Erreurs possibles

401 · 403 · 404 · 409 · 422 · 429 · 503 — Format des erreurs : Erreurs.

Exemple

curl -X POST "https://app.fanconvert.ai/public/v1/webhooks/{endpoint_id}/ping" \
  -H "Authorization: Bearer $FANCONVERT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Mis à jour le

Sur cette page