Automatyzacje (workflow)
Endpointy „Automatyzacje (workflow)” Zanfia Workspace API — ze schematami i przykładami kodu.
Odczytuj automatyzacje workflow, przeglądaj historię uruchomień, wstrzymuj i wznawiaj je, ponawiaj nieudane uruchomienia i uruchamiaj je testowo. Workflow buduje się w kreatorze w panelu — API celowo nie udostępnia edycji grafu, dopóki katalog kroków się rozwija. Aktywacja nieopublikowanego szkicu zwraca 400. Ponowienie i uruchomienie testowe zwracają 202 (wykonanie jest asynchroniczne), a uruchomienie testowe wykonuje prawdziwy graf — akcje naprawdę się wykonują. Wszystkie endpointy wymagają nagłówka Authorization: Bearer — zobacz Uwierzytelnianie.
Lista automatyzacji workflow
/automationsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/automations"{ "items": [ { "id": "string", "name": "string", "description": "string", "status": "active", "triggers": [ "product.ProductPurchased" ], "productIds": [ "string" ], "published": true, "publishedAt": "string", "runsThisMonth": 0, "lastRunAt": "string", "lastRunStatus": "running", "createdAt": "string", "updatedAt": "string" } ]}{ "error": "string", "message": "string"}Szczegóły automatyzacji
/automations/{automationId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Workflow automation id
Response Body
application/json
application/json
curl -X GET "https://example.com/automations/string"{ "id": "string", "name": "string", "description": "string", "status": "active", "triggers": [ "product.ProductPurchased" ], "productIds": [ "string" ], "published": true, "publishedAt": "string", "runsThisMonth": 0, "lastRunAt": "string", "lastRunStatus": "running", "createdAt": "string", "updatedAt": "string", "nodeCounts": { "triggers": 0, "actions": 0, "conditions": 0, "delays": 0 }}{ "error": "string", "message": "string"}Historia uruchomień
/automations/{automationId}/runsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Workflow automation id
Response Body
application/json
application/json
curl -X GET "https://example.com/automations/string/runs"{ "items": [ { "id": "string", "status": "running", "trigger": "product.ProductPurchased", "startedAt": "string", "completedAt": "string", "steps": { "total": 0, "succeeded": 0, "failed": 0, "skipped": 0 }, "error": "string" } ]}{ "error": "string", "message": "string"}Wstrzymaj lub wznów automatyzację
/automations/{automationId}/statusAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Workflow automation id
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/automations/string/status" \ -H "Content-Type: application/json" \ -d '{ "status": "active" }'{ "id": "string", "status": "active"}{ "error": "string", "message": "string"}Ponów nieudane uruchomienie
/automations/{automationId}/runs/{runId}/retryAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Workflow automation id
Response Body
application/json
application/json
curl -X POST "https://example.com/automations/string/runs/string/retry"{ "runId": "string"}{ "error": "string", "message": "string"}Uruchom testowo
/automations/{automationId}/test-runAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Workflow automation id
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Fire the published graph once with a synthetic trigger context. ⚠️ The test run executes the REAL graph — actions genuinely fire (emails, webhooks, integration commands), so pass a client email you control. The run is flagged as a test (excluded from stats, kept 7 days).
Response Body
application/json
application/json
curl -X POST "https://example.com/automations/string/test-run" \ -H "Content-Type: application/json" \ -d '{ "context": {} }'{ "runId": "string"}{ "error": "string", "message": "string"}Czy ten artykuł był pomocny?

