v1 · stable

REST API

JSON over HTTPS. Bearer-auth. Rate limited at 60 req/min per token.

Base URL
https://api.coachedbymanny.com
Auth header
Authorization: Bearer <token>
Status
All systems operational

Quick start

curl https://api.coachedbymanny.com/v1/me \
  -H "Authorization: Bearer $CBM_TOKEN"

Endpoints

POST/v1/auth/session

Exchange Stripe-confirmed checkout for an access token.

Request
{ "checkout_id": "cs_test_..." }
Response
{ "access_token": "...", "user": { "id": "u_1", "role": "client" } }
GET/v1/me

Current user profile, role and tier.

POST/v1/intake

Submit intake quiz answers; queues an AI plan draft.

Request
{ "answers": { "goal": "fat_loss", "experience": 5 } }
GET/v1/plan

Currently approved plan for the authenticated client.

POST/v1/plan/regenerate

Coach-only. Re-draft a plan with new constraints.

Request
{ "plan_id": "p_1", "notes": "lower volume, add deload" }
PATCH/v1/plan/:id

Coach-only. Inline edits to a draft plan.

Request
{ "blocks": [...] }
POST/v1/plan/:id/approve

Coach-only. Marks a plan approved and grants client access.

GET/v1/checkins

Paginated list. Coach sees roster; client sees own.

Response
{ "items": [...], "next_cursor": null }
POST/v1/checkins

Client submits a weekly check-in.

Request
{ "weight": 188.4, "sleep": 7.5, "energy": 8, "notes": "..." }
GET/v1/messages/:client_id

Conversation thread. Tier-gated for clients (Performance, Elite).

POST/v1/messages/:client_id

Send a message in a thread.

Request
{ "text": "Heading into a deload week." }
POST/v1/billing/portal

Returns a Stripe billing portal URL.

Webhooks

plan.drafted
POST
plan.approved
POST
checkin.submitted
POST
message.created
POST
billing.payment_failed
POST