---
title: "Create a workflow"
method: POST
path: "/api/v1/workflows"
tags: ["API Reference"]
---

# Create a workflow

`POST /api/v1/workflows`

## Request

- Base URL: `https://revnu.com`
- URL: `https://revnu.com/api/v1/workflows`
- Auth: HTTP bearer

Compose a recurring workflow from a schedule in plain words and a list of steps.

Requires the `workflows:write` scope.

**Response.** `{ "workflow": { workflowId, status, version, scheduleText, scheduleEcho, scheduleError, nextRunAt, steps, url, … } }`, status `201`. The workflow is live. The schedule resolves after the write: read it back for `scheduleEcho` and `nextRunAt`, or `scheduleError` when the words could not be understood.

## Request body

- object

## Response `201`

{ "workflow": { workflowId, status, version, scheduleText, scheduleEcho, scheduleError, nextRunAt, steps, url, … } }, status 201. The workflow is live. The schedule resolves after the write: read it back for scheduleEcho and nextRunAt, or scheduleError when the words could not be understood.

- object
  - `workflow` object, required
    - `workflowId` string, required
    - `url` string, required
    - `version` number, required
    - `name` string, required
    - `description` string, required
    - `status` 'live' | 'paused' | 'proposed', required
    - `scheduleText` string, required
    - `scheduleEcho` string, nullable, required
    - `scheduleError` string, nullable, required
    - `deliverTo` string, nullable, required
    - `requestedBy` string, nullable, required
    - `nextRunAt` number, nullable, required
    - `steps` object[], required
      - `gate` object
        - `label` string
        - `on` boolean, required
      - `id` string, required
      - `title` string, required
      - `details` string[], required

## Other responses

- `400`: The request is malformed; the error names the problem.
- `401`: Missing, malformed, unknown or revoked token.
- `402`: `setup_pending`: the account hasn't started its trial. Finish setup with `GET /setup`.
- `403`: The token lacks the scope in `requiredScope`.
- `409`: A settled refusal: `invalid_action` (see `actions`) or `rejected`.
- `429`: Rate limited.
- `503`: Temporarily unavailable; retry the same call.

---

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