https://api.genuka.com · Auth Authorization: Bearer <token> + X-Company: <companyId> · Getting Started
Endpoints at a glance
Workflows
GET /2023-11/admin/workflows
List all workflows for the authenticated company. Supports filtering and search.
Query parameters
200 OK):
401— missing or invalid bearer token.403— authenticated user has no access to this company.
POST /2023-11/admin/workflows
Create a new workflow with an optional draft graph.
Request body
201 Created):
401— unauthenticated.422— validation failed (e.g.namemissing).
GET /2023-11/admin/workflows/{workflow}
Retrieve a single workflow including its active version summary.
Path parameters
200 OK):
401— unauthenticated.404— workflow not found or belongs to a different company.
PUT /2023-11/admin/workflows/{workflow}
Update a workflow’s name, description, or draft graph. All fields are optional (partial update).
Path parameters
Request body
200 OK):
401— unauthenticated.404— workflow not found.422— validation failed.
DELETE /2023-11/admin/workflows/{workflow}
Soft-delete a workflow and all its associated data.
Path parameters
204 No Content)
Error responses
401— unauthenticated.404— workflow not found.
PATCH /2023-11/admin/workflows/{workflow}/toggle
Toggle the is_active flag of a workflow. Inactive workflows will not fire on events.
Path parameters
Request body: None — no body required for this action endpoint.
200 OK):
401— unauthenticated.404— workflow not found.
Workflow Versions
GET /2023-11/admin/workflows/{workflow}/versions
List all published versions of a workflow in descending revision order.
Path parameters
Query parameters
200 OK):
401— unauthenticated.404— workflow not found.
POST /2023-11/admin/workflows/{workflow}/publish
Snapshot the current draft as a new immutable version. By default the new version is immediately activated (becomes the version used for future runs).
Path parameters
Request body
200 OK) — returns the parent workflow resource with the newly activated version:
401— unauthenticated.404— workflow not found.422—graphmissing.
GET /2023-11/admin/workflows/{workflow}/versions/{version}
Retrieve a single version including the full immutable graph.
Path parameters
200 OK):
401— unauthenticated.404— workflow or version not found, or version does not belong to the workflow.
Workflow Runs
GET /2023-11/admin/workflows/runs
List all workflow runs for the authenticated company.
Query parameters
200 OK):
401— unauthenticated.
POST /2023-11/admin/workflows/runs
Manually trigger a workflow run. The workflow must be active and have an active version.
Request body
201 Created):
401— unauthenticated.404— workflow not found.422— workflow is inactive ("This workflow is not active."), or no active version exists ("No active workflow version to run."), or validation failed.
GET /2023-11/admin/workflows/runs/{run}
Retrieve full details of a single workflow run, including per-node execution records.
Path parameters
200 OK):
401— unauthenticated.404— run not found or belongs to a different company.
POST /2023-11/admin/workflows/runs/{run}/cancel
Cancel a run that is in queued or running status. Also marks any queued/running nodes as canceled.
Path parameters
Request body: None — no body required for this action endpoint.
204 No Content)
Error responses
401— unauthenticated.404— run not found or belongs to a different company.422— run is already finished ({ "message": "Cannot cancel" }).
POST /2023-11/admin/workflows/runs/{run}/replay
Create a new run that re-uses the context of a finished run. The workflow must still be active. The new run uses the workflow’s current active version.
Path parameters
Request body: None — no body required for this action endpoint.
201 Created):
401— unauthenticated.404— run not found or belongs to a different company.422— run is not yet finished (status must besuccess,failed, orcanceled); or the parent workflow is inactive; or no active version exists.
Node Types
GET /2023-11/admin/workflows/node-types
Return all registered node type definitions. Used by the workflow editor to populate the node palette. This endpoint does not require X-Company in practice but the standard auth headers are still expected.
200 OK):
401— unauthenticated.
Utilities
GET /2023-11/admin/workflows/stats
Return aggregate statistics for workflows and runs belonging to the authenticated company.
200 OK):
401— unauthenticated.
GET /2023-11/admin/workflows/samples
Fetch a sample record for a supported automation model. Used in the workflow editor to preview live data for context binding. If an id is supplied and not found, falls back to the most recent record of that model type.
Query parameters
200 OK):
model is not in the allowed list, returns an empty array [].
Error responses
401— unauthenticated.
POST /2023-11/admin/workflows/http/test
Proxy an outbound HTTP request from the server, returning the response details. Used in the workflow editor to test HTTP action nodes before publishing.
Request body
200 OK):
400 is returned:
401— unauthenticated.400— network error or connection failure (seemessagefield).422— validation failed (e.g. invalidmethodvalue).
POST /2023-11/admin/workflows/nodes/simulate
Execute a single workflow node handler in isolation and return its output. Useful for testing node configuration before running the full workflow.
Request body
200 OK):
401— unauthenticated.422— unknown handler:{ "error": "Unknown handler: BadHandler.name" }, or no company found for user.400— handler executed but raised an exception:{ "success": false, "handler": "...", "error": "..." }.
POST /2023-11/admin/workflows/whatsapp/simulate
Fire simulated WhatsApp webhook events to test WhatsApp-triggered workflows without a real device. Dispatches whatsapp.message_received and a type-specific event (e.g. whatsapp.text_received) into the workflow trigger service.
Request body
200 OK):
401— unauthenticated.422— invalidtypevalue or no company found for user.
