API reference
The Polsia REST API lets you trigger workflows programmatically, retrieve execution logs, and manage integrations from your own code. Base URL: https://api.polsiahq.com/v1
Endpoints
Authentication
All API requests require a bearer token. Find your API key at Settings > API & Webhooks in the dashboard.
Authorization: Bearer {YOUR_API_KEY}
Content-Type: application/json
Keep your API key private. Treat it like a password. Do not commit it to version control or expose it in client-side code.
POST /workflows/:id/trigger
Triggers a workflow by ID and optionally passes context data to the workflow's first step.
Request
POST https://api.polsiahq.com/v1/workflows/{workflow_id}/trigger
{
"context": {
"invoice_id": "INV-2026-00812",
"vendor": "Acme Supplies",
"amount": 4750.00,
"due_date": "2026-08-01"
}
}
Response
HTTP 202 Accepted
{
"run_id": "run_9kLm3Np7Qv",
"workflow_id": "wf_4xYz8Jt2Kc",
"status": "queued",
"triggered_at": "2026-09-04T14:23:11Z"
}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workflow_id |
string | Yes | The unique ID of the workflow to trigger. Find it in the workflow settings panel. |
context |
object | No | Key-value pairs passed as context to the workflow's trigger step. Keys depend on workflow configuration. |
GET /workflows/:id/runs
Returns a paginated list of execution runs for a workflow, ordered newest first.
GET https://api.polsiahq.com/v1/workflows/{workflow_id}/runs?limit=20&page=1
{
"runs": [
{
"run_id": "run_9kLm3Np7Qv",
"status": "completed",
"triggered_at": "2026-09-04T14:23:11Z",
"completed_at": "2026-09-04T14:24:08Z",
"steps_completed": 3,
"steps_total": 3
}
],
"total": 42,
"page": 1,
"limit": 20
}
GET /runs/:run_id
Returns the full execution log for a single run, including each step's inputs, outputs, and timing.
GET https://api.polsiahq.com/v1/runs/{run_id}
{
"run_id": "run_9kLm3Np7Qv",
"workflow_id": "wf_4xYz8Jt2Kc",
"status": "completed",
"steps": [
{
"step_id": "step_extract",
"name": "Extract invoice data",
"status": "completed",
"started_at": "2026-09-04T14:23:12Z",
"completed_at": "2026-09-04T14:23:14Z",
"outputs": {
"invoice_id": "INV-2026-00812",
"amount": 4750.00
}
}
]
}
GET /workflows
Returns all workflows in your workspace, including their IDs, names, and active status.
GET https://api.polsiahq.com/v1/workflows
{
"workflows": [
{
"workflow_id": "wf_4xYz8Jt2Kc",
"name": "Vendor invoice approval",
"status": "active",
"created_at": "2026-08-12T09:10:00Z"
}
]
}
Error codes
| HTTP status | Code | Meaning |
|---|---|---|
| 400 | invalid_request |
The request body is malformed or missing a required field. |
| 401 | unauthorized |
Missing or invalid API key. |
| 404 | not_found |
The requested workflow or run ID does not exist in your workspace. |
| 409 | workflow_inactive |
The workflow exists but is not active. Activate it in the dashboard before triggering via API. |
| 429 | rate_limited |
Too many requests. Default rate limit is 60 requests per minute per workspace. |