mistralM

Docs

Beta Webhooks

API Webhooks (bêta).

GET /v1/webhooks

Lister les webhooks

Lister les webhooks

Responses

array<Webhook>

Réponse réussie

Webhook
created_at
date-time* obligatoire
creator_id
string* obligatoire
description
string | null
event_id_pattern
string | null
event_type_path
string | null
event_type_pattern
string | null
expires_at
date-time | null* obligatoire
http_method
string* obligatoire
id
string* obligatoire
name
string* obligatoire
organization_id
string* obligatoire
owner_type
"workspace" | "user"* obligatoire
provider
"slack" | "github" | "notion" | "lucca" | "linear" | "microsoft" | "ashby" | "whatsapp" | "custom"* obligatoire
signature_encoding
"hex" | "base64"* obligatoire
signature_extractor_regex
string | null* obligatoire
signature_hash_algorithm
"sha256" | "sha1"* obligatoire
signature_header_name
string | null* obligatoire
signature_payload_pattern
string | null* obligatoire
success_status_code
integer | null* obligatoire
timestamp_extractor_regex
string | null* obligatoire
timestamp_pattern
string | null
updated_at
date-time* obligatoire
url
string* obligatoire
url_verification_token
string | null

Token que le fournisseur renvoie lors de la vérification de l’URL (WhatsApp : le Verify token)

url_verified
boolean | null* obligatoire
validity_period_second
integer | null* obligatoire
workspace_id
string* obligatoire

POST /v1/webhooks

Créer un webhook

Créer un webhook

Exemple de requête

{
  "name": "ipsum eiusmod",
  "provider": "slack"
}

Corps de la requête

description
string | null

Usage de ce webhook

encryption_key
string | null

Clé de chiffrement utilisée pour déchiffrer les charges utiles du webhook

event_id_pattern
string | null

Modèle d’identifiant unique d’événement utilisé pour dédupliquer les livraisons, avec les variables {body.<path>} et {headers.<Header-Name>}, par ex. {body.id} ou {body.event_id}.{headers.X-Delivery-Id}. Par défaut, un hash du corps de la requête

event_type_pattern
string | null

Modèle du type d’événement, avec les variables {body.<path>} et {headers.<Header-Name>}, par ex. {body.type} ou {headers.X-GitHub-Event}

expires_at
date-time | null
name
stringMin Length: 1Max Length: 256* obligatoire

Nom lisible de ce webhook

owner_type
"workspace" | "user"
provider
"slack" | "github" | "notion" | "lucca" | "linear" | "microsoft" | "ashby" | "whatsapp" | "custom"* obligatoire
secret
string | null

Secret de signature fourni par le fournisseur tiers

signature_encoding
"hex" | "base64"
signature_extractor_regex
string | null

Regex permettant d’extraire la signature, par ex. sha256=(.*)

signature_hash_algorithm
"sha256" | "sha1"
signature_header_name
string | null
signature_payload_pattern
string | null

Modèle de la charge utile signée, par ex. {body} ou {timestamp}.{body}

success_status_code
integer | null

Code de statut HTTP renvoyé pour les livraisons acceptées, par ex. 200

timestamp_extractor_regex
string | null

Regex permettant d’extraire l’horodatage du timestamp_pattern rendu (l’en-tête de signature par défaut), utilisé comme {timestamp}, par ex. t=([^,]+). Par défaut, la valeur entière lorsque timestamp_pattern est défini

timestamp_pattern
string | null

Modèle de l’horodatage utilisé comme {timestamp}, avec les variables {body.<path>} et {headers.<Header-Name>}, par ex. {headers.X-Slack-Request-Timestamp} ou {body.webhookTimestamp}. Par défaut, l’en-tête de signature lorsque timestamp_extractor_regex est défini

url_verification_token
string | null

Token que le fournisseur renvoie lors de la vérification de l’URL. Obligatoire pour WhatsApp (collez la même valeur dans le champ Verify token du Meta App Dashboard), interdit pour les autres fournisseurs

validity_period_second
integer | null

Écart maximal autorisé, en secondes, entre l’horodatage signé et l’heure de réception, par ex. 300

Server-Side Events

Réponse réussie

created_at
date-time* obligatoire
creator_id
string* obligatoire
description
string | null
event_id_pattern
string | null
event_type_path
string | null
event_type_pattern
string | null
expires_at
date-time | null* obligatoire
http_method
string* obligatoire
id
string* obligatoire
name
string* obligatoire
organization_id
string* obligatoire
owner_type
"workspace" | "user"* obligatoire
provider
"slack" | "github" | "notion" | "lucca" | "linear" | "microsoft" | "ashby" | "whatsapp" | "custom"* obligatoire
signature_encoding
"hex" | "base64"* obligatoire
signature_extractor_regex
string | null* obligatoire
signature_hash_algorithm
"sha256" | "sha1"* obligatoire
signature_header_name
string | null* obligatoire
signature_payload_pattern
string | null* obligatoire
success_status_code
integer | null* obligatoire
timestamp_extractor_regex
string | null* obligatoire
timestamp_pattern
string | null
updated_at
date-time* obligatoire
url
string* obligatoire
url_verification_token
string | null

Token que le fournisseur renvoie lors de la vérification de l’URL (WhatsApp : le Verify token)

url_verified
boolean | null* obligatoire
validity_period_second
integer | null* obligatoire
workspace_id
string* obligatoire

GET /v1/webhooks/{webhook_id}

Obtenir un webhook

Obtenir un webhook

Parameters

webhook_id
stringpath* obligatoire

Responses

Réponse réussie

created_at
date-time* obligatoire
creator_id
string* obligatoire
description
string | null
event_id_pattern
string | null
event_type_path
string | null
event_type_pattern
string | null
expires_at
date-time | null* obligatoire
http_method
string* obligatoire
id
string* obligatoire
name
string* obligatoire
organization_id
string* obligatoire
owner_type
"workspace" | "user"* obligatoire
provider
"slack" | "github" | "notion" | "lucca" | "linear" | "microsoft" | "ashby" | "whatsapp" | "custom"* obligatoire
signature_encoding
"hex" | "base64"* obligatoire
signature_extractor_regex
string | null* obligatoire
signature_hash_algorithm
"sha256" | "sha1"* obligatoire
signature_header_name
string | null* obligatoire
signature_payload_pattern
string | null* obligatoire
success_status_code
integer | null* obligatoire
timestamp_extractor_regex
string | null* obligatoire
timestamp_pattern
string | null
updated_at
date-time* obligatoire
url
string* obligatoire
url_verification_token
string | null

Token que le fournisseur renvoie lors de la vérification de l’URL (WhatsApp : le Verify token)

url_verified
boolean | null* obligatoire
validity_period_second
integer | null* obligatoire
workspace_id
string* obligatoire

DELETE /v1/webhooks/{webhook_id}

Supprimer un webhook

Supprimer un webhook

Parameters

webhook_id
stringpath* obligatoire

GET /v1/webhooks/{webhook_id}/signing-secret

Obtenir le secret de signature d’un webhook

Obtenir le secret de signature d’un webhook

Parameters

webhook_id
stringpath* obligatoire

Responses

Réponse réussie

signing_secret
string* obligatoire