Troupia API
Propojte jakýkoli systém se svými automatizacemi, běhy a konverzacemi, jedním klíčem.
Nejdřív: API klíč
Vlastník nebo admin ho vytvoří v Nastavení → API klíče a zvolí, co smí. Každý požadavek ho posílá takto:
Authorization: Bearer trp_live_…
Automatizace
/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"
Uschovejte si ETag. Změna ho posílá zpět.
/v1/automations/{automationId}Rename
automations:writeIf-Match: "7.1a2b3c4d"
Pokud někdo automatizaci od vašeho čtení změnil: 412 a nic se nepřepíše. Načtěte znovu a rozhodněte.
/v1/automations/{automationId}/enableTurn on
The plan's schedule floor applies, as in the app.
automations:writeIf-Match: "7.1a2b3c4d"
Žádost o stav, který už platí, vrátí 200 a nic nemění. Naplánované běhy zůstanou.
/v1/automations/{automationId}/disableTurn off
automations:writeIf-Match: "7.1a2b3c4d"
Žádost o stav, který už platí, vrátí 200 a nic nemění. Naplánované běhy zůstanou.
/v1/automations/resolve-linkFrom a link
A Troupia link → the automation or run it names.
automations:readBěhy
/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:readKonverzace
/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:readWebhooky
/v1/automations/{automationId}/webhookWebhook addresses and their secrets
webhooks:manageJen klíč vlastníka nebo admina: kontroluje se při každém volání a každé volání se zapisuje.
/v1/webhook-endpoints/{endpointId}/deliveriesFailed deliveries
To one outgoing endpoint: newest first, a page at a time.
webhooks:managePluginy
/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:writeO API
/v1/openapi.jsonThis document
As OpenAPI 3.1, no key needed.
Bez klíčeKdyž něco neprojde
| 401 | Chybí klíč, nebo není platný. |
| 403 | Klíč nemá toto oprávnění. |
| 404 | V tomto pracovním prostoru nenalezeno. |
| 412 | Automatizace se od vašeho čtení změnila. |
| 428 | Chybí If-Match. |
| 429 | Příliš mnoho požadavků. Počkejte a zkuste to znovu. |