Référence de l’API

Webhooks

GET/v1/webhooks

Lister les webhooks

Permission webhooks:manage

Réponse 200 · Webhooks

ChampTypeDétails
webhooksobligatoireWebhook[]—
Exemple
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

ChampTypeDétails
urlobligatoirestring2000 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
descriptionstring200 caractères au plus

Réponse 201 · Webhook avec son secret

ChampTypeDétails
webhookobligatoireWebhook—
Exemple
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

ChampTypeDétails
idobligatoirestring (uuid)—

Réponse 200 · Webhook

ChampTypeDétails
webhookobligatoireWebhook—
Exemple
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

ChampTypeDétails
idobligatoirestring (uuid)—

Corps de la requête

ChampTypeDétails
urlstring2000 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
descriptionstring | null200 caractères au plus
enabledboolean—

Réponse 200 · Webhook

ChampTypeDétails
webhookobligatoireWebhook—
Exemple
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

ChampTypeDétails
idobligatoirestring (uuid)—

Réponse 204 · Supprimé

Exemple
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

ChampTypeDétails
idobligatoirestring (uuid)—

Réponse 200 · Webhook avec son nouveau secret

ChampTypeDétails
webhookobligatoireWebhook—
Exemple
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

ChampTypeDétails
idobligatoirestring (uuid)—

Réponse 202 · En file d’attente

ChampTypeDétails
eventIdobligatoirestring—
Exemple
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

ChampTypeDétails
idobligatoirestring (uuid)—

Paramètres de requête

ChampTypeDétails
limitobligatoireinteger≥ 1 · ≤ 100 · par défaut 25
cursorstring200 caractères au plus · format ^[A-Za-z0-9_-]+$

Réponse 200 · Page d’envois

ChampTypeDétails
deliveriesobligatoireWebhookDelivery[]—
nextCursorobligatoirestring | null—
Exemple
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

ChampTypeDétails
idobligatoirestring (uuid)—
deliveryIdobligatoirestring (uuid)—

Réponse 202 · En file d’attente

ChampTypeDétails
deliveryobligatoireWebhookDelivery—
Exemple
curl -X POST https://api.vidoum.com/v1/webhooks/ID/deliveries/DELIVERY_ID/redeliver \
  -H "Authorization: Bearer $VIDOUM_API_KEY"