自动化

创建一个按计划由 WeKnora 助手以当前用户身份运行的任务

post/automations

Request

  • Base URL
    /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/automations
  • Auth
    API key in header Authorization

Request body

access_level'read_only' | 'confirm' | 'auto_write'
approval_timeout_minutesinteger

How long a run waits for an approval before it fails, in minutes; default 1440

carry_last_resultboolean

Whether each per_run conversation gets the last successful answer

descriptionstring

What it is for

instructionstring required

The task, sent as the user message of each run. May name now, last_run_at, last_success_at, run_id or automation_name inside double curly braces to have it filled in

misfire_policy'skip' | 'run_once'

What happens to runs missed while the service was down; default skip

model_idstring

Optional chat model from model.list; empty follows the assistant default

namestring required

What the automation is called

notify_on_successboolean

Whether a successful run notifies the owner; failures always do

overlap_policy'skip' | 'queue'

What happens when a run is due while the previous one is still going; default skip

session_mode'per_run' | 'persistent'

per_run (default) starts a new conversation each run; persistent keeps one

Response

创建的自动化

successboolean

Example response

{
  "success": true
}

Changes