---
title: "Wake Gm"
method: POST
path: "/api/v1/gm/wake"
tags: ["gm"]
---

# Wake Gm

`POST /api/v1/gm/wake`

## Request

- Base URL: `https://app.goodleads.club` (the document declares no server; this is the origin it was published from)
- URL: `https://app.goodleads.club/api/v1/gm/wake`
- Auth: API key in header `X-API-Key`

Wake the GM: process approval comments and launch a focused session.

Gib's workflow: comment "approved" on standup doc → hit this endpoint → agent
processes approvals and executes approved work → Gib gets email with results.

An optional JSON body `{"prompt": "..."}` hands the session a custom prompt
(via the GM_SESSION_PROMPT env var gm_session already reads). The bare wake
stays unauthenticated — it only triggers the agent's own standing flow — but
a custom prompt is arbitrary instruction injection into a credentialed
session, so it requires the admin key.

Launches the session as an ECS task (same pattern as pipeline launcher).
Returns immediately with task info — the session runs asynchronously.

## Query parameters

- `state` string, required: Two-letter state code

## Request body

- WakeRequest: Optional body for POST /wake. `prompt` becomes GM_SESSION_PROMPT on the session task, overriding the agent's default session-type prompt.
  - `prompt` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/goodleads/apis/formation-gtm-api.md) · [All operations](https://skmtc.dev/goodleads/apis/formation-gtm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/goodleads/apis/formation-gtm-api/revisions/2068d13a82cf?raw)
