Troupia API
Verbinden Sie jedes System mit Ihren Automationen, Läufen und Unterhaltungen, mit einem Schlüssel.
Zuerst: ein API-Schlüssel
Ein Owner oder Admin erstellt ihn unter Einstellungen → API-Schlüssel und legt fest, was er darf. Jede Anfrage sendet ihn so:
Authorization: Bearer trp_live_…
Automationen
/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"
Behalten Sie das ETag. Eine Änderung sendet es zurück.
/v1/automations/{automationId}Rename
automations:writeIf-Match: "7.1a2b3c4d"
Hat jemand die Automation seit Ihrem Lesen geändert: 412, und nichts wird überschrieben. Neu lesen und entscheiden.
/v1/automations/{automationId}/enableTurn on
The plan's schedule floor applies, as in the app.
automations:writeIf-Match: "7.1a2b3c4d"
Den bereits bestehenden Zustand anzufordern gibt 200 zurück und ändert nichts. Geplante Läufe bleiben.
/v1/automations/{automationId}/disableTurn off
automations:writeIf-Match: "7.1a2b3c4d"
Den bereits bestehenden Zustand anzufordern gibt 200 zurück und ändert nichts. Geplante Läufe bleiben.
/v1/automations/resolve-linkFrom a link
A Troupia link → the automation or run it names.
automations:readLäufe
/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:readUnterhaltungen
/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:manageNur der Schlüssel eines Owners oder Admins: bei jedem Aufruf geprüft, jeder Aufruf protokolliert.
/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Über die API
/v1/openapi.jsonThis document
As OpenAPI 3.1, no key needed.
Kein SchlüsselWenn etwas nicht durchgeht
| 401 | Kein Schlüssel, oder er ist ungültig. |
| 403 | Dem Schlüssel fehlt diese Berechtigung. |
| 404 | In diesem Workspace nicht gefunden. |
| 412 | Die Automation hat sich seit dem Lesen geändert. |
| 428 | If-Match fehlt. |
| 429 | Zu viele Anfragen. Warten und erneut versuchen. |