Skip to main content
POST
/
routines
Create routine
curl --request POST \
  --url https://www.dench.com/api/v1/routines \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Daily digest",
  "prompt": "Summarize open CRM tasks.",
  "schedule": {
    "kind": "every",
    "everyMs": 86400000
  }
}
'
{
  "jobId": "<string>",
  "nextFireAt": 123
}

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.

Body

application/json
name
string
required
prompt
string
required

Agent goal/message for each run.

schedule
object
required

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

jobId
string
required
nextFireAt
number