Publish an Automation's draft
curl --request POST \
--url https://api.checkfu.com/v1/automations/{id}/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'checkfu-version: <checkfu-version>' \
--data '
{
"expected_draft_revision": 123
}
'import requests
url = "https://api.checkfu.com/v1/automations/{id}/publish"
payload = { "expected_draft_revision": 123 }
headers = {
"checkfu-version": "<checkfu-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'checkfu-version': '<checkfu-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({expected_draft_revision: 123})
};
fetch('https://api.checkfu.com/v1/automations/{id}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.checkfu.com/v1/automations/{id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_draft_revision' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"checkfu-version: <checkfu-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.checkfu.com/v1/automations/{id}/publish"
payload := strings.NewReader("{\n \"expected_draft_revision\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("checkfu-version", "<checkfu-version>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.checkfu.com/v1/automations/{id}/publish")
.header("checkfu-version", "<checkfu-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_draft_revision\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.checkfu.com/v1/automations/{id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["checkfu-version"] = '<checkfu-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_draft_revision\": 123\n}"
response = http.request(request)
puts response.read_body{
"type": "automation_publication",
"automation": {
"type": "automation",
"authoring_state": "draft",
"draft_revision": 123,
"published_definition_revision": 1,
"readiness": "preparing",
"id": "<string>",
"workspace_id": "<string>",
"version": 123,
"name": "<string>",
"description": "<string>",
"external_id": "<string>",
"created_by": "<string>",
"environment_id": "<string>",
"connected_runtime": "<string>",
"status": "active",
"archived_at": "<string>",
"last_session_id": "<string>",
"last_run_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"service_principal_id": "<string>",
"agent": {
"type": "agent",
"id": "<string>",
"version": 123
},
"initial_events": [
{
"type": "user.message",
"content": [
{
"type": "text",
"text": "<unknown>"
}
]
}
],
"resources": [
{
"type": "file_tree",
"file_tree_id": "<string>",
"mount_path": "<string>",
"version_policy": {
"kind": "latest"
},
"access": "read_only",
"writeback": null
}
],
"vault_ids": [
"<string>"
],
"budget": {
"type": "limit",
"max_list_cost": {
"amount": "<string>",
"currency": "USD"
}
},
"schedule": {
"type": "cron",
"expression": "<string>",
"timezone": "<string>",
"last_run_at": "<string>",
"upcoming_runs_at": [
"<string>"
]
},
"paused_reason": {
"type": "manual"
},
"metadata": {},
"budget_policy": {
"limit": 123,
"metric": "model_tokens"
},
"session_target": {
"mode": "start_new"
},
"steps": [
{
"id": "<string>",
"action": {
"action": "run_agent",
"agent": {
"type": "agent",
"id": "<string>",
"version": 123
},
"prompt": "<string>",
"budget": {
"limit": 123,
"metric": "model_tokens"
},
"session_target": {
"mode": "start_new"
},
"agent_deployment_revision_selection": "<unknown>",
"retry": {
"max_attempts": 3,
"wait_seconds": 1800
},
"input": "<unknown>",
"for_each": "<unknown>"
},
"name": "<string>",
"condition": {
"kind": "predicates",
"predicates": [
{
"kind": "exists",
"pointer": "<string>",
"value": "<unknown>"
}
],
"check": "<unknown>",
"input": {
"kind": "trigger_payload"
}
},
"group": "<string>"
}
],
"program": {
"nodes": [
{
"id": "<string>",
"action": {
"action": "run_agent",
"agent": {
"type": "agent",
"id": "<string>",
"version": 123
},
"prompt": "<string>",
"budget": {
"limit": 123,
"metric": "model_tokens"
},
"session_target": {
"mode": "start_new"
},
"agent_deployment_revision_selection": "<unknown>",
"retry": {
"max_attempts": 3,
"wait_seconds": 1800
},
"input": "<unknown>",
"for_each": "<unknown>"
},
"name": "<string>",
"condition": {
"kind": "predicates",
"predicates": [
{
"kind": "exists",
"pointer": "<string>",
"value": "<unknown>"
}
],
"check": "<unknown>",
"input": {
"kind": "trigger_payload"
}
},
"group": "<string>"
}
],
"edges": [
{
"kind": "then",
"from": "<string>",
"to": "<string>"
}
],
"run_limits": {
"deadline_seconds": 302430,
"max_concurrent_children": 4,
"budget": {
"limit": 123,
"metric": "model_spend"
}
}
},
"trigger": {
"type": "webhook",
"dedupe_key": {
"type": "json_pointer",
"pointer": "<string>"
},
"provider": "<string>",
"mcp_events": true,
"filter": {
"predicates": [
{
"kind": "exists",
"pointer": "<string>",
"value": "<unknown>"
}
],
"check": {
"model_routing_profile_key": "<string>",
"instructions": "<string>",
"failure": "fail_open",
"tier": "default"
}
},
"cron": "<unknown>",
"timezone": "<unknown>",
"source": "<unknown>"
},
"input_template": "<string>",
"flow_review": {
"model_routing_profile_key": "<string>",
"criteria": [
{
"key": "<string>",
"description": "<string>",
"severity": "low"
}
],
"tier": "default"
},
"delivery_screen": {
"model_routing_profile_key": "<string>",
"instructions": "<string>",
"tier": "default",
"failure": "fail_open"
},
"draft": {
"revision": 123,
"document": {
"name": "<string>",
"runs_as": "<string>",
"blocks": [
{
"id": "<string>",
"type": "trigger",
"trigger": {
"type": "schedule",
"cron": "<string>",
"timezone": "<string>"
},
"name": "<string>"
}
],
"wires": [
{
"from": "<string>",
"to": "<string>",
"port": "<string>",
"max_attempts": 123
}
],
"environment_id": "<string>",
"run_limits": {
"deadline_seconds": 123,
"max_concurrent_children": 123,
"budget": {
"limit": 123,
"metric": "model_spend"
}
}
},
"problems": [
{
"code": "<string>",
"message": "<string>",
"block": "<string>"
}
],
"updated_at": "<string>"
},
"live_version": 123
},
"version": 123,
"live": true,
"summary": [
"<string>"
],
"webhook_secret": "<string>"
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#validation-malformed",
"code": "validation.malformed"
},
"type": "error",
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "authentication_error",
"code": "auth.invalid_key",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#auth-invalid-key"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "permission_error",
"code": "auth.disabled_tenancy",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#auth-disabled-tenancy"
},
"request_id": "<string>"
}{
"error": {
"type": "not_found_error",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#validation-not-found",
"code": "validation.not_found"
},
"type": "error",
"request_id": "<string>"
}{
"error": {
"type": "conflict_error",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#validation-conflict",
"code": "validation.conflict"
},
"type": "error",
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "rate_limit_error",
"code": "budget.exceeded",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#budget-exceeded"
},
"request_id": "<string>"
}{
"error": {
"type": "api_error",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#runtime-internal",
"code": "runtime.internal"
},
"type": "error",
"request_id": "<string>"
}{
"error": {
"type": "api_error",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#memory-backend-unavailable",
"code": "memory.backend_unavailable"
},
"type": "error",
"request_id": "<string>"
}Publish an Automation's draft
Turn the draft of an Automation written as blocks into its next live version.
POST
/
v1
/
automations
/
{id}
/
publish
Publish an Automation's draft
curl --request POST \
--url https://api.checkfu.com/v1/automations/{id}/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'checkfu-version: <checkfu-version>' \
--data '
{
"expected_draft_revision": 123
}
'import requests
url = "https://api.checkfu.com/v1/automations/{id}/publish"
payload = { "expected_draft_revision": 123 }
headers = {
"checkfu-version": "<checkfu-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'checkfu-version': '<checkfu-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({expected_draft_revision: 123})
};
fetch('https://api.checkfu.com/v1/automations/{id}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.checkfu.com/v1/automations/{id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_draft_revision' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"checkfu-version: <checkfu-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.checkfu.com/v1/automations/{id}/publish"
payload := strings.NewReader("{\n \"expected_draft_revision\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("checkfu-version", "<checkfu-version>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.checkfu.com/v1/automations/{id}/publish")
.header("checkfu-version", "<checkfu-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_draft_revision\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.checkfu.com/v1/automations/{id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["checkfu-version"] = '<checkfu-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_draft_revision\": 123\n}"
response = http.request(request)
puts response.read_body{
"type": "automation_publication",
"automation": {
"type": "automation",
"authoring_state": "draft",
"draft_revision": 123,
"published_definition_revision": 1,
"readiness": "preparing",
"id": "<string>",
"workspace_id": "<string>",
"version": 123,
"name": "<string>",
"description": "<string>",
"external_id": "<string>",
"created_by": "<string>",
"environment_id": "<string>",
"connected_runtime": "<string>",
"status": "active",
"archived_at": "<string>",
"last_session_id": "<string>",
"last_run_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"service_principal_id": "<string>",
"agent": {
"type": "agent",
"id": "<string>",
"version": 123
},
"initial_events": [
{
"type": "user.message",
"content": [
{
"type": "text",
"text": "<unknown>"
}
]
}
],
"resources": [
{
"type": "file_tree",
"file_tree_id": "<string>",
"mount_path": "<string>",
"version_policy": {
"kind": "latest"
},
"access": "read_only",
"writeback": null
}
],
"vault_ids": [
"<string>"
],
"budget": {
"type": "limit",
"max_list_cost": {
"amount": "<string>",
"currency": "USD"
}
},
"schedule": {
"type": "cron",
"expression": "<string>",
"timezone": "<string>",
"last_run_at": "<string>",
"upcoming_runs_at": [
"<string>"
]
},
"paused_reason": {
"type": "manual"
},
"metadata": {},
"budget_policy": {
"limit": 123,
"metric": "model_tokens"
},
"session_target": {
"mode": "start_new"
},
"steps": [
{
"id": "<string>",
"action": {
"action": "run_agent",
"agent": {
"type": "agent",
"id": "<string>",
"version": 123
},
"prompt": "<string>",
"budget": {
"limit": 123,
"metric": "model_tokens"
},
"session_target": {
"mode": "start_new"
},
"agent_deployment_revision_selection": "<unknown>",
"retry": {
"max_attempts": 3,
"wait_seconds": 1800
},
"input": "<unknown>",
"for_each": "<unknown>"
},
"name": "<string>",
"condition": {
"kind": "predicates",
"predicates": [
{
"kind": "exists",
"pointer": "<string>",
"value": "<unknown>"
}
],
"check": "<unknown>",
"input": {
"kind": "trigger_payload"
}
},
"group": "<string>"
}
],
"program": {
"nodes": [
{
"id": "<string>",
"action": {
"action": "run_agent",
"agent": {
"type": "agent",
"id": "<string>",
"version": 123
},
"prompt": "<string>",
"budget": {
"limit": 123,
"metric": "model_tokens"
},
"session_target": {
"mode": "start_new"
},
"agent_deployment_revision_selection": "<unknown>",
"retry": {
"max_attempts": 3,
"wait_seconds": 1800
},
"input": "<unknown>",
"for_each": "<unknown>"
},
"name": "<string>",
"condition": {
"kind": "predicates",
"predicates": [
{
"kind": "exists",
"pointer": "<string>",
"value": "<unknown>"
}
],
"check": "<unknown>",
"input": {
"kind": "trigger_payload"
}
},
"group": "<string>"
}
],
"edges": [
{
"kind": "then",
"from": "<string>",
"to": "<string>"
}
],
"run_limits": {
"deadline_seconds": 302430,
"max_concurrent_children": 4,
"budget": {
"limit": 123,
"metric": "model_spend"
}
}
},
"trigger": {
"type": "webhook",
"dedupe_key": {
"type": "json_pointer",
"pointer": "<string>"
},
"provider": "<string>",
"mcp_events": true,
"filter": {
"predicates": [
{
"kind": "exists",
"pointer": "<string>",
"value": "<unknown>"
}
],
"check": {
"model_routing_profile_key": "<string>",
"instructions": "<string>",
"failure": "fail_open",
"tier": "default"
}
},
"cron": "<unknown>",
"timezone": "<unknown>",
"source": "<unknown>"
},
"input_template": "<string>",
"flow_review": {
"model_routing_profile_key": "<string>",
"criteria": [
{
"key": "<string>",
"description": "<string>",
"severity": "low"
}
],
"tier": "default"
},
"delivery_screen": {
"model_routing_profile_key": "<string>",
"instructions": "<string>",
"tier": "default",
"failure": "fail_open"
},
"draft": {
"revision": 123,
"document": {
"name": "<string>",
"runs_as": "<string>",
"blocks": [
{
"id": "<string>",
"type": "trigger",
"trigger": {
"type": "schedule",
"cron": "<string>",
"timezone": "<string>"
},
"name": "<string>"
}
],
"wires": [
{
"from": "<string>",
"to": "<string>",
"port": "<string>",
"max_attempts": 123
}
],
"environment_id": "<string>",
"run_limits": {
"deadline_seconds": 123,
"max_concurrent_children": 123,
"budget": {
"limit": 123,
"metric": "model_spend"
}
}
},
"problems": [
{
"code": "<string>",
"message": "<string>",
"block": "<string>"
}
],
"updated_at": "<string>"
},
"live_version": 123
},
"version": 123,
"live": true,
"summary": [
"<string>"
],
"webhook_secret": "<string>"
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#validation-malformed",
"code": "validation.malformed"
},
"type": "error",
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "authentication_error",
"code": "auth.invalid_key",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#auth-invalid-key"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "permission_error",
"code": "auth.disabled_tenancy",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#auth-disabled-tenancy"
},
"request_id": "<string>"
}{
"error": {
"type": "not_found_error",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#validation-not-found",
"code": "validation.not_found"
},
"type": "error",
"request_id": "<string>"
}{
"error": {
"type": "conflict_error",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#validation-conflict",
"code": "validation.conflict"
},
"type": "error",
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "rate_limit_error",
"code": "budget.exceeded",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#budget-exceeded"
},
"request_id": "<string>"
}{
"error": {
"type": "api_error",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#runtime-internal",
"code": "runtime.internal"
},
"type": "error",
"request_id": "<string>"
}{
"error": {
"type": "api_error",
"message": "<string>",
"more": "https://docs.checkfu.com/reference/errors#memory-backend-unavailable",
"code": "memory.backend_unavailable"
},
"type": "error",
"request_id": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Available options:
2026-08-31 Path Parameters
Pattern:
^auto_[0-9a-f]{32}$Body
application/json