Webhooks
Reference generated from the OpenAPI contract: Webhooks.
Enregistrer une adresse qui recevra les événements
POST /public/v1/webhooks · createWebhook
Idempotency-Key header required: see Writes and idempotency.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body
WebhookCreate
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | https://, hôte public, port 443 ou 8443. |
events | "sale.created" | "emergency.created" | "ai.paused"[] | yes |
Response 201
WebhookCreated
| Field | Type | Required | Description |
|---|---|---|---|
webhook | Webhook | yes | |
secret | string | yes | Le secret de signature whsec_… : affiché UNE fois, gardez-le. |
Webhook
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
url | string | yes | |
events | string[] | yes | |
createdAt | string (date-time) | yes | |
disabledAt | string (date-time) | null | yes | |
disabledReason | string | null | yes |
Possible errors
401 · 403 · 404 · 409 · 422 · 429 · 503 — Error format: Errors.
Example
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
Response 200
Possible errors
401 · 403 · 404 · 409 · 422 · 429 · 503 — Error format: Errors.
Example
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
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
endpoint_id | path | string | yes |
Response 200
Webhook
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
url | string | yes | |
events | string[] | yes | |
createdAt | string (date-time) | yes | |
disabledAt | string (date-time) | null | yes | |
disabledReason | string | null | yes |
Possible errors
401 · 403 · 404 · 409 · 422 · 429 · 503 — Error format: Errors.
Example
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
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
endpoint_id | path | string | yes | |
limit | query | integer | no | (default : 50) |
cursor | query | string | null | no |
Response 200
DeliveryPage
| Field | Type | Required | Description |
|---|---|---|---|
items | Delivery[] | yes | |
nextCursor | string | null | no |
Delivery
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
eventId | string | yes | |
eventType | string | yes | |
status | "pending" | "delivered" | "failed" | yes | |
attempts | integer | yes | |
lastStatusCode | integer | null | yes | |
lastError | string | null | yes | Motif court : timeout, connexion, http_<code>, adresse_refusee… |
createdAt | string (date-time) | yes | |
nextAttemptAt | string (date-time) | null | yes | |
deliveredAt | string (date-time) | null | yes |
Possible errors
401 · 403 · 404 · 409 · 422 · 429 · 503 — Error format: Errors.
Example
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
Idempotency-Key header required: see Writes and idempotency.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
endpoint_id | path | string | yes |
Response 202
Webhook
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
url | string | yes | |
events | string[] | yes | |
createdAt | string (date-time) | yes | |
disabledAt | string (date-time) | null | yes | |
disabledReason | string | null | yes |
Possible errors
401 · 403 · 404 · 409 · 422 · 429 · 503 — Error format: Errors.
Example
curl -X POST "https://app.fanconvert.ai/public/v1/webhooks/{endpoint_id}/ping" \
-H "Authorization: Bearer $FANCONVERT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"Last updated on