Webhooks
GET/v1/webhooks
Lister les webhooks
Permission webhooks:manage
Réponse 200 · Webhooks
| Champ | Type | Détails |
|---|---|---|
| webhooksobligatoire | Webhook[] | — |
curl https://api.vidoum.com/v1/webhooks \
-H "Authorization: Bearer $VIDOUM_API_KEY"POST/v1/webhooks
Créer un webhook (le secret de signature n’est renvoyé qu’une fois)
Permission webhooks:manageIdempotency-Key accepté
Corps de la requête
| Champ | Type | Détails |
|---|---|---|
| urlobligatoire | string | 2000 caractères au plus |
| eventsobligatoire | ("video.uploaded" | "video.processing" | "video.ready" | "video.failed" | "video.deleted" | "organization.quota_warning" | "playback.completed")[] | 1 élément(s) au moins |
| description | string | 200 caractères au plus |
Réponse 201 · Webhook avec son secret
| Champ | Type | Détails |
|---|---|---|
| webhookobligatoire | Webhook | — |
curl -X POST https://api.vidoum.com/v1/webhooks \
-H "Authorization: Bearer $VIDOUM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"url": "https://exemple.ma/webhooks/vidoum",
"events": [
"video.ready",
"video.failed"
],
"description": "Chapitre 2, partie 1"
}'GET/v1/webhooks/{id}
Un webhook
Permission webhooks:manage
Paramètres de chemin
| Champ | Type | Détails |
|---|---|---|
| idobligatoire | string (uuid) | — |
Réponse 200 · Webhook
| Champ | Type | Détails |
|---|---|---|
| webhookobligatoire | Webhook | — |
curl https://api.vidoum.com/v1/webhooks/ID \
-H "Authorization: Bearer $VIDOUM_API_KEY"PATCH/v1/webhooks/{id}
Modifier l’URL, les événements, la description, ou activer / désactiver
Permission webhooks:manage
Paramètres de chemin
| Champ | Type | Détails |
|---|---|---|
| idobligatoire | string (uuid) | — |
Corps de la requête
| Champ | Type | Détails |
|---|---|---|
| url | string | 2000 caractères au plus |
| events | ("video.uploaded" | "video.processing" | "video.ready" | "video.failed" | "video.deleted" | "organization.quota_warning" | "playback.completed")[] | 1 élément(s) au moins |
| description | string | null | 200 caractères au plus |
| enabled | boolean | — |
Réponse 200 · Webhook
| Champ | Type | Détails |
|---|---|---|
| webhookobligatoire | Webhook | — |
curl -X PATCH https://api.vidoum.com/v1/webhooks/ID \
-H "Authorization: Bearer $VIDOUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://exemple.ma/webhooks/vidoum",
"events": [
"video.ready",
"video.failed"
],
"description": "Chapitre 2, partie 1",
"enabled": true
}'DELETE/v1/webhooks/{id}
Supprimer un webhook
Permission webhooks:manage
Paramètres de chemin
| Champ | Type | Détails |
|---|---|---|
| idobligatoire | string (uuid) | — |
Réponse 204 · Supprimé
curl -X DELETE https://api.vidoum.com/v1/webhooks/ID \
-H "Authorization: Bearer $VIDOUM_API_KEY"POST/v1/webhooks/{id}/rotate-secret
Nouveau secret de signature ; l’ancien signe encore pendant 24 h
Permission webhooks:manage
Paramètres de chemin
| Champ | Type | Détails |
|---|---|---|
| idobligatoire | string (uuid) | — |
Réponse 200 · Webhook avec son nouveau secret
| Champ | Type | Détails |
|---|---|---|
| webhookobligatoire | Webhook | — |
curl -X POST https://api.vidoum.com/v1/webhooks/ID/rotate-secret \
-H "Authorization: Bearer $VIDOUM_API_KEY"POST/v1/webhooks/{id}/test
Envoyer un événement webhook.test à ce point d’accès
Permission webhooks:manage
Paramètres de chemin
| Champ | Type | Détails |
|---|---|---|
| idobligatoire | string (uuid) | — |
Réponse 202 · En file d’attente
| Champ | Type | Détails |
|---|---|---|
| eventIdobligatoire | string | — |
curl -X POST https://api.vidoum.com/v1/webhooks/ID/test \
-H "Authorization: Bearer $VIDOUM_API_KEY"GET/v1/webhooks/{id}/deliveries
Journal des envois (30 jours), du plus récent au plus ancien
Permission webhooks:manage
Paramètres de chemin
| Champ | Type | Détails |
|---|---|---|
| idobligatoire | string (uuid) | — |
Paramètres de requête
| Champ | Type | Détails |
|---|---|---|
| limitobligatoire | integer | ≥ 1 · ≤ 100 · par défaut 25 |
| cursor | string | 200 caractères au plus · format ^[A-Za-z0-9_-]+$ |
Réponse 200 · Page d’envois
| Champ | Type | Détails |
|---|---|---|
| deliveriesobligatoire | WebhookDelivery[] | — |
| nextCursorobligatoire | string | null | — |
curl https://api.vidoum.com/v1/webhooks/ID/deliveries \
-H "Authorization: Bearer $VIDOUM_API_KEY"POST/v1/webhooks/{id}/deliveries/{deliveryId}/redeliver
Renvoyer un événement
Permission webhooks:manage
Paramètres de chemin
| Champ | Type | Détails |
|---|---|---|
| idobligatoire | string (uuid) | — |
| deliveryIdobligatoire | string (uuid) | — |
Réponse 202 · En file d’attente
| Champ | Type | Détails |
|---|---|---|
| deliveryobligatoire | WebhookDelivery | — |
curl -X POST https://api.vidoum.com/v1/webhooks/ID/deliveries/DELIVERY_ID/redeliver \
-H "Authorization: Bearer $VIDOUM_API_KEY"