Skip to main content
PATCH
/
routines
/
{jobId}
Update routine
curl --request PATCH \
  --url https://www.dench.com/api/v1/routines/{jobId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "prompt": "<string>",
  "schedule": {
    "kind": "<string>",
    "everyMs": 123,
    "anchorMs": 0
  },
  "description": "<string>",
  "enabled": true,
  "deleteAfterRun": true,
  "target": "<string>"
}
'
{
  "error": {
    "message": "<string>",
    "type": "<string>",
    "code": "<string>",
    "details": "<unknown>"
  }
}

Authorizations

Authorization
string
header
required

Workspace-scoped Dench API key from workspace settings. This is the same key used by DENCH_API_KEY in sandboxes.

Path Parameters

jobId
string
required

Body

application/json
name
string
prompt
string
schedule
object

Schedule: recurring (every), cron expression, or one-shot (at).

description
string
overlapPolicy
enum<string>

What to do when a previous run is still active. Defaults to skip.

Available options:
skip,
queue,
kill_old
enabled
boolean
deleteAfterRun
boolean
target
string

Routine run target.

Allowed value: "chat_turn"

Response

Successful response