{ "components": { "schemas": { "ErrorResponse": { "properties": { "code": { "description": "Machine-readable error code", "type": "string" }, "details": { "additionalProperties": true, "description": "Optional per-field error details", "type": "object" }, "error": { "description": "Human-readable message", "type": "string" } }, "required": [ "error", "code" ], "type": "object" } }, "securitySchemes": { "tokenAuth": { "description": "Send the header ``Authorization: Token ``. Keys are member-owned, carry the capabilities they were issued with, and cannot authenticate against the staff/operator ``/api/`` surface.", "scheme": "bearer", "type": "http" } } }, "externalDocs": { "description": "Member API usage guide", "url": "https://github.com/AI-Shipping-Labs/website/blob/main/docs/member-api/plans.md" }, "info": { "description": "Member API for AI Shipping Labs. All endpoints accept JSON in and return JSON out. Authentication is via the ``Authorization: Token `` header where ```` is a member-owned API key starting with ``asl_member_``. A key carries the capabilities it was issued with -- a key created today covers every deployed member endpoint -- and acts only as its owner against that member's own data. Keys cannot access Studio or staff APIs.", "title": "AI Shipping Labs Member API", "version": "1.0.0" }, "openapi": "3.1.0", "paths": { "/member-api/v1/books/reader-profile": { "get": { "description": "Returns the authenticated key owner's Book Club reading-profile notes visibility (``public`` or ``private``). Book-agnostic \u2014 visibility is a single per-user flag. Public shares notes in chapter group feeds and on the member's reader profile; private keeps note bodies visible only to the member and staff. A member with no profile row is reported as ``public`` (the default). Limited to the key owner only \u2014 never another member's profile.", "responses": { "200": { "content": { "application/json": { "example": { "visibility": "public" } } }, "description": "The caller's current visibility." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." } }, "summary": "Get the caller's reading-profile visibility", "tags": [ "Books" ] }, "put": { "description": "Sets the authenticated key owner's reading-profile visibility from the JSON body ``{\"visibility\": \"public\"|\"private\"}`` (``get_or_create`` on the owner). Public shares notes in chapter group feeds and on the member's reader profile; private keeps note bodies visible only to the member and staff. The default is public. Book-agnostic and limited to the key owner only \u2014 there is no user parameter. Any value other than ``public`` / ``private`` returns a 400. Reading another member's public profile / notes feed (a rendered web surface) and posting comments (the shared web comment endpoints) are out of scope for the member API; destructive deletes stay Studio/admin-scoped.", "requestBody": { "content": { "application/json": { "example": { "visibility": "public" }, "schema": { "properties": { "visibility": { "enum": [ "public", "private" ], "type": "string" } }, "required": [ "visibility" ], "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "visibility": "public" } } }, "description": "Updated visibility." }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid ``visibility`` value." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." } }, "summary": "Set the caller's reading-profile visibility", "tags": [ "Books" ] } }, "/member-api/v1/books/{slug}/chapters/{number}/note": { "delete": { "description": "Idempotently deletes the key owner's note for the chapter. Destructive deletes of other members' notes stay Studio/admin scoped.", "parameters": [ { "in": "path", "name": "slug", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "number", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Note cleared (idempotent)." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Key owner's tier is below the book's required level." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unknown/draft book or unknown chapter number." } }, "summary": "Clear the caller's own note", "tags": [ "Books" ] }, "get": { "description": "Returns the authenticated key owner's own note for the chapter, or 404 if they have not written one. Limited to the key owner only \u2014 never another member's note, and never the group feed of other members' notes (that is a rendered web surface).", "parameters": [ { "in": "path", "name": "slug", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "number", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "example": { "body": "The KV cache is the whole game.", "body_html": "

The KV cache is the whole game.

", "book": { "slug": "inference-engineering", "title": "Inference Engineering" }, "chapter": { "number": 0, "title": "Inference" }, "comment_content_id": "0b3d\u2026", "created_at": "2026-08-06T10:00:00+00:00", "updated_at": "2026-08-06T10:00:00+00:00" } } }, "description": "The caller's own note." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Key owner's tier is below the book's required level." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unknown/draft book, unknown chapter, or no note yet." } }, "summary": "Get the caller's own note for a chapter", "tags": [ "Books" ] }, "put": { "description": "Creates or replaces the key owner's single note for the chapter (``update_or_create`` on owner + chapter). ``body`` is required and is markdown \u2014 a fenced ```mermaid block renders as a diagram on the web, other fenced blocks render as code. The rendered, sanitised HTML is returned as ``body_html``. The first save flips the account's activation flag. Posting comments on a note and reading the group feed are out of scope for the member API \u2014 comments use the shared web endpoints.", "parameters": [ { "in": "path", "name": "slug", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "number", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "body": "The KV cache is the whole game." }, "schema": { "properties": { "body": { "type": "string" } }, "required": [ "body" ], "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Upserted note." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Key owner's tier is below the book's required level." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unknown/draft book or unknown chapter number." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or empty ``body``." } }, "summary": "Upsert the caller's own note", "tags": [ "Books" ] } }, "/member-api/v1/books/{slug}/chapters/{number}/read": { "delete": { "description": "Idempotently removes the caller's read row for the chapter (delete if present). A repeated call is a no-op. Returns the updated ``done`` / ``total``.", "parameters": [ { "in": "path", "name": "slug", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "number", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "example": { "done": 2, "read": false, "total": 5 } } }, "description": "Chapter is unread." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Key owner's tier is below the book's required level." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unknown/draft book or unknown chapter number." } }, "summary": "Mark a chapter unread", "tags": [ "Books" ] }, "put": { "description": "Idempotently marks the chapter read for the authenticated key owner (``get_or_create``). A repeated call is a no-op. Returns the updated ``done`` / ``total``.", "parameters": [ { "in": "path", "name": "slug", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "number", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "example": { "done": 3, "read": true, "read_at": "2026-08-06T10:00:00+00:00", "total": 5 } } }, "description": "Chapter is read." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Key owner's tier is below the book's required level." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unknown/draft book or unknown chapter number." } }, "summary": "Mark a chapter read", "tags": [ "Books" ] } }, "/member-api/v1/books/{slug}/reading": { "get": { "description": "Returns the authenticated key owner's per-chapter read state for the book plus ``total`` / ``done`` / ``pct``. Limited to the key owner only \u2014 never another member's state.", "parameters": [ { "in": "path", "name": "slug", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "book": { "slug": "inference-engineering", "title": "Inference Engineering" }, "chapters": [ { "number": 0, "read": true, "read_at": "2026-08-06T10:00:00+00:00", "title": "Inference" }, { "number": 1, "read": false, "read_at": null, "title": "Prerequisites" } ], "done": 2, "pct": 40, "total": 5 } } }, "description": "The caller's reading state." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Key owner's tier is below the book's required level." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unknown or draft book." } }, "summary": "Get the caller's reading state for a book", "tags": [ "Books" ] } }, "/member-api/v1/events": { "get": { "description": "Lists event sessions the key owner can access. Use filter=upcoming (default) or filter=past. External events remain discoverable.", "parameters": [ { "in": "query", "name": "filter", "required": false, "schema": { "default": "upcoming", "enum": [ "upcoming", "past" ], "type": "string" } }, { "in": "query", "name": "page", "required": false, "schema": { "default": 1, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "properties": { "events": { "items": { "properties": { "attendee_count": { "minimum": 0, "type": "integer" }, "effective_end_datetime": { "format": "date-time", "type": "string" }, "end_datetime": { "format": "date-time", "type": [ "string", "null" ] }, "external_registration_url": { "type": [ "string", "null" ] }, "id": { "type": "integer" }, "is_registered": { "type": "boolean" }, "kind": { "enum": [ "standard", "workshop", "meetup", "q_and_a" ], "type": "string" }, "location": { "type": "string" }, "member_endpoint_url": { "type": "string" }, "registration_available": { "type": "boolean" }, "registration_source": { "enum": [ "event", "series", "none" ], "type": "string" }, "registration_targets": { "items": { "enum": [ "series", "event" ], "type": "string" }, "type": "array" }, "required_level": { "type": "integer" }, "required_tier_label": { "type": "string" }, "series": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "slug": { "type": "string" }, "url": { "type": "string" } }, "required": [ "id", "slug", "name", "url" ], "type": [ "object", "null" ] }, "slug": { "type": "string" }, "start_datetime": { "format": "date-time", "type": "string" }, "status": { "enum": [ "draft", "upcoming", "completed", "cancelled" ], "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "time_status": { "enum": [ "upcoming", "past", "draft" ], "type": "string" }, "timezone": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" } }, "required": [ "id", "slug", "title", "url", "kind", "start_datetime", "end_datetime", "effective_end_datetime", "timezone", "location", "tags", "status", "time_status", "required_level", "required_tier_label", "series", "attendee_count", "external_registration_url", "is_registered", "registration_source", "registration_available", "registration_targets", "member_endpoint_url" ], "type": "object" }, "type": "array" }, "pagination": { "properties": { "page": { "minimum": 1, "type": "integer" }, "page_size": { "const": 20, "type": "integer" }, "total": { "minimum": 0, "type": "integer" }, "total_pages": { "minimum": 0, "type": "integer" } }, "required": [ "page", "page_size", "total", "total_pages" ], "type": "object" } }, "required": [ "events", "pagination" ], "type": "object" } } }, "description": "A page of accessible event sessions." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Invalid filter or page." } }, "summary": "List accessible events", "tags": [ "Events" ] } }, "/member-api/v1/events/{event_id}": { "get": { "description": "Returns website-visible event detail and the key owner's registration state. It never returns a roster, email address, meeting id, or raw community-event provider URL.", "parameters": [ { "in": "path", "name": "event_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "properties": { "attendee_count": { "minimum": 0, "type": "integer" }, "banner_url": { "type": [ "string", "null" ] }, "description": { "type": "string" }, "description_html": { "type": "string" }, "effective_end_datetime": { "format": "date-time", "type": "string" }, "end_datetime": { "format": "date-time", "type": [ "string", "null" ] }, "external_registration_url": { "type": [ "string", "null" ] }, "hosts": { "items": { "properties": { "bio": { "type": "string" }, "bio_html": { "type": "string" }, "name": { "type": "string" }, "photo_url": { "type": "string" }, "slug": { "type": "string" }, "title": { "type": "string" } }, "required": [ "slug", "name", "title", "bio", "bio_html", "photo_url" ], "type": "object" }, "type": "array" }, "id": { "type": "integer" }, "instructors": { "items": { "properties": { "bio": { "type": "string" }, "bio_html": { "type": "string" }, "instructor_id": { "type": "string" }, "links": { "items": { "type": "object" }, "type": "array" }, "name": { "type": "string" }, "photo_url": { "type": "string" } }, "required": [ "instructor_id", "name", "bio", "bio_html", "photo_url", "links" ], "type": "object" }, "type": "array" }, "is_registered": { "type": "boolean" }, "join_url": { "type": [ "string", "null" ] }, "kind": { "enum": [ "standard", "workshop", "meetup", "q_and_a" ], "type": "string" }, "location": { "type": "string" }, "member_endpoint_url": { "type": "string" }, "registration_available": { "type": "boolean" }, "registration_source": { "enum": [ "event", "series", "none" ], "type": "string" }, "registration_targets": { "items": { "enum": [ "series", "event" ], "type": "string" }, "type": "array" }, "required_level": { "type": "integer" }, "required_tier_label": { "type": "string" }, "series": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "slug": { "type": "string" }, "url": { "type": "string" } }, "required": [ "id", "slug", "name", "url" ], "type": [ "object", "null" ] }, "slug": { "type": "string" }, "start_datetime": { "format": "date-time", "type": "string" }, "status": { "enum": [ "draft", "upcoming", "completed", "cancelled" ], "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "time_status": { "enum": [ "upcoming", "past", "draft" ], "type": "string" }, "timezone": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" } }, "required": [ "id", "slug", "title", "url", "kind", "start_datetime", "end_datetime", "effective_end_datetime", "timezone", "location", "tags", "status", "time_status", "required_level", "required_tier_label", "series", "attendee_count", "external_registration_url", "is_registered", "registration_source", "registration_available", "registration_targets", "member_endpoint_url", "description", "description_html", "instructors", "hosts", "banner_url", "join_url" ], "type": "object" } } }, "description": "Member-safe event detail." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "The key owner's tier cannot access this event." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unknown, draft, or retired event." } }, "summary": "Get accessible event detail", "tags": [ "Events" ] } }, "/member-api/v1/events/{event_id}/register": { "post": { "description": "Registers only the authenticated key owner. The optional request field scope chooses the registration target: series (the default for a series session) or event (only this session). It is not a key permission.", "parameters": [ { "in": "path", "name": "event_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "scope": "event" }, "schema": { "properties": { "scope": { "enum": [ "series", "event" ], "type": "string" } }, "type": "object" } } }, "required": false }, "responses": { "201": { "content": { "application/json": { "schema": { "properties": { "attendee_count": { "minimum": 0, "type": "integer" }, "banner_url": { "type": [ "string", "null" ] }, "description": { "type": "string" }, "description_html": { "type": "string" }, "effective_end_datetime": { "format": "date-time", "type": "string" }, "end_datetime": { "format": "date-time", "type": [ "string", "null" ] }, "external_registration_url": { "type": [ "string", "null" ] }, "hosts": { "items": { "properties": { "bio": { "type": "string" }, "bio_html": { "type": "string" }, "name": { "type": "string" }, "photo_url": { "type": "string" }, "slug": { "type": "string" }, "title": { "type": "string" } }, "required": [ "slug", "name", "title", "bio", "bio_html", "photo_url" ], "type": "object" }, "type": "array" }, "id": { "type": "integer" }, "instructors": { "items": { "properties": { "bio": { "type": "string" }, "bio_html": { "type": "string" }, "instructor_id": { "type": "string" }, "links": { "items": { "type": "object" }, "type": "array" }, "name": { "type": "string" }, "photo_url": { "type": "string" } }, "required": [ "instructor_id", "name", "bio", "bio_html", "photo_url", "links" ], "type": "object" }, "type": "array" }, "is_registered": { "type": "boolean" }, "join_url": { "type": [ "string", "null" ] }, "kind": { "enum": [ "standard", "workshop", "meetup", "q_and_a" ], "type": "string" }, "location": { "type": "string" }, "member_endpoint_url": { "type": "string" }, "registered_at": { "format": "date-time", "type": "string" }, "registration_available": { "type": "boolean" }, "registration_source": { "enum": [ "event", "series", "none" ], "type": "string" }, "registration_status": { "enum": [ "registered" ], "type": "string" }, "registration_targets": { "items": { "enum": [ "series", "event" ], "type": "string" }, "type": "array" }, "required_level": { "type": "integer" }, "required_tier_label": { "type": "string" }, "series": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "slug": { "type": "string" }, "url": { "type": "string" } }, "required": [ "id", "slug", "name", "url" ], "type": [ "object", "null" ] }, "series_slug": { "type": "string" }, "slug": { "type": "string" }, "start_datetime": { "format": "date-time", "type": "string" }, "status": { "enum": [ "draft", "upcoming", "completed", "cancelled" ], "type": "string" }, "summary": { "properties": { "registered": { "type": "integer" }, "skipped_already": { "type": "integer" }, "skipped_no_access": { "type": "integer" }, "skipped_opted_out": { "type": "integer" }, "total_occurrences": { "type": "integer" } }, "type": "object" }, "tags": { "items": { "type": "string" }, "type": "array" }, "time_status": { "enum": [ "upcoming", "past", "draft" ], "type": "string" }, "timezone": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" } }, "required": [ "id", "slug", "title", "url", "kind", "start_datetime", "end_datetime", "effective_end_datetime", "timezone", "location", "tags", "status", "time_status", "required_level", "required_tier_label", "series", "attendee_count", "external_registration_url", "is_registered", "registration_source", "registration_available", "registration_targets", "member_endpoint_url", "description", "description_html", "instructors", "hosts", "banner_url", "join_url", "registration_status", "registered_at" ], "type": "object" } } }, "description": "Registration created." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "The key owner's tier cannot access this event." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unknown, draft, or retired event." }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Closed, duplicate, or externally hosted event." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Invalid body or unsupported target field." } }, "summary": "Register yourself for an event", "tags": [ "Events" ] } }, "/member-api/v1/peer-reviews": { "get": { "responses": { "200": { "description": "Paginated list of assigned peer reviews." }, "401": { "description": "Error response." }, "422": { "description": "Error response." } }, "summary": "List peer reviews assigned to the authenticated member", "tags": [ "Peer Reviews" ] } }, "/member-api/v1/peer-reviews/submissions/{submission_id}/incoming": { "get": { "description": "Requires peer_reviews:read and course access. Another owner or unreleased feedback returns 403. Dated attempts release at Completed; self-paced attempts release in the existing feedback phase. Only completed reviews are exposed, with anonymous Reviewer N labels and exact preliminary criterion medians; criterion feedback is null when not stored.", "parameters": [ { "in": "path", "name": "submission_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Incoming reviews and preliminary score breakdown." }, "403": { "description": "Not your submission or feedback not released." }, "404": { "description": "Submission not found." } }, "summary": "Read released incoming reviews on your own submission", "tags": [ "Peer Reviews" ] } }, "/member-api/v1/peer-reviews/{review_id}": { "get": { "parameters": [ { "in": "path", "name": "review_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Peer review detail with evaluation criteria." }, "401": { "description": "Error response." }, "404": { "description": "Error response." } }, "summary": "Get an assigned peer review, submission details, and criteria", "tags": [ "Peer Reviews" ] }, "patch": { "parameters": [ { "in": "path", "name": "review_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Updated peer review detail." }, "400": { "description": "Error response." }, "401": { "description": "Error response." }, "404": { "description": "Error response." }, "409": { "description": "Error response." }, "422": { "description": "Error response." } }, "summary": "Submit or partially update an assigned peer review", "tags": [ "Peer Reviews" ] }, "put": { "parameters": [ { "in": "path", "name": "review_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Updated peer review detail." }, "400": { "description": "Error response." }, "401": { "description": "Error response." }, "404": { "description": "Error response." }, "409": { "description": "Error response." }, "422": { "description": "Error response." } }, "summary": "Submit or replace an assigned peer review", "tags": [ "Peer Reviews" ] } }, "/member-api/v1/plans": { "get": { "description": "Lists plans owned by the authenticated member API key owner, newest first. Never returns other members' plans. Paginated with ``page`` (default 1) and a fixed page size of 20.", "parameters": [ { "in": "query", "name": "page", "required": false, "schema": { "default": 1, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "example": { "pagination": { "page": 1, "page_size": 20, "total": 1, "total_pages": 1 }, "plans": [ { "created_at": "2026-05-01T10:00:00+00:00", "id": 12, "member": { "display_name": "Alice" }, "progress": { "checkpoints_done": 1, "checkpoints_total": 4 }, "shared_at": null, "sprint": { "name": "May 2026", "slug": "may-2026" }, "title": "Ship an eval toolkit", "updated_at": "2026-05-01T10:00:00+00:00", "visibility": "private" } ] }, "schema": { "properties": { "pagination": { "properties": { "page": { "minimum": 1, "type": "integer" }, "page_size": { "const": 20, "type": "integer" }, "total": { "minimum": 0, "type": "integer" }, "total_pages": { "minimum": 0, "type": "integer" } }, "required": [ "page", "page_size", "total", "total_pages" ], "type": "object" }, "plans": { "items": { "properties": { "created_at": { "format": "date-time", "type": [ "string", "null" ] }, "id": { "type": "integer" }, "member": { "properties": { "display_name": { "type": "string" } }, "required": [ "display_name" ], "type": "object" }, "progress": { "properties": { "checkpoints_done": { "minimum": 0, "type": "integer" }, "checkpoints_total": { "minimum": 0, "type": "integer" } }, "required": [ "checkpoints_done", "checkpoints_total" ], "type": "object" }, "shared_at": { "format": "date-time", "type": [ "string", "null" ] }, "sprint": { "properties": { "name": { "type": "string" }, "slug": { "type": "string" } }, "required": [ "slug", "name" ], "type": "object" }, "title": { "type": "string" }, "updated_at": { "format": "date-time", "type": [ "string", "null" ] }, "visibility": { "type": "string" } }, "required": [ "id", "sprint", "member", "title", "visibility", "progress", "shared_at", "created_at", "updated_at" ], "type": "object" }, "type": "array" } }, "required": [ "plans", "pagination" ], "type": "object" } } }, "description": "A page of owned plans." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Invalid page." } }, "summary": "List owned plans", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}": { "get": { "description": "Returns one owned plan with member-safe nested content. Cohort visibility does not grant member API read access.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Owned nested plan detail." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." } }, "summary": "Get owned plan detail", "tags": [ "Plans" ] }, "patch": { "description": "Partially updates plan-level fields (title, goal, summary.*, focus.*, accountability, visibility). Only supplied keys change. ``visibility`` accepts ``private`` or ``cohort``; ``public`` is reserved and rejected. Returns the full plan detail.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "focus": { "main": "Evaluation", "supporting": [ "Tracing" ] }, "summary": { "goal": "A reusable eval harness for my agent" }, "title": "Ship an eval harness", "visibility": "cohort" }, "schema": { "properties": { "accountability": { "type": "string" }, "focus": { "type": "object" }, "goal": { "maxLength": 280, "type": "string" }, "summary": { "type": "object" }, "title": { "maxLength": 280, "type": "string" }, "visibility": { "enum": [ "private", "cohort" ], "type": "string" } }, "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Updated owned plan detail." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Validation error; no partial writes." } }, "summary": "Edit owned plan narrative fields", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}/checkpoints/{checkpoint_id}": { "delete": { "description": "Deletes an owned checkpoint. Repeating a completed delete for the same plan and checkpoint ID returns the same success body.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "checkpoint_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Checkpoint deleted (idempotent)." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Checkpoint does not belong to this plan." } }, "summary": "Delete a checkpoint", "tags": [ "Plans" ] }, "patch": { "description": "Updates ``description`` / ``position`` / ``done`` on an owned checkpoint. Supplying ``week_id`` (a week of the same plan) moves it to that week.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "checkpoint_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "description": "Refine the eval rubric", "done": true }, "schema": { "properties": { "description": { "type": "string" }, "done": { "type": "boolean" }, "position": { "minimum": 0, "type": "integer" }, "week_id": { "type": "integer" } }, "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Updated checkpoint." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Validation error or checkpoint/week not in plan." } }, "summary": "Update or move a checkpoint", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}/deliverables": { "post": { "description": "Adds a plan-level deliverable. ``description`` is required.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "description": "A working eval harness" }, "schema": { "properties": { "description": { "type": "string" }, "done": { "type": "boolean" }, "position": { "minimum": 0, "type": "integer" } }, "required": [ "description" ], "type": "object" } } }, "required": true }, "responses": { "201": { "description": "Created deliverable." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Validation error." } }, "summary": "Create a deliverable", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}/deliverables/{deliverable_id}": { "delete": { "description": "Deletes an owned deliverable.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "deliverable_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Deliverable deleted." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Deliverable does not belong to this plan." } }, "summary": "Delete a deliverable", "tags": [ "Plans" ] }, "patch": { "description": "Updates ``description`` / ``position`` / ``done`` on an owned deliverable.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "deliverable_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "done": true }, "schema": { "properties": { "description": { "type": "string" }, "done": { "type": "boolean" }, "position": { "minimum": 0, "type": "integer" } }, "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Updated deliverable." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Validation error or deliverable not in plan." } }, "summary": "Update a deliverable", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}/markdown": { "get": { "description": "Returns the same member-safe Markdown export used by the browser owner download.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Markdown attachment." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." } }, "summary": "Download owned plan Markdown", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}/next-steps": { "post": { "description": "Adds a plan-level next step. ``description`` is required. ``kind`` is ``pre_sprint`` (default) or ``next_step``.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "description": "Read the tracing docs", "kind": "pre_sprint" }, "schema": { "properties": { "description": { "type": "string" }, "done": { "type": "boolean" }, "kind": { "enum": [ "pre_sprint", "next_step" ], "type": "string" }, "position": { "minimum": 0, "type": "integer" } }, "required": [ "description" ], "type": "object" } } }, "required": true }, "responses": { "201": { "description": "Created next step." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Validation error (e.g. invalid kind)." } }, "summary": "Create a next step", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}/next-steps/{next_step_id}": { "delete": { "description": "Deletes an owned next step.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "next_step_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Next step deleted." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Next step does not belong to this plan." } }, "summary": "Delete a next step", "tags": [ "Plans" ] }, "patch": { "description": "Updates ``description`` / ``kind`` / ``position`` / ``done`` on an owned next step.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "next_step_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "done": true, "kind": "next_step" }, "schema": { "properties": { "description": { "type": "string" }, "done": { "type": "boolean" }, "kind": { "enum": [ "pre_sprint", "next_step" ], "type": "string" }, "position": { "minimum": 0, "type": "integer" } }, "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Updated next step." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Validation error or next step not in plan." } }, "summary": "Update a next step", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}/progress": { "patch": { "description": "Atomically toggles existing checkpoint, deliverable, and next-step completion state. Does not create, delete, reorder, rename, move, or edit descriptions.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "checkpoints": [ { "done": true, "id": 123 } ], "deliverables": [ { "done": false, "id": 456 } ], "next_steps": [ { "done": true, "id": 789 } ] }, "schema": { "properties": { "checkpoints": { "items": { "type": "object" }, "type": "array" }, "deliverables": { "items": { "type": "object" }, "type": "array" }, "next_steps": { "items": { "type": "object" }, "type": "array" } }, "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Updated owned plan progress summary." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Validation error; no partial writes." } }, "summary": "Update owned plan progress", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}/resources": { "post": { "description": "Adds a plan-level resource link. ``title`` is required. ``url`` is optional but must be a valid URL.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "title": "Tracing docs", "url": "https://example.com/tracing" }, "schema": { "properties": { "note": { "type": "string" }, "position": { "minimum": 0, "type": "integer" }, "title": { "maxLength": 300, "type": "string" }, "url": { "maxLength": 600, "type": "string" } }, "required": [ "title" ], "type": "object" } } }, "required": true }, "responses": { "201": { "description": "Created resource." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Validation error (e.g. invalid url)." } }, "summary": "Create a resource", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}/resources/{resource_id}": { "delete": { "description": "Deletes an owned resource.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "resource_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Resource deleted." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Resource does not belong to this plan." } }, "summary": "Delete a resource", "tags": [ "Plans" ] }, "patch": { "description": "Updates ``title`` / ``url`` / ``note`` / ``position`` on an owned resource.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "resource_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "note": "Skim sections 2-4" }, "schema": { "properties": { "note": { "type": "string" }, "position": { "minimum": 0, "type": "integer" }, "title": { "maxLength": 300, "type": "string" }, "url": { "maxLength": 600, "type": "string" } }, "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Updated resource." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Validation error or resource not in plan." } }, "summary": "Update a resource", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}/weeks": { "post": { "description": "Adds a week to the owned plan. ``week_number`` is required, a positive integer, and unique per plan.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "theme": "Build the harness", "week_number": 1 }, "schema": { "properties": { "position": { "minimum": 0, "type": "integer" }, "theme": { "maxLength": 200, "type": "string" }, "week_number": { "minimum": 1, "type": "integer" } }, "required": [ "week_number" ], "type": "object" } } }, "required": true }, "responses": { "201": { "description": "Created week." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Validation error (e.g. duplicate week number)." } }, "summary": "Create a week", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}/weeks/{week_id}": { "delete": { "description": "Deletes an owned week and cascades its checkpoints and week note.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "week_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Week deleted." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Week does not belong to this plan." } }, "summary": "Delete a week", "tags": [ "Plans" ] }, "patch": { "description": "Updates ``week_number`` / ``theme`` / ``position`` on an owned week.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "week_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "position": 2, "theme": "Ship v1" }, "schema": { "properties": { "position": { "minimum": 0, "type": "integer" }, "theme": { "maxLength": 200, "type": "string" }, "week_number": { "minimum": 1, "type": "integer" } }, "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Updated week." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Validation error or week not in this plan." } }, "summary": "Update a week", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}/weeks/{week_id}/checkpoints": { "post": { "description": "Adds a checkpoint to an owned week. ``description`` is required. An optional ``done`` sets initial completion.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "week_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "description": "Draft the eval rubric", "position": 0 }, "schema": { "properties": { "description": { "type": "string" }, "done": { "type": "boolean" }, "position": { "minimum": 0, "type": "integer" } }, "required": [ "description" ], "type": "object" } } }, "required": true }, "responses": { "201": { "description": "Created checkpoint." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Validation error or week not in this plan." } }, "summary": "Create a checkpoint in a week", "tags": [ "Plans" ] } }, "/member-api/v1/plans/{plan_id}/weeks/{week_id}/note": { "delete": { "description": "Removes the week's note if present.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "week_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Week note deleted (idempotent)." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Week does not belong to this plan." } }, "summary": "Delete the week note", "tags": [ "Plans" ] }, "put": { "description": "Creates or replaces the singleton note for an owned week and sets the key owner as author. ``body`` is required.", "parameters": [ { "in": "path", "name": "plan_id", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "week_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "example": { "body": "Shipped the harness; blocked on flaky evals." }, "schema": { "properties": { "body": { "type": "string" } }, "required": [ "body" ], "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Upserted week note." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Missing or invalid member API key." }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Plan not found for this member." }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Validation error or week not in this plan." } }, "summary": "Upsert the week note", "tags": [ "Plans" ] } } }, "security": [ { "tokenAuth": [] } ] }