---
title: "Create a routine."
method: POST
path: "/v0/routines"
tags: ["Workspaces"]
---

# Create a routine.

`POST /v0/routines`

## Request

- Base URL: `https://api.conductor.build` (the document declares no server; this is the origin it was published from)
- URL: `https://api.conductor.build/v0/routines`
- Auth: HTTP bearer

Creates a routine with a single webhook trigger in the given projectId. POSTing JSON to the returned webhookUrl runs the routine's prompt in a new workspace as the routine owner, using the owner's credentials for the selected agent. The webhookUrl is the trigger's only credential and is returned here and from rotate-secret only; treat it as a secret. Requires a user API key: workspace API keys and other sign-in credentials receive 403. The routine is owned by the key's user in the key's organization. Accepted model ids by agent — claude: fable-5-1, fable-5, opus-5-5-1m, opus-5-1m, opus-4-8-1m, opus-4-8, opus-4-7-1m, opus-4-7, opus-4-6-1m, sonnet-5-5-1m, sonnet-5-1m, sonnet-4-6-1m, sonnet-4-6, haiku-5-5-1m, haiku-4-5; codex: gpt-5.5, gpt-5.4, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.3-codex-spark, gpt-5.3-codex, gpt-5.2-codex, gpt-6-astra, gpt-6.1-sol, gpt-6-sol, gpt-6-luna, gpt-daybreak-blue-latest; cursor: auto, composer-2.5, grok-4.7, grok-4.6, grok-4.5. Accepted effort levels by agent — claude: low, medium, high, xhigh, max, ultracode; codex: none, low, medium, high, xhigh, max, ultra; cursor: low, medium, high, xhigh; codex max and ultra, and claude ultracode, require support from the selected model. Omit effort to use the agent's default — claude: high; codex: high.

## Request body

- object
  - `name` string, required
  - `prompt` string, required
  - `projectId` string, required
  - `agent` union, required
    - 'claude'
    - 'codex'
    - 'cursor'
    - 'acp'
  - `model` union
    - 'fable-5-1'
    - 'fable-5'
    - 'opus-5-5-1m'
    - 'opus-5-1m'
    - 'opus-4-8-1m'
    - 'opus-4-8'
    - 'opus-4-7-1m'
    - 'opus-4-7'
    - 'opus-4-6-1m'
    - 'sonnet-5-5-1m'
    - 'sonnet-5-1m'
    - 'sonnet-4-6-1m'
    - 'sonnet-4-6'
    - 'haiku-5-5-1m'
    - 'haiku-4-5'
    - 'gpt-5.5'
    - 'gpt-5.4'
    - 'gpt-5.6-sol'
    - 'gpt-5.6-terra'
    - 'gpt-5.6-luna'
    - 'gpt-5.3-codex-spark'
    - 'gpt-5.3-codex'
    - 'gpt-5.2-codex'
    - 'gpt-6-astra'
    - 'gpt-6.1-sol'
    - 'gpt-6-sol'
    - 'gpt-6-luna'
    - 'gpt-daybreak-blue-latest'
    - 'auto'
    - 'composer-2.5'
    - 'grok-4.7'
    - 'grok-4.6'
    - 'grok-4.5'
  - `effort` union
    - 'none'
    - 'low'
    - 'medium'
    - 'high'
    - 'xhigh'
    - 'max'
    - 'ultra'
    - 'ultracode'
  - `enabled` boolean
  - `triggers` object[]
    - `type` 'webhook', required

## Response `201`

Default Response

- object
  - `id` string, required
  - `name` string, required
  - `prompt` string, required
  - `repoUrl` string, required
  - `agent` union, required
    - 'claude'
    - 'codex'
    - 'cursor'
    - 'acp'
  - `model` string
  - `effort` string
  - `enabled` boolean, required
  - `createdAt` string, required
  - `updatedAt` string, required
  - `runCount` number, required
  - `lastRunAt` string
  - `triggers` object[], required
    - `id` string, required
    - `type` 'webhook', required
    - `enabled` boolean, required
    - `webhookUrl` string, required

## Other responses

- `400`: Invalid request.
- `401`: Missing or invalid bearer token.
- `404`: Resource not found.
- `default`: Error response.

---

[API](https://skmtc.dev/conductor-build/apis/roundhouse-public-api.md) - [All operations](https://skmtc.dev/conductor-build/apis/roundhouse-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/conductor-build/apis/roundhouse-public-api/revisions/1f39c7f7f219?raw)
