Docs

Reference

Create / edit a routine

A repeat — { kind: weekly, times: ["08:00"], days: [1..5] } or { kind: every, hours: N } in each account's own timezone — that runs a sequence of steps for the chosen accounts / tags. Steps are like sequences_run but the account field is filled in per account (only per-account, non-dangerous operations, waits and event waits). Slots outside an account's run hours are skipped when it follows its schedule. Updating needs expectedRevision.

View MarkdownThis page is generated from the source code on every release.

A repeat — { kind: weekly, times: ["08:00"], days: [1..5] } or { kind: every, hours: N } in each account's own timezone — that runs a sequence of steps for the chosen accounts / tags. Steps are like sequences_run but the account field is filled in per account (only per-account, non-dangerous operations, waits and event waits). Slots outside an account's run hours are skipped when it follows its schedule. Updating needs expectedRevision.

Overview

Name Value
Code routines.save
Scope needed automation.write
Risk Write
May need confirmation No
Runs as Answers right away
Needs Idempotency-Key No
Member roles allowed owner, manager
In the app Automation → Routines → Save

Input fields

Field Type Required Description
id uuid No
name text Yes
enabled true/false No
schedule object Yes
target object Yes
steps object[] Yes
expectedRevision integer No

Example request

curl -X POST https://tlg.builera.app/api/public/v2/ops/routines.save \
  -H "Authorization: Bearer $TELEGRAM_AUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"…","schedule":"…","target":"…","steps":[]}'

Output fields (data)

Field Type Required
ok true Yes
id text Yes
revision null | number Yes

Example answer

{
  "data": {
    "ok": true,
    "id": "00000000-0000-4000-8000-000000000000",
    "revision": 1
  }
}

Using it over MCP

Not listed on any profile: call tools_describe then tools_run with code: "routines.save". Tool name when listed: routines_save.

Was this page helpful?

Last checked: 10/24/2026 · build 2.0