Skip to content
POST/repos/{owner}/{name}/plans

An agent reads the repository and proposes the issues that would get there: what each changes, the checks it must pass, the files it will touch, and which must merge before which. Returns the plan’s id at once; the plan takes a minute or two to write, so read it with get_plan until its status is ready. Nothing is opened until apply_plan. Needs the Write role or higher.

  • Authentication: Required. Send an access token as Authorization: Bearer.
  • MCP tool: plan_work, with the same inputs
Name Type Required Description
owner string Yes The workspace that owns the repository.
name string Yes The repository’s name.

Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.

Name Type Required Description
brief string Yes What should be true when the work is done, in plain words. Say what you want, not how to split it.
curl -X POST https://api.g1t.sh/repos/flagon-io/hello/plans \
-H "Authorization: Bearer $G1T_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"brief": "Greet people by name, from the command line and the web page."
}'

A successful request answers 200 with:

{
"plan_id": "pln_01m43s9c4e8g2j6m0q4t8x2b6d"
}

A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.

Status Code When
401 unauthenticated A token is required, or the one sent is not valid.
402 payment_required The workspace cannot start this work: it needs the g1t plan or a card check, or it is at a limit. See usage and billing.
403 forbidden The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository.
404 not_found It does not exist, or you cannot see it.
409 conflict The request conflicts with the current state.
422 invalid The input is not valid. message says which field and why.