Troupia API
Connectez n’importe quel système à vos automatisations, exécutions et conversations, avec une seule clé.
D’abord : une clé API
Un propriétaire ou un admin la crée dans Paramètres → Clés API et choisit ce qu’elle peut faire. Chaque requête l’envoie ainsi :
Authorization: Bearer trp_live_…
Automatisations
/v1/automationsAll automations
Your workspace's automations, a page at a time.
automations:read/v1/automations/{automationId}One automation
Its steps, every way it starts and its version. Never a secret.
automations:readETag: "7.1a2b3c4d"
Gardez l’ETag. Une modification le renvoie.
/v1/automations/{automationId}Rename
automations:writeIf-Match: "7.1a2b3c4d"
Si quelqu’un a modifié l’automatisation depuis votre lecture : 412, et rien n’est écrasé. Relisez et décidez.
/v1/automations/{automationId}/enableTurn on
The plan's schedule floor applies, as in the app.
automations:writeIf-Match: "7.1a2b3c4d"
Demander l’état déjà en place renvoie 200 et ne change rien. Les exécutions planifiées sont conservées.
/v1/automations/{automationId}/disableTurn off
automations:writeIf-Match: "7.1a2b3c4d"
Demander l’état déjà en place renvoie 200 et ne change rien. Les exécutions planifiées sont conservées.
/v1/automations/resolve-linkFrom a link
A Troupia link → the automation or run it names.
automations:readExécutions
/v1/automations/{automationId}/runsAn automation's runs
A page at a time.
runs:read/v1/automations/{automationId}/analysisRuns analysed
How many succeeded, how many failed and why, over a window.
runs:read/v1/automations/runs/{runId}One run
With what went in and out of each step.
runs:read_payloads/v1/runs/{runId}A chat run
data:readConversations
/v1/conversationsConversations
data:read/v1/conversationsStart a conversation
chat:write/v1/conversations/{conversationId}/messagesSend a message
chat:write/v1/conversations/{conversationId}/exportExport a conversation
data:readWebhooks
/v1/automations/{automationId}/webhookWebhook addresses and their secrets
webhooks:manageSeulement la clé d’un propriétaire ou d’un admin : vérifiée à chaque appel, chaque appel est journalisé.
/v1/webhook-endpoints/{endpointId}/deliveriesFailed deliveries
To one outgoing endpoint: newest first, a page at a time.
webhooks:managePlugins
/v1/plugins/{slug}/openapi.jsonA plugin's API
Each plugin publishes its own OpenAPI document.
data:read/v1/plugins/{slug}/{entity}A plugin's records
data:read/v1/plugins/{slug}/{entity}Create a record
data:write/v1/plugins/{slug}/{entity}/{id}One record
data:read/v1/plugins/{slug}/{entity}/{id}Update a record
data:write/v1/plugins/crm/{path}Read from the CRM
crm:read/v1/plugins/crm/{path}Write to the CRM
crm:writeÀ propos de l’API
/v1/openapi.jsonThis document
As OpenAPI 3.1, no key needed.
Sans cléQuand quelque chose ne passe pas
| 401 | Pas de clé, ou elle n’est pas valide. |
| 403 | La clé n’a pas cette autorisation. |
| 404 | Introuvable dans cet espace de travail. |
| 412 | L’automatisation a changé depuis votre lecture. |
| 428 | If-Match manquant. |
| 429 | Trop de requêtes. Attendez et réessayez. |