Skip to main content
POST
Create machine

Authorizations

Authorization
string
header
required

An opaque Omnara personal or organization bearer token.

Headers

Idempotency-Key
string

Idempotency key for replay-safe mutating requests.

Required string length: 1 - 255

Path Parameters

orgID
string
required

Organization ID (org_...).

Pattern: ^org_[a-z2-7]{26}$

Body

application/json
display_name
string
required

Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.

Required string length: 1 - 64
description
string
cwd
string
env
object
secret_env
object
metadata
object

User-supplied metadata stored on a machine, provided directly or copied from the machine pool that provisions it. A restriction of Metadata that leaves room for one reserved pair - Omnara sets observed_platform on the machine to the platform reported by its daemon, so the key is reserved and at most 15 user pairs are accepted.

Response

Existing machine returned.

id
string
required

Identifies the machine.

Pattern: ^mch_[a-z2-7]{26}$
org_id
string
required

Organization that owns the machine.

Pattern: ^org_[a-z2-7]{26}$
source_kind
enum<string>
required

Whether the machine is a bring-your-own computer or was created from a machine pool.

Available options:
byo,
pool
display_name
string
required

Machine name; agent configs reference a BYO machine by this as machine_name.

Required string length: 1 - 64
description
string
required

Free-form note about the machine; empty if none was set.

provider
string
required

Sandbox provider that hosts a pool machine; byo for bring-your-own machines.

lifecycle_state
enum<string>
required

Where the machine is in provisioning or deletion, independent of whether its daemon is connected.

Available options:
provisioning,
provision_failed,
active,
deleting,
delete_failed,
deleted
connection_state
enum<string>
required

Whether the machine's daemon is connected now; asleep means suspended but able to be woken.

Available options:
online,
asleep,
offline
last_observed_at
string<date-time> | null
required

When the daemon last registered or sent a heartbeat; null if it has never connected.

cwd
string
required

Default working directory for processes started on the machine.

env
object
required

Environment variables set for every process started on the machine.

secret_env
object
required

Environment variable names mapped to secrets whose values are injected when processes start.

lifecycle_reason_code
string
required

Machine-readable reason for the latest lifecycle change, such as idle_timeout; empty when none.

lifecycle_reason_message
string
required

Human-readable detail for lifecycle_reason_code; empty when none.

next_reconcile_after
string<date-time> | null
required

When Omnara next works on provisioning or deleting the machine; null when nothing is scheduled.

provision_attempts
integer<int32>
required

Number of times Omnara has tried to provision this machine.

delete_attempts
integer<int32>
required

Number of times Omnara has tried to delete this machine.

metadata
object
required

Key-value metadata attached to the machine.

deleted_at
string<date-time> | null
required

When the machine finished deleting; null while it still exists.

created_at
string<date-time>
required

When the machine record was created.

updated_at
string<date-time>
required

When the machine record last changed.

machine_pool_id
string | null

Pool the machine was created from; null for BYO machines.

Pattern: ^mpo_[a-z2-7]{26}$
connection_state_reason
string

Why the machine's latest daemon session ended, such as daemon_lease_expired.

failure_report
object

Latest setup or daemon failure reported from the machine; omitted when none is recorded.