Skip to main content
POST
Record Heartbeat
Every request requires ?beta=true.

Authorizations

X-Api-Key
string
header
default:sk-ant-local-default
required

OMA workspace API key.

Headers

anthropic-beta
string

Optional header to specify the beta version(s) you want to use.

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

anthropic-version
string

The version of the OMA API you want to use.

Read more about versioning and our version history here.

authorization
string | null

Path Parameters

environment_id
string
required
work_id
string
required

Query Parameters

beta
enum<boolean>
required

Selects the beta API contract for this endpoint. Must be true.

Available options:
true
desired_ttl_seconds
integer | null

Desired TTL in seconds

expected_last_heartbeat
string | null

Expected last_heartbeat for conditional update (optimistic concurrency). Use literal 'NO_HEARTBEAT' to claim an unclaimed lease (first heartbeat). For subsequent heartbeats, echo the server's previous last_heartbeat value exactly. Returns 412 Precondition Failed if the actual value doesn't match.

Response

Successful Response

Response after recording a heartbeat for a work item.

last_heartbeat
string
required

RFC 3339 timestamp of the actual heartbeat from DB

lease_extended
boolean
required

Whether the heartbeat succeeded in extending the lease

state
enum<string>
required

Current state of the work item (active/stopping/stopped)

Available options:
queued,
starting,
active,
stopping,
stopped
ttl_seconds
integer
required

Effective TTL applied to the lease

type
string
default:work_heartbeat
required

The type of response

Allowed value: "work_heartbeat"