POST /v1/clients/:id/schedules — manual, weekly, or monthly; next run time computed from the cadence
A schedule binds one client to a template, a target URL, a cadence, and recipients. Creation is an API call against the client: POST /v1/clients/:id/schedules.
Required pieces#
The body needs a templateId that exists in your workspace (Report template not found for this tenant. otherwise) and a non-empty targetUrl (A target URL is required.) — the site this schedule reports on. Optionally add brandProfileId (validated like the client reference), recipients, language, cadence, and active. The client itself must belong to your tenant or the route answers Client not found for this tenant.
Cadence and the next run#
cadence is manual, weekly, or monthly and defaults to manual. On creation the platform computes nextRunAt: manual → null (nothing runs until you ask), weekly → seven days out, monthly → thirty days out. The background worker picks up only schedules that are active, not manual, and due — so a weekly schedule created today fires on its own a week from now, then advances by the same interval after each run.
Expected result#
A schedule row (returned as { schedule }) with its own template, brand, language, recipients, and computed nextRunAt. Update it any time with PUT /v1/clients/:id/schedules/:scheduleId; changing the cadence recomputes the next run, other edits leave it untouched (see Pick recipients and language).

