Deployments.ai Docs
Automations

Update a heartbeat

PATCH /v1/heartbeats/{heartbeatId} · SDK updateHeartbeat · CLI deployments heartbeat update

PATCH
/v1/heartbeats/{heartbeatId}

Requires schedules:write.

Authorization

headerAuthorizationBearer <token>

Opaque bearer credential scoped to one service account and tenant.

Path Parameters

heartbeatId*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-environment?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-organization?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-project?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Request Body

application/json
  1. body
activeWindow?|null
instructions?string
Match^\S[\s\S]*\S$|^\S$|^$
Length1 <= length <= 32000
intervalMs?integer
Range60000 <= value <= 2592000000
skipWhenBusy?boolean
timezone?|null

Response Body

HeartbeatResponse

application/json
  1. response
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
version*number|||
environmentId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
organizationId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
projectId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
workspaceId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
activeWindow?
agentDeploymentId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
createdBy?
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
lastRunAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
nextRunAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
object*"heartbeat"
Value in"heartbeat"
schedule*
status*string
Value in"active""archived""disabled""paused""provisioning"
threadId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
curl -X PATCH "https://example.com/v1/heartbeats/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "version": 0,  "environmentId": "string",  "organizationId": "string",  "projectId": "string",  "workspaceId": "string",  "activeWindow": {    "daysOfWeek": [      0    ],    "endMinuteOfDay": 0,    "startMinuteOfDay": 1439  },  "agentDeploymentId": "string",  "createdBy": {    "id": "string",    "type": "agent"  },  "id": "string",  "lastRunAt": "2019-08-24T14:15:22Z",  "nextRunAt": "2019-08-24T14:15:22Z",  "object": "heartbeat",  "schedule": {    "instructions": "string",    "intervalMs": 60000,    "skipWhenBusy": true,    "timezone": "string"  },  "status": "active",  "threadId": "string"}