CoderHelm Docs
APIPlans

Create a plan

POST
/api/plans

Creates a plan, with its tasks if you send them. The plan and its tasks start as draft; nothing runs until the plan is executed. Not idempotent: sending the same request twice makes two plans.

Authorization

api_key plans
headerAuthorizationBearer <token>

A team API key, made by an admin under Settings, API keys. Send it as Authorization: Bearer chk_....

Scope: plans

Request Body

The plan.

application/json
  1. body

A new plan.

Example
{  "description": "Brute-force attempts are showing up in the auth logs.",  "repo": "acme/web",  "tasks": [    {      "acceptance_criteria": "The 11th attempt within 15 minutes gets 429 and a Retry-After header.",      "description": "Allow 10 attempts per IP per 15 minutes; answer 429 after that.",      "title": "Limit login attempts per IP"    }  ],  "title": "Rate-limit the login form"}
description?|

More about it, in Markdown.

Example"Brute-force attempts are showing up in the auth logs."
destination?null|
repo?|

The repository its tasks work in, owner/name, unless a task names its own.

Example"acme/web"
tasks?array<>|

The plan's tasks, in order. Each starts as draft.

Example
[  {    "acceptance_criteria": "The 11th attempt within 15 minutes gets 429 and a Retry-After header.",    "description": "Allow 10 attempts per IP per 15 minutes; answer 429 after that.",    "title": "Limit login attempts per IP"  }]
title*string

What the plan is for. 1 to 500 characters.

Example"Rate-limit the login form"

Response Body

The plan was made.

application/json
  1. response

The plan that was made.

plan_id*string

The new plan's id.

Example"01JB8V0K3M5P7R9T1W3Y5A7C9E"
curl -X POST 'https://api.coderhelm.com/api/plans' \  -H "Authorization: Bearer $CODERHELM_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "description": "Brute-force attempts are showing up in the auth logs.",  "repo": "acme/web",  "tasks": [    {      "acceptance_criteria": "The 11th attempt within 15 minutes gets 429 and a Retry-After header.",      "description": "Allow 10 attempts per IP per 15 minutes; answer 429 after that.",      "title": "Limit login attempts per IP"    }  ],  "title": "Rate-limit the login form"}'
{  "plan_id": "01JB8V0K3M5P7R9T1W3Y5A7C9E"}
Edit on GitHub