Skip to main content
POST
Create a paused canonical automation

Authorizations

Authorization
string
header
required

A Recursion API key, created in the console under API keys.

Headers

Idempotency-Key
string
required

Replay-protection key in an organization-wide namespace shared by keyed mutations. It must contain 1 to 256 visible ASCII characters and be sent as exactly one header value. Request identity is the exact HTTP method, escaped path, raw query, and raw body bytes. For the legacy automation-run route only, the historical fingerprint ignores top-level JSON formatting and object-key order and removes the retired top-level idempotency_key field. The same request replays the original successful response; any different request returns 409 idempotency_conflict, and an active matching request returns 409 idempotency_in_progress. Completed receipts are retained for approximately 24 hours, pending claims may be reclaimed after approximately 1 hour, and no deduplication is guaranteed after expiry.

Required string length: 1 - 256
Pattern: ^[!-~]+$
x-tenant-id
string

Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.

Minimum string length: 1
x-organization-id
string

Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.

Minimum string length: 1

Body

application/json

Writable shape for creating a canonical automation.

agentId
string<uuid>
required

Managed agent selected by this automation.

agentVersionId
string<uuid>
required

Immutable agent version pinned for all admitted runs.

displayName
string
required

Human-readable automation name.

Required string length: 1 - 256
environmentId
string<uuid>
required

Execution environment selected for admitted sessions.

initialPrompt
object
required

Prompt definition frozen onto admitted runs.

triggers
object[]
required

Complete trigger set for this automation aggregate.

Maximum array length: 20

Closed schedule-trigger configuration.

metadata
object

Caller-owned string labels stored with the automation and returned on reads, such as a marker naming the system that manages it. Never copied to runs or sessions. At most 32 entries; keys use letters, digits, '_', '.', and '-' up to 64 characters; values are 1-512 characters without control characters. Omit for none.

runDefaults
object

Run defaults frozen onto admitted runs.

Response

Full round-trippable canonical automation aggregate.

Full round-trippable canonical automation aggregate.

agentId
string<uuid>
required

Managed agent selected by this automation.

agentVersionId
string<uuid>
required

Immutable agent version pinned for all admitted runs.

automationId
string<uuid>
required
read-only

Stable canonical automation identifier.

createdAt
string<date-time>
required
read-only

Time the automation was created.

displayName
string
required

Human-readable automation name.

environmentId
string<uuid>
required

Execution environment selected for admitted sessions.

initialPrompt
object
required

Prompt definition frozen onto admitted runs.

revision
integer<int64>
required
read-only

Monotonic aggregate revision represented by the response ETag.

Required range: 1 <= x <= 9007199254740991
runDefaults
object
required

Run defaults frozen onto admitted runs.

status
enum<string>
required
read-only

Lifecycle state. New automations start paused.

Available options:
paused,
active
triggers
object[]
required

Complete ordered trigger set.

Closed schedule-trigger configuration.

updatedAt
string<date-time>
required
read-only

Time the aggregate was last changed.

metadata
object

Caller-owned string labels stored with the automation. Absent when none were set.