Skip to main content
Figranium exposes a local REST API for task management, execution, and data retrieval. Base URL: http://localhost:11345 (default)
If enabled, authentication must be provided via one of the following methods:
  • Header: x-api-key: your_key or key: your_key
  • Authorization Header: Authorization: Bearer your_key
  • Request Body: {"apiKey": "your_key"} or {"key": "your_key"}

Health

GET /api/health

Returns the server status and storage backend connectivity. Use this endpoint for uptime monitoring, load-balancer health checks, or verifying that Figranium is ready to accept work. Response (healthy):
Response (degraded — database unreachable):
Returns HTTP 200 when healthy and 503 when degraded. This endpoint does not require authentication.

GET /api/capabilities

Describes the features and action schemas supported by the running server. Use it to check what an instance supports before building tasks. This endpoint does not require authentication.

Capacity and timeout errors

Execution endpoints can return these errors when resource protection is active:

Trigger a task

POST /api/tasks/:id/api

Triggers an execution of a specific task. This is the primary endpoint most integrations use: send a POST to a task’s URL to run it on demand, optionally overriding variables or receiving a webhook callback when it finishes.
You don’t need to assemble this URL by hand. The Trigger via API panel in the task editor’s Task Settings API tab shows the complete endpoint URL for your instance (for example, https://your-figranium.example.com/api/tasks/task_1/api) with a POST badge, and its copy button copies the full URL.
Body:
Response: Returns the execution result (JSON).
The request body is optional. If you send the request without a body or without a Content-Type: application/json header, Figranium treats the body as {} and runs the task with its default variables. This lets tools that can’t set request headers (for example, Clay’s HTTP action) trigger a task with a bare POST to the endpoint URL.To pass variables, webhookUrl, statelessExecution, or sessionId, you must send Content-Type: application/json and a JSON body.

Completion webhook

When you include a webhookUrl, Figranium sends a POST request to that URL after the task finishes. The webhook URL is validated against the same SSRF rules as all other outbound requests (see Security). If the URL points to a private network and ALLOW_PRIVATE_NETWORKS is false, the request returns 400 INVALID_WEBHOOK_URL. The callback payload looks like this:
The webhook request times out after 10 seconds. Delivery failures are logged on the server but do not affect the execution result returned to the original caller.

Authentication

If enabled, authentication must be provided via one of the following methods:
  • Header: x-api-key: your_key or key: your_key
  • Authorization Header: Authorization: Bearer your_key
  • Request Body: {"apiKey": "your_key"} or {"key": "your_key"}

Tasks

Returns a lightweight list of all saved tasks with summary metadata (ID, name, description, mode, schedule, variables, createdAt, updatedAt) without version history or full action lists. Useful for lightweight listings and dashboard overviews. Requires API-key authentication.Response:
Lists all saved tasks with full configuration (except version history). Prefer GET /api/tasks/list for lightweight listings.Response:
Creates or updates a task. If a task with the same id already exists, it is overwritten. Include ?version=true in the query string to save a version snapshot before overwriting.Body:
The description field is optional. When set, it appears on the canvas trigger card and in the tasks[] entries returned by GET /api/tasks/list so external tools and AI agents have context about the task without fetching its full definition.
Applies a partial update to an existing task. Only the fields you include in the body are changed. The id and versions fields are ignored if supplied. Figranium takes a version snapshot of the task before applying the update, so you can restore the previous state from the version history.Use this endpoint when you want to change a single attribute (for example, a schedule, a variable, or one action) without re-sending the full task definition.Body: Any subset of the task’s top-level fields.
Response:
Error responses:
Deletes a task by ID. Any in-process schedule registered for the task is also removed, so a scheduled run will not fire after deletion.Response:
Error responses:
Triggers an execution of a specific task. See Trigger a task above for the full reference.

Executions

Returns a lightweight list of execution records with summary metadata (ID, task ID, status, phase, outcome, timestamps, duration) without full logs or result payloads. Use this for dashboard views and history listings when you don’t need the per-execution detail returned by GET /api/executions/:id. Requires API-key authentication.Response:
Lists execution history.Query Parameters:
  • limit: Number of results (default 50).
  • status: Filter by status code.
Gets detailed logs and result for a specific execution. Accepts an API key or a signed-in session.If the stored record exceeded MAX_PERSISTED_EXECUTION_BYTES (default 256 KB), the result in the history record is trimmed and marked with "truncated": true and "hasFullResult": true. Use GET /api/executions/:id/result to load the complete result.
Returns the complete stored result for an execution whose history record was trimmed. Accepts an API key or a signed-in session. Full results are deleted together with execution history when the retention period expires.Response:
Error responses:
Stops a running execution, or cancels a run that is still waiting in the execution queue. Requires a signed-in session.Body:
Response:
When you cancel a queued run, it never starts, and the original run request responds with 200:
If the client that started a queued run disconnects before the run starts, Figranium cancels the queued run.Returns 400 MISSING_RUN_ID if runId is missing.
Deletes a single execution record by ID.Response:

Data

Lists all captured files (screenshots, recordings). Accepts an API key or a signed-in session.
Deletes a specific capture file.

Templates

Use these endpoints to list and fetch community templates from the official Templates Hub. Both endpoints require a signed-in workspace session (the session cookie set when you sign in). API keys are not accepted. Requests are rate limited. Figranium caches the Hub catalog for 5 minutes and waits up to 12 seconds for the Hub to respond.
Lists, searches, and sorts community templates.
  • Without query parameters: returns the full catalog as an array of templates, including configuration, readme, and expected_output.
  • With any query parameter: returns a page of template summaries as { "items": [...], "total": n }. Summaries omit configuration, readme, and expected_output, and add action_count.
Query parameters:Request:
Response:
Error responses:
Returns a single template, including its workflow configuration, readme, and expected_output. The id must be a UUID.Request:
Response:
Error responses:
Paginated list responses and single-template responses include Cache-Control: private, max-age=60.

System settings

Returns the retention setting along with resource protection, CAPTCHA capacity, and last cleanup status.Response:
Saves the shared retention period for captures and execution history. If the new period is shorter than the old one, cleanup runs immediately and the response includes the result.Body:
Returns 400 INVALID_SYSTEM_SETTINGS for values outside the range.
Downloads a ZIP archive with the selected workspace data. See Exporting data for the archive contents.Body:
The response is application/zip with Content-Disposition: attachment; filename="figranium-export-YYYY-MM-DD.zip" and Cache-Control: no-store.Error responses:

Proxies

Lists configured proxies, rotation settings, and the default proxy.Response:
Adds a new proxy.Body:
The server address is validated against the SSRF blocklist. If it points to a private or internal network address, the request returns 400 with INVALID_URL.
Bulk imports proxies. Existing proxies with matching server addresses are updated; new addresses are added.Body:
Each entry supports the same fields as POST /api/settings/proxies. Every entry is validated individually against the SSRF blocklist — if any entry fails, the entire import is rejected.
Updates an existing proxy by ID.Body: Same fields as POST /api/settings/proxies. The server field is required and re-validated against the SSRF blocklist.
Deletes a single proxy by ID.

Browser

Programmatic control of the managed headful browser session. Use these endpoints when an external tool or agent needs to open a browser, drive it, and inspect the page without going through the Figranium UI.
Launches a headful browser session, or reattaches to the one already running. Returns a sessionId you can pass to other endpoints and a WebSocket endpoint suitable for connecting a Playwright or Chrome DevTools client.Accepts either a signed-in dashboard session or an API key. Session-authenticated callers (the Figranium UI) can launch the browser without adding a header. External callers such as MCP servers or scripts authenticate with x-api-key, Authorization: Bearer, or an apiKey body field, as described under Authentication.Body:
Response (200):
Automatic headless fallback: if the initial headful launch fails because no display is available, Figranium retries once in headless mode automatically and returns the running session. You only need to pass headless: true explicitly if you want to skip the failed first attempt.Error responses:Example:
Example (explicit headless):

Inspector

Activates the inspect overlay on the active browser session and, given a targetHint, returns up to five candidate elements with CSS selectors, XPath, and a confidence score. Optionally returns a base64-encoded JPEG snapshot of the current viewport with the top match visually outlined.Accepts either a signed-in dashboard session or an API key. This lets the Figranium UI drive the inspector directly while external clients (for example, an MCP server resolving a plain-language target into a selector) authenticate with an API key. See Authentication for accepted formats.Use this endpoint from an external agent or CLI to resolve a plain-language target (for example, "Sign in" or input[name="q"]) into a selector you can feed back into a task action. Match strategy, in order:
  1. Treat targetHint as a CSS selector and run querySelectorAll.
  2. Match common attributes (name, placeholder, aria-label, title, alt, value, data-testid, data-test-id).
  3. Match visible text on button, a, label, span, div, h1–h4, li, and p.
If no browser session is running and you supply url, Figranium launches one first.Body:
Response (200):
Error responses:Example:

Schedules

Lists all tasks with an associated schedule.Response:
Creates or updates a schedule for a task.Body:
For advanced scheduling, use a cron expression:
Response:
Removes the schedule from a task. The task itself is kept.Response:
Returns the schedule configuration and current status for a specific task, including the computed cron expression, human-readable description, and validation status.Response: