---
title: "Run a routine immediately"
method: POST
path: "/routines/{id}/run"
tags: ["Routines"]
---

# Run a routine immediately

`POST /routines/{id}/run`

## Request

- Base URL: `https://commareports.com/api/v1`
- URL: `https://commareports.com/api/v1/routines/{id}/run`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Executes the routine outside its schedule. Also accepts a Supabase user-session JWT (the in-app "Run now" button). Responses: 200 synchronous success, 202 accepted (skill run dispatched to a background workflow — poll `GET /routines/{id}` for the outcome), 402 AI-compute cap exceeded, 502 the run or workflow dispatch failed. Scope: `routines`.

## Response `200`

Run completed.

- RoutineRunResult
  - `ok` boolean, required
  - `run_id` string, uuid, nullable
  - `workflow_id` string, nullable: Set when the run was dispatched to a background workflow (202).
  - `deferred` boolean, required
  - `cap_exceeded` boolean, required
  - `error` string, nullable
  - `routine` Routine
    - `id` string, uuid, required
    - `report_id` string, uuid, required
    - `name` string, required
    - `schedule_cron` string, required: 5-field cron expression.
    - `trigger_url` string, uri, nullable
    - `payload` unknown
    - `enabled` boolean, required
    - `last_run_at` string, date-time, nullable
    - `last_run_status` string, nullable
    - `last_run_error` string, nullable
    - `next_run_at` string, date-time, nullable
    - `skill_id` string, uuid, nullable
    - `connector_ids` string[]
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `202`: Run accepted; executing asynchronously.
- `401`: Missing, invalid, revoked, or expired token.
- `402`: Plan / prepaid-credit compute cap exceeded.
- `403`: Token missing the required scope, or no access to the resource.
- `404`: Resource not found (also returned instead of 403 where existence must not leak).
- `429`: Rate limit exceeded. Rate limit: per-token sliding window (plan-aware — Free 60 req/min, Pro 600, Team/Enterprise 6000 by default); 429 responses carry a Retry-After header.
- `500`: Unexpected server error.
- `502`: The run failed.

---

[API](https://skmtc.dev/commareports/apis/comma-api.md) · [All operations](https://skmtc.dev/commareports/apis/comma-api/llms.txt) · [OpenAPI document](https://skmtc.dev/commareports/apis/comma-api/revisions/cd5263522ade?raw)
