Create a routine
Creates a scheduled AI copilot routine. The plan limit max_milian_routines is enforced (-1 = unlimited, 0 = the feature is off for this plan). Required scope: routines:write (keys without scope restrictions have full access).
Authorizations
API key (fam_..., created under Settings → API Keys) or an OAuth 2.0 access token (fam_at_...). Keys can be restricted to scopes such as assistants:read, calls:write, campaigns:write, automations:read, dashboards:read, dashboards:write, leads:write, segments:write, phone_numbers:write, sip_trunks:write, knowledge:write, voices:read, billing:read, settings:write, platform:read, platform:write; a *:write scope implies the matching *:read. Automation and dashboard endpoints also accept the legacy calls:* scope. Keys without scope restrictions have full access.
Body
The instruction the routine runs unattended each time it fires.
manual = only runs via POST /routines/{id}/run. hourly/daily/weekdays/weekly/custom fire on the given schedule.
manual, hourly, daily, weekdays, weekly, custom hourly only — minute of the hour to fire on (0-59), default 0.
0 <= x <= 59daily/weekdays/weekly only — 24h wall-clock time "HH:MM", default "09:00".
weekly only — day of week, 0=Sunday … 6=Saturday.
0 <= x <= 6custom only — standard 5-field cron (minute hour day-of-month month day-of-week). Occurrences must be at least 10 minutes apart.
IANA timezone the schedule fields above are evaluated in, e.g. Europe/Berlin. Default UTC.
Connected-app toolkit slugs this routine's prompt depends on, e.g. ["slack","gmail"]. The routine refuses to be created while one of these is not connected.
10Response
The created routine.