Krom Automation REST API Reference
Krom Automation exposes a full REST API under the namespace krom-automation/v1. You can use it to manage workflows, read execution logs, retrieve analytics data, trigger workflows manually, and interact with the template library; all programmatically, from any HTTP client.
Authentication #
All API endpoints require authentication via WordPress’s standard authentication mechanism. Requests must be made by a user with the manage_options capability (WordPress administrators by default).
Krom Automation uses standard WordPress nonces for browser-based requests. For external API clients (scripts, external tools, or server-to-server requests), use the WordPress Application Passwords feature (available since WordPress 5.6) or a cookie-based authentication approach.
The one exception is the Approval endpoint, which is intentionally public and requires no authentication.
Base URL: https://yoursite.com/wp-json/krom-automation/v1/
Workflow endpoints #
These endpoints let you create, read, update, delete, and manage workflows programmatically.
| Method | Endpoint | Description |
|---|---|---|
GET | /workflows | Returns a list of all workflows on the site |
POST | /workflows | Creates a new workflow |
GET | /workflows/{id} | Returns a single workflow by ID |
PUT | /workflows/{id} | Updates a workflow by ID |
DELETE | /workflows/{id} | Deletes a workflow permanently |
POST | /workflows/{id}/status | Toggles the workflow between Active and Paused |
POST | /workflows/{id}/duplicate | Creates a copy of the workflow in Paused status |
GET | /workflows/{id}/export | Returns the workflow configuration as a JSON export |
POST | /workflows/import | Creates a workflow from a previously exported JSON file |
POST | /workflows/bulk | Performs bulk operations on multiple workflows |
GET | /workflows/{id}/config | Returns the full canvas configuration for a workflow |
PUT | /workflows/{id}/config | Saves a new canvas configuration to a workflow |
GET | /workflows/{id}/node-stats | Returns per-node execution statistics for a workflow |
POST | /workflows/{id}/run | Manually triggers a workflow execution |
GET | /workflows/{id}/logs | Returns execution logs for a specific workflow |
GET /POST | /workflows/{id}/notes | Gets or saves the internal notes for a workflow |
Manually triggering a workflow
The POST /workflows/{id}/run endpoint triggers a workflow execution immediately, bypassing the normal trigger event. This is useful for testing, for running a workflow on demand from an external system, or for building a custom trigger using your own code that calls the API.
The request body can include context data that the workflow will treat as trigger data. Any merge tags in the workflow that match keys in the context object will resolve to those values.
Trigger and action discovery endpoints #
These endpoints expose Krom Automation’s registered triggers and actions. They’re useful when building integrations or custom admin interfaces on top of Krom Automation.
| Method | Endpoint | Description |
|---|---|---|
GET | /triggers | Returns a list of all registered triggers with their IDs and labels |
GET | /triggers/{trigger_id}/fields | Returns the data fields exposed by a specific trigger |
GET | /actions | Returns a list of all registered actions with their IDs and configuration schemas |
The /triggers/{trigger_id}/fields endpoint is particularly useful for programmatically understanding what merge tags are available for a given trigger, which can be used to build dynamic form fields or validation logic in a custom integration.
Analytics and stats endpoints #
| Method | Endpoint | Description |
|---|---|---|
GET | /dashboard/stats | Returns the summary statistics shown on the Krom Automation dashboard |
GET | /analytics | Returns the full analytics dataset |
The /dashboard/stats response includes total workflows, active workflows, total executions, executions this week, success rate, and failed execution count.
The /analytics endpoint returns time-series execution data and per-workflow breakdowns, matching what the Analytics page displays in the admin.
Logs and executions endpoints #
These endpoints give you programmatic access to execution history.
| Method | Endpoint | Description |
|---|---|---|
GET | /logs | Returns a paginated list of execution log entries |
GET | /logs/{id} | Returns a single log entry |
DELETE | /logs/{id} | Deletes a single log entry |
POST | /logs/bulk | Deletes multiple log entries in a single request |
POST | /logs/clear | Clears all execution logs from the database |
GET | /executions | Returns a paginated list of executions |
GET | /executions/{id} | Returns full detail for a single execution, including per-step data |
GET | /executions/stats | Returns aggregated execution statistics |
GET | /entity/{entity_type}/{entity_id}/timeline | Returns the automation timeline for a specific entity |
The entity timeline endpoint
The /entity/{entity_type}/{entity_id}/timeline endpoint is one of the most useful for support and debugging purposes. It returns a chronological list of every automation event that occurred for a specific user, post, or order.
Example requests:
/entity/user/42/timelinereturns all workflows that ran for user ID 42/entity/post/187/timelinereturns all workflows that ran for post ID 187/entity/order/1054/timelinereturns all workflows that ran for WooCommerce order ID 1054
Each item in the timeline response includes the workflow name, the execution timestamp, and the outcome.
Template endpoints #
| Method | Endpoint | Description |
|---|---|---|
GET | /templates | Returns a list of all available workflow templates |
GET | /templates/{id} | Returns the configuration for a single template |
POST | /templates/{id}/create-workflow | Creates a new workflow based on a template |
The POST /templates/{id}/create-workflow endpoint creates the workflow in Paused status, matching the behaviour of installing a template through the admin UI.
Simulation endpoint #
| Method | Endpoint | Description |
|---|---|---|
POST | /simulate | Runs a dry-run simulation of a workflow |
The simulate endpoint runs the workflow’s full logic without any side effects and returns the per-step results. The response includes the same step-by-step data you see in the canvas simulator: resolved merge tag values, condition outcomes, and action results.
This is useful for integrating automated workflow testing into a CI/CD pipeline or for building a custom simulation interface.
Approval endpoint #
| Method | Endpoint | Authentication |
|---|---|---|
GET /POST | /approval/{token} | None required (public endpoint) |
The approval endpoint is used internally by Krom Automation’s human approval step feature. When a workflow includes a step that waits for a human to approve or reject an action, Krom Automation sends an email with a link containing a unique token. Clicking the link calls this endpoint to register the approval decision and resume the workflow.
This endpoint is intentionally public because the person approving may not be a logged-in WordPress user. The token is a cryptographically secure random string that cannot be guessed.
Database tables #
For developers who need to query Krom Automation’s data directly or build custom integrations at the database level, here are the tables Krom Automation creates on activation.
| Table | Purpose |
|---|---|
{prefix}krom-automation_logs | Execution log entries (one row per workflow run) |
{prefix}krom-automation_runs | Run-once enforcement tracking (records which entities have already triggered each workflow) |
{prefix}krom-automation_executions | Modern execution tracking with unique execution IDs |
{prefix}krom-automation_execution_steps | Per-step status and output data for each execution |
{prefix}krom-automation_stats_daily | Pre-aggregated daily analytics (used for the analytics charts) |
{prefix}krom-automation_entity_log | Entity-level automation event timeline |
{prefix}krom-automation_variables | Persistent per-workflow variable storage |
{prefix}krom-automation_approvals | Human approval step tokens and their state |
All database writes use WordPress’s $wpdb with prepared statements. Never bypass the REST API to write directly to these tables from external code- the API handles data validation and cache invalidation that raw database writes would miss.
Common use cases for the API #
Triggering a workflow from an external system
Use POST /workflows/{id}/run with a context payload to fire a workflow from any script, external service, or third-party platform that can make HTTP requests. Combine this with Krom Automation Pro’s Incoming Webhook Receiver for a cleaner implementation that gives each workflow its own dedicated URL.
Building a custom dashboard
Use the /dashboard/stats and /analytics endpoints to pull Krom Automation data into a custom reporting interface or combine it with data from other plugins.
Automated workflow deployment
Use the import endpoint (POST /workflows/import) combined with the export endpoint (GET /workflows/{id}/export) to automate deploying workflow configurations across multiple sites. Export from staging, import to production.
Programmatic log management
Use the logs and executions endpoints to build custom log archiving, alerting on failure rates, or integrating Krom Automation execution data into an external logging or monitoring system.