mistralM

Docs

Beta Triggers

API Triggers (bêta).

GET /v1/triggers

Lister les déclencheurs

Lister les déclencheurs

Parameters

handler
"workflows" | "agents" | "spaces"query

Filtrer par type de handler

primitive_id
string | nullquery

Filtrer par ID de primitive (workflow, agent ou app)

event_source_id
string | nullquery

Filtrer par ID de source d’événements (ID du webhook)

Responses

array<Trigger>

Réponse réussie

Trigger
action
TriggerAction* obligatoire
TriggerAction
primitive_id
string* obligatoire
type
"start_workflow" | "build_app" | "deploy_app" | "start_agent_session"* obligatoire
creator_id
string* obligatoire
customer_id
string* obligatoire
event_source
Webhook* obligatoire
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
filters
string | null* obligatoire
handler
"workflows" | "agents" | "spaces"* obligatoire
id
string* obligatoire
organization_id
string* obligatoire
owner_type
"workspace" | "user"* obligatoire
title
string* obligatoire
workspace_id
string* obligatoire

POST /v1/triggers

Créer un déclencheur

Créer un déclencheur

Exemple de requête

{
  "action": {
    "primitive_id": "ipsum eiusmod",
    "type": "start_workflow"
  },
  "event_source_id": "consequat do",
  "handler": "workflows",
  "owner_type": "workspace",
  "title": "reprehenderit ut dolore"
}

Corps de la requête

action
CreateTriggerAction* obligatoire
CreateTriggerAction
primitive_id
string* obligatoire

ID de la primitive cible (workflow, agent ou app)

type
"start_workflow" | "build_app" | "deploy_app" | "start_agent_session"* obligatoire
event_source_id
string* obligatoire

ID de la source d’événements qui déclenche ce déclencheur

filters
string | null

Expression jmespath pour filtrer les événements, par ex. event_type == 'push' && repository.name == 'dashboard'

handler
"workflows" | "agents" | "spaces"* obligatoire
owner_type
"workspace" | "user"* obligatoire
title
stringMin Length: 1Max Length: 256* obligatoire

Titre lisible du déclencheur

Server-Side Events

Réponse réussie

action
TriggerAction* obligatoire
TriggerAction
primitive_id
string* obligatoire
type
"start_workflow" | "build_app" | "deploy_app" | "start_agent_session"* obligatoire
creator_id
string* obligatoire
customer_id
string* obligatoire
event_source
Webhook* obligatoire
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
filters
string | null* obligatoire
handler
"workflows" | "agents" | "spaces"* obligatoire
id
string* obligatoire
organization_id
string* obligatoire
owner_type
"workspace" | "user"* obligatoire
title
string* obligatoire
workspace_id
string* obligatoire

GET /v1/triggers/{trigger_id}

Obtenir un déclencheur

Obtenir un déclencheur

Parameters

trigger_id
stringpath* obligatoire

Responses

Réponse réussie

action
TriggerAction* obligatoire
TriggerAction
primitive_id
string* obligatoire
type
"start_workflow" | "build_app" | "deploy_app" | "start_agent_session"* obligatoire
creator_id
string* obligatoire
customer_id
string* obligatoire
event_source
Webhook* obligatoire
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
filters
string | null* obligatoire
handler
"workflows" | "agents" | "spaces"* obligatoire
id
string* obligatoire
organization_id
string* obligatoire
owner_type
"workspace" | "user"* obligatoire
title
string* obligatoire
workspace_id
string* obligatoire

DELETE /v1/triggers/{trigger_id}

Supprimer un déclencheur

Supprimer un déclencheur

Parameters

trigger_id
stringpath* obligatoire

GET /v1/triggers/{trigger_id}/events

Lister les événements d’un déclencheur

Lister les événements d’un déclencheur

Parameters

trigger_id
stringpath* obligatoire
limit
integerquery

Nombre maximal d’événements à renvoyer

Responses

Réponse réussie

data
array<TriggerEvent>* obligatoire
TriggerEvent
detail
string | null* obligatoire
event_id
string* obligatoire
received_at
date-time* obligatoire
source_id
string* obligatoire
status
"SUBMITTED" | "SUBMISSION_FAILED" | "TRIGGERED" | "TRIGGER_FAILED"* obligatoire
submitted_at
date-time | null* obligatoire
trigger_id
string* obligatoire
triggered_at
date-time | null* obligatoire
url
string | null* obligatoire