{ "openapi": "3.0.3", "info": { "title": "MaxGood.work Public BETA API", "version": "1.0.0-beta.1", "summary": "Manage an Avatar's members, Expertise, Facts and User Files, read its interactions, and request Avatar replies, from your own software.", "description": "The MaxGood.work Public BETA API lets Avatar Owners, Avatar Admins and the\ndevelopers who build for them manage an Avatar's members, Expertise,\nFacts and User Files, read its interactions, request Avatar replies on\nbehalf of members, and read public MaxGood.work data from their own\nsoftware. It is available to Essential Avatars and Enterprise Avatars\n(see *Availability by Avatar type*). The Stability & Use Contract, which states\nwhat is stable, how breaking changes are announced and how to get support,\nis at https://blog.maxgood.work/api-documentation-beta.\n\n## Base URL and authentication\n\nEvery path in this reference is relative to `https://api.maxgood.work/v1beta`.\n\nRequests carry an Avatar API key in the `Authorization` header:\n`Authorization: Bearer mgak_.`. An Avatar Owner or\nan Avatar Admin creates a key on the *Account* tab of *Avatar Admin* in the\nMaxGood.work web app. A key is bound to exactly one Avatar and acts only on\nthat Avatar, so a request never names the Avatar. The API is for\nserver-to-server integrations; keep a key out of any code that runs in a\nbrowser or an app.\n\nEvery key carries the `enterprise_api` scope. The scope name is the\nsame on every Avatar type that offers the API; it does not restrict a\nkey to Enterprise Avatars. `POST /tags` and `POST /avatar/respond` check\nit and answer `403` with `{\"message\": \"Insufficient scope.\"}` when it is\nmissing.\n\nThe operations under *Public* (`/public/*`) need no key. They return data\nthat MaxGood.work already publishes.\n\n## Responses\n\nA success is `{\"result\": \"success\", \"response\": }`. A failure is\n`{\"result\": \"failure\", \"response\": \"\"}` and carries an\n`error_code` when the failure has one. A missing, malformed or revoked key\nanswers `401` with `{\"message\": \"\"}`.\n\n## Availability by Avatar type\n\nThe API is available to Essential Avatars and Enterprise Avatars. A key\nof an Avatar whose type does not offer the API answers `403`\n`api_not_available` on every operation under *Avatar*, *Titles*,\n*Chunks*, *Avatar reply*, *Users*, *Facts*, *User Files* and\n*Interactions*, and creating a key for such an Avatar is refused the same\nway. The Avatar Owner and Avatar Admins still list and revoke the keys\nthe Avatar holds, and a key works again when the Avatar's type offers the\nAPI. When the Avatar's type cannot be read, the request is refused with\n`503` `tier_check_failed` and does nothing; retry it.\n\nThese operations are available on Enterprise Avatars only. On an\nEssential Avatar they answer `403`:\n\n| Operation | Answer on an Essential Avatar |\n| --- | --- |\n| `POST /tags`, `GET /users/{user_id}/tags`, `DELETE /users/{user_id}/tags` | `user_tags_not_enabled` |\n| `PUT /users/{user_id}/coach`, and `is_coach: true` on `POST /users` and `PUT /users/{user_id}` | `coach_role_not_enabled` |\n| `GET /facts/{fact_id}/history` | `fact_history_not_enabled` |\n\nEvery other operation in this reference is available on both types. The\nrate limits of each type are under *Rate limits*.\n\n## What each key issuer may do\n\nA key acts with the authority of its issuer, the person who created it,\nas that authority stands when the request arrives, and never does more\nthan its issuer can do in the MaxGood.work web app. MaxGood.work staff\nwho issue a key act as the Avatar Owner. A key whose issuer has left the\nAvatar reaches no member, Fact, User File or interaction: those\noperations answer `404`, the same answer as for something that does not\nexist.\n\n**On every Avatar type**\n\n| Operation | Keys that may do it |\n| --- | --- |\n| Change `is_admin` or `is_coach`, or remove an Avatar Admin or Avatar Coach | Avatar Owner, MaxGood.work staff |\n| Archive or unarchive a member | Avatar Owner, Avatar Admin, MaxGood.work staff |\n| Read, add, change, hide and delete Facts | Avatar Owner and MaxGood.work staff: every Fact. Avatar Admin: every Fact an Avatar Coach did not add. Avatar Coach, on an Enterprise Avatar: the Facts they added about their own clients |\n| Read or write a member's `notes` and `structured_data`, on an Avatar type without the Avatar Coach role | Avatar Owner, Avatar Admin, MaxGood.work staff; a key whose issuer left the Avatar or is a plain member reads them as `null` with `notes_withheld` or `structured_data_withheld` `true` |\n| Read, upload and delete a member's User Files | Avatar Owner, Avatar Admin, MaxGood.work staff. On an Enterprise Avatar, the Avatar Owner, MaxGood.work staff and an Avatar Admin who is the member's Avatar Coach; any other Avatar Admin lists the files without their names and may not open, upload or delete them (`403` `user_files_owner_coach_only`). A key issued by an Avatar Coach who is not also an Avatar Admin, while the Avatar Coach's account has a valid subscription, reads and changes the User Files of the clients assigned to them and reads none of any other member's. An uploaded file is stored as uploaded by the key's issuer |\n| Read interactions | The interactions the issuer reads in the MaxGood.work web app. The Avatar Owner and MaxGood.work staff read every member's. On an Avatar type without the Avatar Coach role, an Avatar Admin reads every member's except those of the Avatar Owner and other Avatar Admins. On an Enterprise Avatar, an Avatar Admin reads their own and their clients', and an Avatar Coach reads their clients' |\n\n**On an Enterprise Avatar**, whose Avatar type has the Avatar Coach role:\n\n| Operation | Keys that may do it |\n| --- | --- |\n| Read or write a member's `notes` in full | Avatar Owner, MaxGood.work staff |\n| Read or write a member's `structured_data` in full | Avatar Owner, Avatar Admin, MaxGood.work staff |\n| Add, read and remove a member's tags | Avatar Owner, Avatar Admin, MaxGood.work staff |\n| Assign an Avatar Coach (`PUT /users/{user_id}/coach`) | Avatar Owner and MaxGood.work staff for any member but the Avatar Owner; an Avatar Admin for members who are not Avatar Admins, and never naming the key's issuer as the Avatar Coach |\n| Request a reply for a member (`POST /avatar/respond`) | Avatar Owner, the member's Avatar Coach, MaxGood.work staff; any key for its own issuer |\n\nWith any other key, a read of `notes` or `structured_data` returns `null`\nwith `notes_withheld` or `structured_data_withheld` set to `true` and the\nsize in `notes_meta` or `structured_data_meta`, and a request that sends\nthe field returns `403` (`notes_owner_key_only` or\n`user_data_admin_key_only`), also when the value sent equals the stored\none. A key whose issuer is not the Avatar Owner or an Avatar Admin\nanswers `403` `not_org_admin` to a request to tag, archive or unarchive a\nmember. The Avatar Owner is never removed through the API, on any Avatar\ntype.\n\n**On an Essential Avatar**, any key of the Avatar reads and writes\n`notes` and `structured_data` and requests replies for any member. A key\nthe Avatar Owner or MaxGood.work staff did not issue changes no role:\nthe request returns `403` `role_change_owner_key_only`. No key sets\n`is_coach` to `true` there; that request returns `403`\n`coach_role_not_enabled`. A refusal writes nothing and is recorded in the\nAvatar's audit log.\n\n## Field save limits\n\n| Field | Limit |\n| --- | --- |\n| `name` | 200 characters |\n| `role`, `expertise`, `industry`, `goal`, `problem` | 1,000 characters each |\n| `language` | 100 characters |\n| `notes` | 2,500 characters |\n| `structured_data` | a JSON object of at most 262,144 characters of compact JSON (no whitespace between tokens) |\n\nThe profile fields apply when a request creates a new user, because an\nexisting user's profile is kept. `notes` and `structured_data` apply to\nevery write. A value over its limit returns `400` with `error_code`\n`field_too_long`, `field_too_large` or `field_not_object`, together with\n`field` and `max_length`, and nothing is written. Values are never\ntruncated. A stored value that is already over its limit is accepted again\nunchanged and may be replaced by a value no larger than it. When the limits\ncannot be read, the request returns `503` `field_limits_unavailable`;\nnothing is written and the request is safe to retry.\n\n## Rate limits\n\nThe Avatar's type sets four limits, and MaxGood.work can change them for\na type. The standard values are:\n\n| Limit | Enterprise Avatar | Essential Avatar |\n| --- | --- | --- |\n| Member-data reads (`GET /facts` and `GET /facts/{fact_id}`, the User Files reads, the interaction reads and `GET /users/{user_id}/tags`), per key in each minute | 120 | 60 |\n| Fact writes (`POST /facts`, `PATCH /facts/{fact_id}`, `DELETE /facts/{fact_id}`), per Avatar in a rolling hour | 600 | 300 |\n| User File uploads (`POST /users/{user_id}/files`), per Avatar in a rolling hour | 100 | 50 |\n| Invitations (`POST /users` and `POST /users/batch`), per Avatar in a rolling hour | 200 | 100 |\n\nOver a limit, the operation returns `429` with `error_code`\n`rate_limited`, a `Retry-After` header in seconds, and `retry_after_seconds`,\n`limit` and `window_seconds` in the body, and does nothing. A read limit\ncounts the requests one key made in the current minute. A write limit\ncounts what all the keys of the Avatar did in the last 60 minutes.\n\n- The *Public* operations (`/public/*`) are limited per client IP\n address. Over the limit they return `429` with a `Retry-After` header\n in seconds.\n\n## Pagination\n\n`GET /users` and `GET /facts` take `page` and `page_size`; a `page_size`\nabove 200 is lowered to 200. `GET /users/{user_id}/files`,\n`GET /users/{user_id}/files/{file_id}/chunks`, `GET /interactions` and\n`GET /users/{user_id}/interactions` take `page` and `page_size` up to\n100; a value outside the range returns `400`. Every other list operation\nreturns all of its items in one response.\n\n## Error codes\n\n| `error_code` | HTTP status | Meaning |\n| --- | --- | --- |\n| `field_too_long` | 400 | A text field is over its save limit. |\n| `field_too_large` | 400 | `structured_data` is over its save limit. |\n| `field_not_object` | 400 | `structured_data` is not a JSON object. |\n| `invalid_request` | 400 | The body of a Fact request is not a JSON object, or a `PATCH` sends neither `status` nor `text`. |\n| `fact_text_required` | 400 | A Fact's `text` is missing, empty or not text. |\n| `fact_too_long` | 400 | A Fact's `text` is over the Avatar type's limit per Fact (the body carries `token_count` and `max_tokens`) or over 2,000 characters (`max_characters`). |\n| `invalid_status` | 400 | A Fact's `status` is not `active` or `hidden`, or the `status` filter is not `active`, `hidden` or `all`. |\n| `invalid_scope` | 400 | The `scope` filter of `GET /facts` is not `avatar` or `member`, or `scope` `avatar` is sent with a `user_id`. |\n| `tag_name_required` | 400 | `DELETE /users/{user_id}/tags` has no `name` query parameter. |\n| `tag_name_invalid` | 400 | The `name` is over 2,000 characters or holds a character a tag name cannot. |\n| `invalid_paging` | 400 | `page` or `page_size` of a User Files list is outside its range. |\n| `invalid_page` | 400 | `page` of an interaction list is not a whole number of at least 1. |\n| `invalid_page_size` | 400 | `page_size` of an interaction list is not a whole number from 1 to 100. |\n| `invalid_since` | 400 | `since` is not an ISO 8601 date or timestamp. |\n| `missing_file` | 400 | The upload has no `file` part. |\n| `empty_file` | 400 | The uploaded file is empty. |\n| `file_type_not_allowed` | 400 | The file's extension is not one of the allowed extensions. |\n| `no_text_extracted` | 400 | No text could be read from the file. |\n| `coach_user_id_required` | 400 | The body of `PUT /users/{user_id}/coach` is not `{\"coach_user_id\": \"\"}` or `{\"coach_user_id\": null}`. |\n| `coach_is_client` | 400 | The Avatar Coach named is the member. |\n| `not_a_coach` | 400 | The Avatar Coach named is not an active member of the Avatar holding the Avatar Coach role. |\n| `api_not_available` | 403 | The Avatar's type does not offer the API. |\n| `user_tags_not_enabled` | 403 | The Avatar's type has no member tags. |\n| `fact_history_not_enabled` | 403 | The Avatar's type keeps no edit history of Facts. |\n| `facts_disabled` | 403 | The Avatar's type has no Facts. |\n| `fact_view_only` | 403 | The key's issuer may read the Fact and may not change it. |\n| `fact_clients_only` | 403 | The key's issuer is an Avatar Coach, who adds Facts only about their own clients. |\n| `user_files_owner_coach_only` | 403 | The key's issuer lists the member's User Files without their names and may not open, upload or delete them. |\n| `owner`, `admin`, `support_avatar`, `not_admin` | 403 | `POST /users/{user_id}/archive` refuses the member (the Avatar Owner, an Avatar Admin, a member of the MaxGood.work User Support Avatar) or the key's issuer (not the Avatar Owner or an Avatar Admin). The code names the reason. |\n| `role_change_owner_key_only` | 403 | The request changes `is_admin` or `is_coach`, or removes an Avatar Admin or Avatar Coach, with a key the Avatar Owner or MaxGood.work staff did not issue. This holds on every Avatar type. |\n| `coach_role_not_enabled` | 403 | The Avatar's type has no Avatar Coach role, so `is_coach` cannot be set to `true` and no Avatar Coach can be assigned. |\n| `notes_owner_key_only` | 403 | The request sends `notes` with a key the Avatar Owner or MaxGood.work staff did not issue. |\n| `user_data_admin_key_only` | 403 | The request sends `structured_data` with a key the Avatar Owner, an Avatar Admin or MaxGood.work staff did not issue. |\n| `owner_not_removable` | 403 | The member is the Avatar Owner. |\n| `not_org_admin` | 403 | The key's issuer is not MaxGood.work staff, the current Avatar Owner or a current Avatar Admin of the Avatar, so the key assigns no Avatar Coach and tags no member. |\n| `owner_has_no_coach` | 403 | The member is the Avatar Owner. |\n| `coach_assign_owner_only` | 403 | A key issued by an Avatar Admin names an Avatar Admin as the member, or names the key's issuer as the Avatar Coach. |\n| `interaction_access_required` | 403 | The key's issuer may not see the member's interactions, so the key cannot request a reply for the member. |\n| `agreement_required` | 403 | The member has not accepted the Avatar's terms and conditions or agreement. |\n| `invalid_batch` | 400 | The body of `POST /users/batch` is not `{\"users\": [...]}` with 1 to 100 rows. |\n| `avatar_full` | 409 | `POST /users/batch` lists more people than the Avatar has open seats for, or `POST /users/{user_id}/unarchive` finds no open seat. Nobody was added or restored; the body carries `needed` and `open_seats`. |\n| `deleted` | 409 | The member's account was erased, so `archive` and `unarchive` change nothing. |\n| `fact_budget_exceeded` | 409 | The write would pass the total limit of the Avatar's active Facts (the body carries `active_tokens` and `max_tokens`). |\n| `file_too_large` | 413 | The uploaded file is over the size limit that `GET /users/{user_id}/files` reports in `limits`. |\n| `rate_limited` | 429 | A limit of the Avatar's type is reached. The body carries `retry_after_seconds`, `limit` and `window_seconds`, and the `Retry-After` header gives the seconds to wait. |\n| `field_limits_unavailable` | 503 | The save limits could not be read. Retry the request. |\n| `tier_check_failed` | 503 | The Avatar type's settings could not be read, so the request did nothing. Retry the request. |\n| `extraction_failed`, `embedding_failed`, `storage_failed`, `user_documents_unavailable` | 503 | A User File upload could not be completed; nothing is stored. Retry the upload. |\n\nFailures without an `error_code`: `400` for a malformed request, `401` for\na key problem, `403` `{\"message\": \"Insufficient scope.\"}` for a key without\nthe `enterprise_api` scope, `404` for a resource that does not exist, that\nbelongs to another Avatar or that the key's issuer may not see, `409` for a\nconflict, `413` for an upload over 25 MB and `502` when an Avatar returns no\nreply. The `response` field holds the message. A `404` for a Fact carries\n`fact_not_found` or `user_not_found`.\n", "contact": { "name": "MaxGood.work BETA API support", "url": "https://discord.gg/xhkwCfYurk" }, "license": { "name": "Proprietary \u2014 MaxGood.work Stability & Use Contract", "url": "https://blog.maxgood.work/api-documentation-beta" } }, "servers": [ { "url": "https://api.maxgood.work/v1beta", "description": "Production" }, { "url": "https://stageapi.maxgood.work/v1beta", "description": "Staging" } ], "security": [ { "AvatarApiKey": [] } ], "tags": [ { "name": "Avatar", "description": "The Avatar your key is bound to: its identity, search over its\nExpertise, and tags on its members (Enterprise Avatars).\n" }, { "name": "Titles", "description": "A title groups the chunks of one body of Expertise, for example\n\"Coaching for Scrum Masters\". Chunks belong to a title, so a title\nexists before content is uploaded to it. These operations create,\nrename, enable, disable and delete titles, upload content, and manage\na title's documents and footer.\n" }, { "name": "Chunks", "description": "A chunk is the unit the Avatar retrieves. Editing a chunk embeds its\nnew text again; deleting a chunk removes its text and embedding.\n" }, { "name": "Avatar reply", "description": "The Avatar's reply to a message from one of its members. The reply\nis the one the member would receive in the MaxGood.work web app, Slack,\nTeams, Discord or email.\n" }, { "name": "Users", "description": "The members of your Avatar: list, invite, read, update per-Avatar\nfields, assign an Avatar Coach and remove. These operations change only\nyour Avatar's relationship to a user, including whether the member is\narchived. A user's identity (`name`, `role`,\n`expertise`, `industry`, `goal`, `problem`, `language`) is set when\n`POST /users` creates the user; an existing user's identity is kept,\nand the user's memberships in other Avatars are untouched. Which key\nmay read or write which fields is in the introduction.\n" }, { "name": "Facts", "description": "A Fact is one short statement the Avatar keeps about the Avatar itself\n(`scope` `avatar`) or about one member (`scope` `member`) and weaves\ninto its replies. These operations list, add, reword, hide and delete\nFacts as the key's issuer can in the MaxGood.work web app. The limits\nper Fact and in total come from the Avatar's type.\n" }, { "name": "User Files", "description": "A User File is a document the Avatar's Owner and Avatar Admins keep\nabout one member; the Avatar reads its text when it answers that\nmember. These operations list, upload and delete a member's User Files\nand read the text the Avatar extracted from them. The original file is\nnever returned.\n" }, { "name": "Interactions", "description": "An interaction is one stored exchange between a member and the Avatar:\nthe member's message and the Avatar's reply. These operations read the\ninteractions the key's issuer can read in the MaxGood.work web app,\nnewest first.\n" }, { "name": "Public", "description": "The public read tier (`/public/*`). These operations need no API key\nand return data that MaxGood.work already publishes: publicly listed\nAvatars, the free Avatars, public Foundation Titles, the Licensed\nAuthor directory and platform statistics. They are limited per client\nIP address, and browsers may call them from any origin.\n" } ], "components": { "securitySchemes": { "AvatarApiKey": { "type": "http", "scheme": "bearer", "bearerFormat": "mgak_.", "description": "An Avatar API key created on the *Account* tab of *Avatar Admin* in\nthe MaxGood.work web app, for an Essential Avatar or an Enterprise\nAvatar. The key carries the `enterprise_api` scope, the one scope\nevery key holds, and is bound to one Avatar.\n" } }, "schemas": { "SuccessEnvelope": { "type": "object", "required": [ "result", "response" ], "properties": { "result": { "type": "string", "enum": [ "success" ] }, "response": { "description": "The payload of the operation." } } }, "FailureEnvelope": { "type": "object", "required": [ "result", "response" ], "properties": { "result": { "type": "string", "enum": [ "failure" ] }, "response": { "type": "string", "description": "The message of the failure." }, "error_code": { "type": "string", "description": "The machine-readable code of the failure, from the error-code table in the introduction. Present on the failures that carry one." }, "field": { "type": "string", "description": "The request field a save-limit refusal names, for example `name`, `notes` or `structured_data`." }, "max_length": { "type": "integer", "description": "The save limit of `field`, in characters. For `structured_data` it is characters of compact JSON." }, "error": { "type": "string", "description": "Repeats `error_code` on an `agreement_required` refusal and on a refusal of `archive` or `unarchive`." }, "message": { "type": "string", "description": "Repeats `response` on a refusal of `archive` or `unarchive`." }, "retry_after_seconds": { "type": "integer", "description": "On a `rate_limited` refusal, the seconds to wait before the next request." }, "limit": { "type": "integer", "description": "On a `rate_limited` refusal, the limit that was reached." }, "window_seconds": { "type": "integer", "description": "On a `rate_limited` refusal, the length in seconds of the window the limit counts over." }, "needed": { "type": "integer", "description": "On an `avatar_full` refusal, the seats the request needs." }, "open_seats": { "type": "integer", "description": "On an `avatar_full` refusal, the seats the Avatar has open." }, "token_count": { "type": "integer", "description": "On a `fact_too_long` refusal, the tokens in the text sent." }, "max_tokens": { "type": "integer", "description": "On a `fact_too_long` refusal, the tokens one Fact may hold; on a `fact_budget_exceeded` refusal, the total the Avatar's active Facts may hold." }, "max_characters": { "type": "integer", "description": "On a `fact_too_long` refusal for a text over the character limit, that limit." }, "active_tokens": { "type": "integer", "description": "On a `fact_budget_exceeded` refusal, the tokens the Avatar's active Facts hold." }, "agreement_url": { "type": "string", "description": "On an `agreement_required` refusal, the page in the MaxGood.work web app where the member reads and accepts the Avatar's terms and conditions or agreement." } } }, "ScopeFailure": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string", "description": "The reason, for example `Insufficient scope.`" } } }, "Title": { "type": "object", "properties": { "title_id": { "type": "string" }, "title_name": { "type": "string" }, "is_enabled": { "type": "boolean", "description": "The Avatar retrieves from the title only while it is enabled." }, "count": { "type": "integer", "description": "The number of active chunks in the title." }, "created_at": { "type": "string", "format": "date-time", "description": "When the title was created, as an ISO 8601 timestamp in UTC, for\nexample `2026-11-14T15:04:05Z`.\n" }, "is_linked_from_other_organization": { "type": "boolean", "description": "`true` when the title is shared into this Avatar from another\nAvatar, and `false` for a title this Avatar owns. A linked title\nis read-only through this API: only the list endpoint returns it,\nand every other title or chunk operation on it, `GET`, `PUT` and\n`DELETE` on the title, `PUT` on its `is_enabled`, upload,\ndocuments, chunks and footer, returns `404`, so you cannot upload\nto it, rename it, delete it or change its content. Its\n`is_enabled` value is set by the Avatar Owner in the MaxGood.work\nweb app, and the Avatar uses the title in its replies only while\nthat value is `true`. Titles with a value of `false` are the ones\nthat accept uploads and edits through this API.\n" } } }, "Document": { "type": "object", "properties": { "document_id": { "type": "string" }, "filename": { "type": "string", "description": "The file name. A deleted document carries `This document has been deleted.`" }, "filetype": { "type": "string", "description": "The file extension." }, "mimetype": { "type": "string" }, "filesize": { "type": "integer", "format": "int64", "description": "Size in bytes." }, "upload_date": { "type": "number", "format": "double", "description": "Upload time in seconds since the Unix epoch." }, "is_active": { "type": "boolean", "description": "`false` for a document of a deleted title." }, "download_url": { "type": "string", "description": "A link that downloads the original file for 15 minutes. Empty for an inactive document and when the original file is not available." } } }, "ChunkSummary": { "type": "object", "properties": { "chunk_id": { "type": "string" }, "chunk_name": { "type": "string" }, "chunk_text": { "type": "string", "description": "The text of the chunk, as Markdown." } } }, "RagChunk": { "type": "object", "properties": { "chunk_id": { "type": "string" }, "score": { "type": "number", "description": "Similarity of the chunk to the query. Higher is closer." }, "text": { "type": "string", "description": "The text of the chunk, as Markdown." } } }, "Tag": { "type": "object", "required": [ "name", "description", "source" ], "additionalProperties": false, "properties": { "name": { "type": "string", "description": "The tag name. It cannot contain `{`, `}`, `[`, `]`, `<`, `>`, `\"` or `'`. The name and description together are at most 2,000 characters." }, "description": { "type": "string", "description": "What the tag means. It cannot contain the characters a name cannot." }, "source": { "type": "string", "description": "Where the tag came from, for example the name of your system." } } }, "UserMembership": { "type": "object", "description": "A user as your Avatar sees them: the user's identity and your\nAvatar's flags and data about the membership. Every field is always\npresent. Whether `notes` and `structured_data` are readable follows\nthe key's issuer, as the introduction states.\n", "required": [ "user_id", "email", "name", "role", "expertise", "industry", "goal", "problem", "language", "is_admin", "is_coach", "is_owner", "coach_user_id", "status", "archived_at", "license_expiry_date", "notes", "notes_withheld", "notes_meta", "structured_data", "structured_data_withheld", "structured_data_meta", "joined_at" ], "properties": { "user_id": { "type": "string" }, "email": { "type": "string", "format": "email" }, "name": { "type": "string" }, "role": { "type": "string", "nullable": true }, "expertise": { "type": "string", "nullable": true }, "industry": { "type": "string", "nullable": true }, "goal": { "type": "string", "nullable": true }, "problem": { "type": "string", "nullable": true }, "language": { "type": "string", "nullable": true }, "is_admin": { "type": "boolean", "description": "The user is an Avatar Admin of your Avatar. On an Enterprise\nAvatar, making a member an Avatar Admin also makes them an Avatar\nCoach.\n" }, "is_coach": { "type": "boolean", "description": "The user is an Avatar Coach: they see the interactions, notes and\nUser Files of the clients assigned to them (see `coach_user_id`)\nand carry a \"Coach\" badge in the MaxGood.work web app. Making a\nmember an Avatar Admin also makes them an Avatar Coach, even when\nthe same request sends `is_coach: false`. Removing Avatar Admin\nleaves `is_coach` as it is. Clearing `is_coach`, or removing the\nAvatar Coach from the Avatar, leaves that Avatar Coach's clients\nwith no Avatar Coach. On an Avatar type without the Avatar Coach\nrole, a stored `true` shows the badge and grants no access.\n" }, "is_owner": { "type": "boolean", "description": "The user is the Avatar Owner." }, "coach_user_id": { "type": "string", "nullable": true, "description": "The user id of the member's Avatar Coach, or null. A member has at\nmost one Avatar Coach, who is an active Avatar Coach of the same\nAvatar; the Avatar Owner has none. It is always null on an Avatar\ntype without the Avatar Coach role. Set it with\n`PUT /users/{user_id}/coach`.\n" }, "status": { "type": "string", "enum": [ "active", "licence_expired", "archived" ], "description": "The member's state in your Avatar. `licence_expired` applies when\n`license_expiry_date` has passed. `archived` applies when an\nAvatar Owner or Avatar Admin paused the member (in the MaxGood.work\nweb app or with `POST /users/{user_id}/archive`): everything stored\nabout them stays, they cannot chat, and they hold no seat. A\nremoved member and a member whose account was erased are not\nreturned.\n" }, "archived_at": { "type": "string", "format": "date-time", "nullable": true, "description": "When the member was archived, or null when the member is not archived." }, "license_expiry_date": { "type": "string", "format": "date-time", "nullable": true, "description": "When the member's access to your Avatar ends, or null for no end date." }, "notes": { "type": "string", "nullable": true, "description": "Your Avatar's free-form note about the member, or null when there is none or the key may not read it." }, "notes_withheld": { "type": "boolean", "description": "`true` when the key may not read `notes`. `notes` is then null whatever is stored." }, "notes_meta": { "type": "object", "description": "What the notes are, without their text. Present for every key.", "properties": { "chars": { "type": "integer", "description": "Characters of the stored notes; `0` when there are none." }, "updated_at": { "type": "string", "format": "date-time", "nullable": true, "description": "When the notes last changed; null when not recorded." }, "updated_by_role": { "type": "string", "nullable": true, "enum": [ "owner", "admin", "coach", "staff", "api", "system", null ], "description": "The role of whoever last changed the notes: the Avatar Owner,\nan Avatar Admin, an Avatar Coach, MaxGood.work staff, an API\nkey (`api`, every change made through this API) or the\nplatform itself (`system`). Null when not recorded.\n" } } }, "structured_data": { "type": "object", "nullable": true, "description": "Your Avatar's free-form JSON metadata about the member, or null\nwhen there is none or the key may not read it.\n" }, "structured_data_withheld": { "type": "boolean", "description": "`true` when the key may not read `structured_data`. `structured_data` is then null whatever is stored." }, "structured_data_meta": { "type": "object", "description": "What the structured data is, without its content. Present for every key.", "properties": { "chars": { "type": "integer", "description": "Characters of the stored value's compact JSON; `0` when there is none." } } }, "joined_at": { "type": "string", "format": "date-time", "description": "When the member joined your Avatar." } } }, "AvatarReply": { "type": "object", "properties": { "response": { "type": "string", "description": "The Avatar's reply, as Markdown. Foundation content that the reply\ncites is credited in the text according to each Licensed Author's\nattribution preference; show the credit to the member. When the\nAvatar displays references and the reply cites Expertise or the\nmember's own profile file, the text ends with a\n`[References]: , ` line.\n" }, "interaction_id": { "type": "string", "description": "The id of the interaction stored for this reply. The API assigns it; requests do not set it." }, "partner_content_ids": { "type": "array", "items": { "type": "string" }, "description": "The links to the Expertise chunks and the member's profile-file\nchunks that the reply cites, each an absolute URL on the\nMaxGood.work web app ending in `/reference/`. The list\nis empty when the Avatar displays references, because the links\nare in the `[References]` line of `response`. A profile-file link\nopens only for that member. Foundation content is credited in\n`response`, and User Files, the notes an Avatar's team keeps about\na member, are never listed.\n" } } }, "Fact": { "type": "object", "description": "One Fact, as the key's issuer sees it.", "required": [ "id", "scope", "user_id", "text", "token_count", "status", "source", "created_by_user_id", "created_at", "updated_at", "version_count", "access" ], "properties": { "id": { "type": "integer", "description": "The Fact's id." }, "scope": { "type": "string", "enum": [ "avatar", "member" ], "description": "`avatar` for a Fact about the Avatar, `member` for a Fact about one member." }, "user_id": { "type": "string", "nullable": true, "description": "The member a `member` Fact is about; null for an `avatar` Fact." }, "text": { "type": "string", "description": "The Fact's text." }, "token_count": { "type": "integer", "description": "The tokens the text uses against the Avatar type's limits." }, "status": { "type": "string", "enum": [ "active", "hidden" ], "description": "Lowercase. The Avatar weaves an `active` Fact into its replies and ignores a `hidden` one." }, "source": { "type": "string", "nullable": true, "description": "Who added the Fact, lowercase: for example `owner`, `admin` or `coach`. A key an Avatar Admin issued never sees a Fact whose source is `coach`. A Fact added through the API carries the role of the key's issuer." }, "created_by_user_id": { "type": "string", "nullable": true, "description": "The user id of whoever added the Fact; null when the key's issuer may not see who it was." }, "created_at": { "type": "string", "format": "date-time", "nullable": true, "description": "When the Fact was added, as an ISO-8601 timestamp in UTC." }, "updated_at": { "type": "string", "format": "date-time", "nullable": true, "description": "When the Fact last changed, as an ISO-8601 timestamp in UTC." }, "version_count": { "type": "integer", "nullable": true, "description": "The number of edits kept for the Fact on an Avatar type that keeps an edit history; null on other types." }, "access": { "type": "string", "enum": [ "edit", "view" ], "description": "`edit` when the key's issuer may change the Fact, `view` when the issuer may read it only." } } }, "FactLimits": { "type": "object", "description": "The limits that apply to the Avatar's Facts.", "properties": { "per_fact_tokens": { "type": "integer", "nullable": true, "description": "The most tokens one Fact may hold." }, "total_tokens": { "type": "integer", "nullable": true, "description": "The most tokens the Avatar's active Facts may hold together." }, "active_tokens": { "type": "integer", "description": "The tokens the Avatar's active Facts hold now." }, "history_tracked": { "type": "boolean", "description": "`true` when the Avatar's type keeps the edit history of Facts." } } }, "FactVersion": { "type": "object", "properties": { "id": { "type": "integer" }, "text": { "type": "string", "description": "The Fact's text in this version." }, "token_count": { "type": "integer" }, "edited_at": { "type": "string", "format": "date-time", "nullable": true, "description": "When the Fact was edited into this version, as an ISO-8601 timestamp in UTC." }, "edited_by_user_id": { "type": "string", "nullable": true, "description": "Who made the edit; null when the key's issuer may not see who it was." }, "edit_source": { "type": "string", "nullable": true, "description": "The role of the editor, lowercase: for example `owner`, `admin` or `coach`." } } }, "MemberTag": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "source": { "type": "string", "description": "Where the tag came from, for example the name of your system." }, "applied_at": { "type": "string", "format": "date-time", "nullable": true, "description": "When the tag was applied; null when not recorded." } } }, "UserFile": { "type": "object", "description": "One User File of a member.", "properties": { "file_id": { "type": "string" }, "filename": { "type": "string", "nullable": true, "description": "The file name; null when the key's issuer lists the files without their names." }, "extension": { "type": "string", "description": "The file extension without the dot." }, "content_type": { "type": "string", "nullable": true, "description": "The media type; null when the key's issuer lists the files without their names." }, "size_bytes": { "type": "integer", "format": "int64" }, "chunk_count": { "type": "integer", "description": "The number of text chunks the Avatar extracted from the file." }, "uploaded_at": { "type": "string", "format": "date-time", "nullable": true } } }, "UserFileChunk": { "type": "object", "properties": { "chunk_id": { "type": "string" }, "position": { "type": "integer", "description": "The chunk's place in the file, from the start." }, "text": { "type": "string", "description": "The text the Avatar extracted." }, "token_count": { "type": "integer" } } }, "Interaction": { "type": "object", "description": "One interaction. A row the key's issuer reads as metadata only, and a\nrow of a member who left the Avatar under a retention model that\nkeeps their interactions as metadata, has `access` `metadata`,\n`user_id` null where the member is not named, and no `user_text` or\n`reply`.\n", "required": [ "id", "org_id", "user_id", "created_at", "access", "references" ], "properties": { "id": { "type": "string" }, "org_id": { "type": "string", "description": "The Avatar's id." }, "user_id": { "type": "string", "nullable": true, "description": "The member the interaction belongs to." }, "created_at": { "type": "string", "format": "date-time", "description": "When the interaction was stored, in UTC." }, "access": { "type": "string", "enum": [ "content", "metadata" ] }, "references": { "type": "array", "items": { "type": "string" }, "description": "The ids of the Expertise chunks the reply cited, as the MaxGood.work web app shows them to the Avatar's Owner and Avatar Admins." }, "user_text": { "type": "string", "description": "The member's message. Present when `access` is `content`." }, "reply": { "type": "string", "description": "The Avatar's reply. Present when `access` is `content`." } } }, "InteractionSummary": { "type": "object", "description": "What a key whose issuer reads a member's interactions as metadata\nonly receives instead of the text: counts and sizes, with the\nExpertise the Avatar cited and no words from the interactions.\n", "properties": { "user_id": { "type": "string" }, "org_id": { "type": "string" }, "access": { "type": "string", "enum": [ "metadata" ] }, "interaction_count": { "type": "integer", "description": "The member's interactions with the Avatar." }, "characters": { "type": "integer", "description": "The characters in those interactions." }, "tokens": { "type": "integer", "description": "The tokens in those interactions." }, "last_interaction_at": { "type": "string", "nullable": true, "description": "When the member last interacted with the Avatar." }, "cited_chunks_total": { "type": "integer", "description": "The chunks the Avatar cited in its replies to the member." }, "cited_titles": { "type": "array", "description": "The titles the cited chunks belong to, most cited first.", "items": { "type": "object", "properties": { "title_id": { "type": "string" }, "title": { "type": "string" }, "chunks": { "type": "integer" }, "retrieval_source": { "type": "string" } } } }, "unattributed_chunks": { "type": "integer", "description": "Cited chunks whose title the summary does not name because its author asked for no attribution." }, "user_file_chunks": { "type": "integer", "description": "Cited chunks that came from User Files." }, "other_chunks": { "type": "integer", "description": "Cited chunks from sources the summary does not name." }, "hidden_title_chunks": { "type": "integer", "description": "Cited chunks whose title the Avatar hides." }, "titles_hidden": { "type": "boolean", "description": "`true` when the Avatar hides its titles, so `cited_titles` is empty." } } } }, "examples": { "UserMembershipExample": { "summary": "A member of an Enterprise Avatar, read with the Avatar Owner's key", "value": { "result": "success", "response": { "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27", "email": "maria.santos@example.com", "name": "Maria Santos", "role": "Team lead", "expertise": "Agile coaching", "industry": "Software", "goal": "Plan sprints in half the time", "problem": "Planning meetings run long", "language": "English", "is_admin": false, "is_coach": false, "is_owner": false, "coach_user_id": "3b9e1f6a2c8d4e57b0a1c9d8e7f64a35", "status": "active", "license_expiry_date": "2027-06-30T00:00:00+00:00", "notes": "Prefers morning sessions.", "notes_withheld": false, "notes_meta": { "chars": 25, "updated_at": "2026-10-02T14:21:07+00:00", "updated_by_role": "api" }, "structured_data": { "cohort": "2026-Q4" }, "structured_data_withheld": false, "structured_data_meta": { "chars": 20 }, "joined_at": "2026-09-14T16:05:33+00:00" } } }, "FactExample": { "summary": "A Fact about a member", "value": { "result": "success", "response": { "id": 412, "scope": "member", "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27", "text": "Maria prefers short, concrete action steps.", "token_count": 9, "status": "active", "source": "owner", "created_by_user_id": "3b9e1f6a2c8d4e57b0a1c9d8e7f64a35", "created_at": "2026-11-10T15:04:05+00:00", "updated_at": "2026-11-10T15:04:05+00:00", "version_count": 0, "access": "edit" } } } }, "responses": { "Unauthorized": { "description": "The API key is missing, malformed or revoked.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScopeFailure" }, "example": { "message": "Invalid API key." } } } }, "Forbidden": { "description": "The key lacks the `enterprise_api` scope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScopeFailure" }, "example": { "message": "Insufficient scope." } } } }, "ValidationError": { "description": "The request body or parameters are not valid.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Missing title." } } } }, "TitleNotFound": { "description": "The title does not exist, belongs to another Avatar or is linked from another Avatar.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Title not found." } } } }, "ChunkNotFound": { "description": "The chunk does not exist or belongs to another Avatar.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Chunk not found." } } } }, "UserNotFound": { "description": "The user does not exist or is not an active member of your Avatar.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "User not found." } } } }, "FactNotFound": { "description": "The Fact does not exist, belongs to another Avatar, or the key's issuer may not see it.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Fact not found.", "error_code": "fact_not_found" } } } }, "UserFilesOwnerCoachOnly": { "description": "The key's issuer may list the member's User Files without their names and may not open, upload or delete them.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "The key's issuer may list this member's User Files without their names but may not open, upload or delete them.", "error_code": "user_files_owner_coach_only" } } } }, "ApiNotAvailable": { "description": "The Avatar's type does not offer the API. The key works again when the Avatar's type offers it.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "API keys are not available for this Avatar type.", "error_code": "api_not_available" } } } }, "RateLimited": { "description": "A limit of the Avatar's type is reached. `Retry-After` gives the seconds to wait.", "headers": { "Retry-After": { "schema": { "type": "integer" }, "description": "Seconds until you may retry." } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Too many requests. Try again after the wait in Retry-After.", "error_code": "rate_limited", "retry_after_seconds": 12, "limit": 120, "window_seconds": 60 } } } }, "TierCheckUnavailable": { "description": "The Avatar type's settings could not be read, so the request did nothing. Retry the request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "The request could not be checked just now. Try again shortly.", "error_code": "tier_check_failed" } } } }, "PayloadTooLarge": { "description": "The upload is over 25 MB.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Upload exceeds the maximum allowed size." } } } }, "FieldLimitsUnavailable": { "description": "The save limits could not be read; nothing was written. Retry the request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Your changes could not be saved right now. Please try again in a moment.", "error_code": "field_limits_unavailable" } } } }, "PublicRateLimited": { "description": "The per-IP limit of the public read tier is reached. `Retry-After` gives the seconds to wait.", "headers": { "Retry-After": { "schema": { "type": "integer" }, "description": "Seconds until you may retry." } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Rate limit exceeded. Please retry shortly." } } } } } }, "paths": { "/organization": { "get": { "tags": [ "Avatar" ], "operationId": "getOrganization", "summary": "Get the Avatar of the key", "description": "Returns the id and name of the Avatar the key is bound to. A `200`\nshows that the key is valid and not revoked, that the Avatar's type\noffers the API, and which Avatar it acts on. A key of an Avatar whose\ntype does not offer the API gets `403` `api_not_available`, as every\noperation answers.\n", "responses": { "200": { "description": "The Avatar's id and name.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "org_id": { "type": "string", "description": "The Avatar's id." }, "org_name": { "type": "string", "description": "The Avatar's name." } } } } } ] }, "example": { "result": "success", "response": { "org_id": "65f1c2a9b7d3e4a1c8f09b12", "org_name": "Northwind Leadership Coach" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/ApiNotAvailable" } } } }, "/rag-search": { "post": { "tags": [ "Avatar" ], "operationId": "ragSearch", "summary": "Search the Avatar's Expertise", "description": "Retrieves the chunks of the Avatar's own Expertise that best match a\nquery, with their similarity scores. The search is the one the Avatar\nruns when it builds a reply. It covers the Avatar's Expertise only,\nnot Foundation content. The number of chunks returned is the number\nof references the Avatar type uses in a reply, and chunks below the\nAvatar's minimum similarity are left out, so the list can be empty.\nA request without `content` returns `404`.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "content" ], "properties": { "content": { "type": "string", "description": "The query text." } } }, "example": { "content": "How do I run a retrospective for a remote team?" } } } }, "responses": { "200": { "description": "The matching chunks, best match first.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "chunks": { "type": "array", "items": { "$ref": "#/components/schemas/RagChunk" } } } } } } ] }, "example": { "result": "success", "response": { "chunks": [ { "chunk_id": "66a0d4e1c9b8f7a2d3e45f60", "score": 0.81, "text": "Remote retrospectives work best with a shared board and a clear timebox." } ] } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "description": "The request has no `content`.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Missing content." } } } } } } }, "/tags": { "post": { "tags": [ "Avatar" ], "operationId": "addTagsToUser", "summary": "Add tags to a member", "description": "Adds tags to an active member of your Avatar, identified by email\naddress. Available on Enterprise Avatars; an Essential Avatar's key\ngets `403` `user_tags_not_enabled`. Sending a tag name the member\nalready has in your Avatar updates that tag's description and source.\nThe Avatar sees a member's tags when it replies to them.\n\nEach tag has exactly the fields `name`, `description` and `source`,\nand its name and description together are at most 2,000 characters.\nAn incorrect tag format returns `404`. An email address that belongs\nto no user, a user who is not an active member of your Avatar, and a\nmember whose account was erased all return the same `404`\n`User not found.`, and nothing is written. Only a key issued by the\nAvatar Owner, an Avatar Admin or MaxGood.work staff tags members; a\nkey issued by an Avatar Coach who is neither returns `403`\n`not_org_admin`. Each request is recorded in the Avatar's audit log.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "user_email", "tags_to_add" ], "properties": { "user_email": { "type": "string", "format": "email" }, "tags_to_add": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" } } } }, "example": { "user_email": "maria.santos@example.com", "tags_to_add": [ { "name": "completed-onboarding", "description": "Finished the onboarding course", "source": "lms-sync" } ] } } } }, "responses": { "200": { "description": "The tags are applied.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "string", "description": "A message naming the tags applied and the user." } } } ] }, "example": { "result": "success", "response": "Tags\n[{'name': 'completed-onboarding', 'description': 'Finished the onboarding course', 'source': 'lms-sync'}]\n applied to user maria.santos@example.com." } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The key lacks the `enterprise_api` scope (the body is a `message` of `Insufficient scope.`), the Avatar has no member tags (`user_tags_not_enabled`), or the key's issuer may not tag members (`not_org_admin`).", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/ScopeFailure" }, { "$ref": "#/components/schemas/FailureEnvelope" } ] }, "example": { "result": "failure", "response": "Member tags are available on Enterprise Avatars.", "error_code": "user_tags_not_enabled" } } } }, "404": { "description": "A tag has an incorrect format, or the email address belongs to no active member of your Avatar.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "User not found." } } } }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } } }, "/content/titles": { "get": { "tags": [ "Titles" ], "operationId": "listContentTitles", "summary": "List the Avatar's titles", "description": "Lists the Avatar's Expertise titles with their enabled state, active\nchunk count and creation date, newest first. The list holds the titles\nthe Avatar owns, followed by the titles other Avatars share into it,\nwhich carry `is_linked_from_other_organization: true`. Linked titles\nare read-only through this API (see the `Title` schema), so an\nintegration that uploads content filters the list to titles whose\n`is_linked_from_other_organization` is `false`. Foundation titles are\nnot included. The response holds every title.\n", "responses": { "200": { "description": "The Avatar's titles.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "titles_count": { "type": "integer" }, "titles": { "type": "array", "items": { "$ref": "#/components/schemas/Title" } } } } } } ] }, "example": { "result": "success", "response": { "titles_count": 1, "titles": [ { "title_id": "66a0d4e1c9b8f7a2d3e45f01", "title_name": "Coaching for Scrum Masters", "is_enabled": true, "count": 42, "created_at": "2026-11-14T15:04:05Z", "is_linked_from_other_organization": false }, { "title_id": "66a0d4e1c9b8f7a2d3e45f77", "title_name": "Team Agreements", "is_enabled": false, "count": 12, "created_at": "2026-10-02T09:30:00Z", "is_linked_from_other_organization": true } ] } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" } } }, "post": { "tags": [ "Titles" ], "operationId": "createContentTitle", "summary": "Create a title", "description": "Creates an Expertise title. The new title is disabled and holds no\nchunks; upload content to it, then enable it. A request without a\ntitle name returns `400`.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "title" ], "properties": { "title": { "type": "string", "description": "The title's name." } } }, "example": { "title": "Coaching for Scrum Masters" } } } }, "responses": { "200": { "description": "The new title's id.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "id": { "type": "string" }, "message": { "type": "string" } } } } } ] }, "example": { "result": "success", "response": { "id": "66a0d4e1c9b8f7a2d3e45f01", "message": "Title created successfully" } } } } }, "400": { "$ref": "#/components/responses/ValidationError" }, "401": { "$ref": "#/components/responses/Unauthorized" } } } }, "/content/titles/{title_id}": { "parameters": [ { "in": "path", "name": "title_id", "required": true, "schema": { "type": "string" } } ], "get": { "tags": [ "Titles" ], "operationId": "getContentTitle", "summary": "Get a title", "description": "Returns a title's name, enabled state, active chunk count and\ncreation date. A title that does not exist and a title of another\nAvatar both return `404`, and so does a title linked from another\nAvatar, so `is_linked_from_other_organization` is always `false` here.\n", "responses": { "200": { "description": "The title.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "$ref": "#/components/schemas/Title" } } } ] }, "example": { "result": "success", "response": { "title_id": "66a0d4e1c9b8f7a2d3e45f01", "title_name": "Coaching for Scrum Masters", "is_enabled": true, "count": 42, "created_at": "2026-11-14T15:04:05Z", "is_linked_from_other_organization": false } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/TitleNotFound" } } }, "put": { "tags": [ "Titles" ], "operationId": "updateContentTitle", "summary": "Rename a title", "description": "Renames a title. The name is the only field this operation changes.\nA deleted title returns `404`, as an unknown id does.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "title_name" ], "properties": { "title_name": { "type": "string", "description": "The new name." } } }, "example": { "title_name": "Coaching for Scrum Masters and Product Owners" } } } }, "responses": { "200": { "description": "The new name.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "title_name": { "type": "string" } } } } } ] }, "example": { "result": "success", "response": { "title_name": "Coaching for Scrum Masters and Product Owners" } } } } }, "400": { "$ref": "#/components/responses/ValidationError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/TitleNotFound" } } }, "delete": { "tags": [ "Titles" ], "operationId": "deleteContentTitle", "summary": "Delete a title", "description": "Deletes a title and its content, and the deletion cannot be undone.\nThe title's name, description and footer, and each chunk's name and\ntext, are replaced with placeholders. Each document's `filename`\nbecomes `This document has been deleted.`, the chunks' embeddings\nare removed so the Avatar stops retrieving the title, and the\noriginal uploaded files are permanently deleted from storage, every\nstored version included. Keep your own copy of any document you may\nneed again. Replies that already cited the chunks keep their\ncitations. A deleted title returns `404`, as an unknown id does.\n", "responses": { "200": { "description": "The title is deleted.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "message": { "type": "string" } } } } } ] }, "example": { "result": "success", "response": { "message": "Title deleted successfully" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/TitleNotFound" } } } }, "/content/titles/{title_id}/is_enabled": { "parameters": [ { "in": "path", "name": "title_id", "required": true, "schema": { "type": "string" } } ], "put": { "tags": [ "Titles" ], "operationId": "setContentTitleEnabled", "summary": "Enable or disable a title", "description": "Sets whether the Avatar retrieves from a title. A disabled title keeps\nits content and the Avatar behaves as if it did not exist. Disabling\nis always allowed and enabling again restores the title. Enabling a\ntitle with no active chunks returns `409`. A deleted title returns\n`404`, as an unknown id does, and so does a title linked from another\nAvatar: the Avatar Owner enables and disables linked titles in the\nMaxGood.work web app.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "is_enabled" ], "properties": { "is_enabled": { "type": "boolean" } } }, "example": { "is_enabled": true } } } }, "responses": { "200": { "description": "The title's enabled state.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "title_id": { "type": "string" }, "is_enabled": { "type": "boolean" } } } } } ] }, "example": { "result": "success", "response": { "title_id": "66a0d4e1c9b8f7a2d3e45f01", "is_enabled": true } } } } }, "400": { "$ref": "#/components/responses/ValidationError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/TitleNotFound" }, "409": { "description": "The title has no active chunks.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Cannot enable a title with no active chunks. Upload content to the title before enabling it." } } } } } } }, "/content/titles/{title_id}/upload": { "parameters": [ { "in": "path", "name": "title_id", "required": true, "schema": { "type": "string" } } ], "post": { "tags": [ "Titles" ], "operationId": "uploadContentToTitle", "summary": "Upload content to a title", "description": "Adds a file or Markdown text to a title. Files in common formats\n(PDF, DOCX, PPT and others) have their text extracted first. The text\nis divided into chunks, embedded and stored. The request is at most\n25 MB.\n\nSend a file as `multipart/form-data` with the part `file`, or send\ntext as JSON in `text`; HTML in the text is converted to Markdown. The\noptional `source_document_title` names the document the content comes\nfrom and is recorded on the chunks. A deleted title returns `404`, as\nan unknown id does.\n", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "file" ], "properties": { "file": { "type": "string", "format": "binary" }, "source_document_title": { "type": "string", "description": "The name of the document this upload represents." } } } }, "application/json": { "schema": { "type": "object", "required": [ "text" ], "properties": { "text": { "type": "string", "description": "The text to add, as Markdown." }, "source_document_title": { "type": "string", "description": "The name of the document this text represents." } } }, "example": { "text": "# Sprint planning\n\nA sprint planning meeting sets the goal for the next sprint.", "source_document_title": "Sprint planning guide" } } } }, "responses": { "200": { "description": "The ids of the chunks created.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "message": { "type": "string" }, "chunk_ids": { "type": "array", "items": { "type": "string" } }, "chunk_count": { "type": "integer" } } } } } ] }, "example": { "result": "success", "response": { "message": "Content uploaded successfully (2 chunks)", "chunk_ids": [ "66a0d4e1c9b8f7a2d3e45f60", "66a0d4e1c9b8f7a2d3e45f61" ], "chunk_count": 2 } } } } }, "400": { "$ref": "#/components/responses/ValidationError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/TitleNotFound" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/content/titles/{title_id}/documents": { "parameters": [ { "in": "path", "name": "title_id", "required": true, "schema": { "type": "string" } } ], "get": { "tags": [ "Titles" ], "operationId": "listContentTitleDocuments", "summary": "List a title's documents", "description": "Lists the files uploaded to a title, with a link that downloads each\noriginal. The link works for 15 minutes; call this operation again for\na new one. Documents of a deleted title are listed with `is_active`\n`false` and an empty `download_url`. The response holds every\ndocument.\n", "responses": { "200": { "description": "The title's documents.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "title_id": { "type": "string" }, "document_count": { "type": "integer" }, "documents": { "type": "array", "items": { "$ref": "#/components/schemas/Document" } } } } } } ] }, "example": { "result": "success", "response": { "title_id": "66a0d4e1c9b8f7a2d3e45f01", "document_count": 1, "documents": [ { "document_id": "66a0d4e1c9b8f7a2d3e45f20", "filename": "sprint-planning-guide.pdf", "filetype": "pdf", "mimetype": "application/pdf", "filesize": 482113, "upload_date": 1790012345.12, "is_active": true, "download_url": "https://files.example.com/sprint-planning-guide.pdf?signature=example" } ] } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/TitleNotFound" } } } }, "/content/titles/{title_id}/chunks": { "parameters": [ { "in": "path", "name": "title_id", "required": true, "schema": { "type": "string" } } ], "get": { "tags": [ "Titles" ], "operationId": "listContentTitleChunks", "summary": "List a title's chunks", "description": "Lists the active chunks of a title with their names and text. Deleted\nchunks are not listed. The response holds every chunk.\n", "responses": { "200": { "description": "The title's active chunks.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "chunk_count": { "type": "integer" }, "chunks": { "type": "array", "items": { "$ref": "#/components/schemas/ChunkSummary" } } } } } } ] }, "example": { "result": "success", "response": { "chunk_count": 1, "chunks": [ { "chunk_id": "66a0d4e1c9b8f7a2d3e45f60", "chunk_name": "Sprint planning guide-1", "chunk_text": "A sprint planning meeting sets the goal for the next sprint." } ] } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/TitleNotFound" } } } }, "/content/titles/{title_id}/footer": { "parameters": [ { "in": "path", "name": "title_id", "required": true, "schema": { "type": "string" } } ], "get": { "tags": [ "Titles" ], "operationId": "getContentTitleFooter", "summary": "Get a title's footer", "description": "Returns the footer the Avatar shows with content from the title, for\nexample an attribution or a licensing notice. When the title has no\nfooter of its own, `footer_id` is null and `footer_html` is the\ndefault footer of the Avatar type.\n", "responses": { "200": { "description": "The footer.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "footer_id": { "type": "string", "nullable": true, "description": "The id of the title's own footer, or null when it has none." }, "footer_html": { "type": "string", "description": "The footer's HTML." } } } } } ] }, "example": { "result": "success", "response": { "footer_id": "66a0d4e1c9b8f7a2d3e45f30", "footer_html": "

Source: Sprint planning guide

" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/TitleNotFound" } } }, "put": { "tags": [ "Titles" ], "operationId": "setContentTitleFooter", "summary": "Set a title's footer", "description": "Creates the footer of a title, or replaces it. The footer applies to\nevery chunk of the title, including chunks added later. The HTML is\nsanitized and is at most 500 characters. The request returns `400`\nwhen the footer is too long or the Avatar type does not allow footer\nchanges. A deleted title returns `404`, as an unknown id does.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "footer_html" ], "properties": { "footer_html": { "type": "string", "description": "The footer's HTML." } } }, "example": { "footer_html": "

Source: Sprint planning guide

" } } } }, "responses": { "200": { "description": "The footer is saved.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "footer_id": { "type": "string" }, "message": { "type": "string" } } } } } ] }, "example": { "result": "success", "response": { "footer_id": "66a0d4e1c9b8f7a2d3e45f30", "message": "Footer created successfully" } } } } }, "400": { "$ref": "#/components/responses/ValidationError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/TitleNotFound" } } } }, "/content/chunks/{chunk_id}": { "parameters": [ { "in": "path", "name": "chunk_id", "required": true, "schema": { "type": "string" } } ], "get": { "tags": [ "Chunks" ], "operationId": "getContentChunk", "summary": "Get a chunk", "description": "Returns a chunk's text, name, title and active state. A deleted chunk\nis still returned, with `is_active` `false` and placeholder text and\nname, so a chunk id from an earlier reply or search stays readable.\nUse this operation to read the Expertise chunks named in the\n`partner_content_ids` of `POST /avatar/respond`. A chunk of the\nmember's own profile file belongs to the member and is not served here.\n", "responses": { "200": { "description": "The chunk.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "chunk_text": { "type": "string", "description": "The text of the chunk, as Markdown." }, "chunk_name": { "type": "string" }, "title_id": { "type": "string" }, "is_active": { "type": "boolean", "description": "`false` for a deleted chunk, whose `chunk_text` and `chunk_name` are placeholders." } } } } } ] }, "example": { "result": "success", "response": { "chunk_text": "A sprint planning meeting sets the goal for the next sprint.", "chunk_name": "Sprint planning guide-1", "title_id": "66a0d4e1c9b8f7a2d3e45f01", "is_active": true } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/ChunkNotFound" } } }, "put": { "tags": [ "Chunks" ], "operationId": "editContentChunk", "summary": "Edit a chunk", "description": "Replaces a chunk's text and embeds it again, so the Avatar retrieves\nthe new text. HTML in the text is converted to Markdown.\n\nEach chunk starts with a header, `Title in Avatar Expertise: ` and `Source Document Title: `, which is\npart of what the Avatar matches on. Send `source_document_title` to\nrebuild the header with a new source document title; leave it out to\nkeep the current one. A deleted chunk, and every chunk of a deleted\ntitle, returns `404`, as an unknown id does.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "chunk_text" ], "properties": { "chunk_text": { "type": "string", "description": "The new text, as Markdown." }, "source_document_title": { "type": "string", "description": "The new name of the source document." } } }, "example": { "chunk_text": "A sprint planning meeting sets the goal and the scope of the next sprint." } } } }, "responses": { "200": { "description": "The chunk is updated.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "message": { "type": "string" } } } } } ] }, "example": { "result": "success", "response": { "message": "Chunk updated successfully" } } } } }, "400": { "$ref": "#/components/responses/ValidationError" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/ChunkNotFound" } } }, "delete": { "tags": [ "Chunks" ], "operationId": "deleteContentChunk", "summary": "Delete a chunk", "description": "Deletes a chunk. Its text and name are replaced with placeholders,\n`is_active` becomes `false` and its embedding is removed, so the\nAvatar stops retrieving it. The chunk id stays readable with\n`GET /content/chunks/{chunk_id}`, and replies that cited the chunk\nkeep their citations. A chunk that is already deleted returns `404`,\nas an unknown id does.\n", "responses": { "200": { "description": "The chunk is deleted.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "message": { "type": "string" } } } } } ] }, "example": { "result": "success", "response": { "message": "Chunk deleted successfully" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/ChunkNotFound" } } } }, "/avatar/respond": { "post": { "tags": [ "Avatar reply" ], "operationId": "avatarRespond", "summary": "Get an Avatar reply for a member", "description": "Returns the Avatar's reply to a message from one of its members. The\nreply is generated as it is for the member in the MaxGood.work web\napp, Slack, Teams, Discord and email: the same retrieval, tags and\ntone. The reply draws on the member's stored interaction history, so\nyou do not manage threads. The API stores the exchange as an\ninteraction of the member under your Avatar. The API assigns\n`interaction_id`; requests do not set it.\n\nThe prompt is at most 10,000 characters and at most 4,096 tokens;\neither limit exceeded returns `400` naming the limit.\n\n**Who can chat.** The member must be an active member of the Avatar,\nor the request returns `404`. A member whose licence has expired,\nwhom an Avatar Owner or Avatar Admin archived, or whose account\nMaxGood.work staff suspended receives `200` with the Avatar's refusal\ntext as `response`, and no reply is generated. A member who has not\naccepted the Avatar's terms and conditions (an Avatar Client) or\nagreement (the Avatar Owner) returns `403` `agreement_required` with\n`agreement_url`, the page in the MaxGood.work web app where the member\naccepts. No API key can accept for a member; send the member to that\npage and replies resume once they accept. On an Enterprise Avatar, a\nkey whose issuer may not see the member's interactions returns `403`\n`interaction_access_required`. Nothing is generated or stored on a\n`403`.\n\n**References.** The Avatar's *display references* setting decides\nwhere the links to cited Expertise go. When it is on (the default),\n`partner_content_ids` is empty and `response` ends with a\n`[References]` line. When it is off, `response` has no such line and\n`partner_content_ids` lists the links. Every citation is recorded\neither way, so Foundation Author usage is counted the same.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "mg_user_id", "prompt" ], "properties": { "mg_user_id": { "type": "string", "description": "The `user_id` of the member the reply is for, as `GET /users` returns it." }, "prompt": { "type": "string", "description": "The member's message. It cannot be empty." } } }, "example": { "mg_user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27", "prompt": "How can I make our sprint planning shorter?" } } } }, "responses": { "200": { "description": "The Avatar's reply, or its refusal text for a member who cannot chat.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "$ref": "#/components/schemas/AvatarReply" } } } ] }, "example": { "result": "success", "response": { "response": "Start with one clear sprint goal and timebox the meeting to 45 minutes.\n\n[References]: https://app.example.com/reference/66a0d4e1c9b8f7a2d3e45f60", "interaction_id": "0b4f1d6a8c2e4a79b3d5e7f9a1c3e5b7", "partner_content_ids": [] } } } } }, "400": { "description": "The request is missing `mg_user_id` or `prompt`, or the prompt is over a limit.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Prompt exceeds the maximum length of 10000 characters." } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The key lacks the `enterprise_api` scope (body `{\"message\": ...}`),\nthe key's issuer may not see the member's interactions, or the\nmember has not accepted the Avatar's terms and conditions or\nagreement (body is a failure envelope with an `error_code`).\n", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/ScopeFailure" }, { "$ref": "#/components/schemas/FailureEnvelope" } ] }, "examples": { "insufficient_scope": { "summary": "The key lacks the scope", "value": { "message": "Insufficient scope." } }, "interaction_access_required": { "summary": "The key's issuer may not see the member's interactions", "value": { "result": "failure", "response": "This API key cannot request a reply for this member: only a key issued by the Avatar Owner, by the member's Avatar Coach or by MaxGood.work staff can.", "error_code": "interaction_access_required" } }, "agreement_required": { "summary": "The member has not accepted the Avatar's terms and conditions", "value": { "result": "failure", "response": "This member has not accepted the Avatar's terms and conditions. Send them to agreement_url to read and accept them; replies resume once they have.", "error_code": "agreement_required", "error": "agreement_required", "agreement_url": "https://app.example.com/agreements/65f1c2a9b7d3e4a1c8f09b12" } } } } } }, "404": { "description": "The user is not an active member of the Avatar.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "User is not a member of this Avatar." } } } }, "502": { "description": "The Avatar returned no reply.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "The Avatar did not return a response." } } } } } } }, "/users": { "get": { "tags": [ "Users" ], "operationId": "listUsers", "summary": "List the Avatar's members", "description": "Lists the users with an active membership in your Avatar, most\nrecently joined first. Archived members and members with an expired\nlicence are listed, each with its `status`, and counted in\n`users_count`. Removed members and members whose account was erased\nare not listed. Each entry is a `UserMembership`.\n\n`page` starts at 1. `page_size` defaults to 50 and is limited to 1\nthrough 200.\n", "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1 } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } } ], "responses": { "200": { "description": "One page of members.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "page": { "type": "integer" }, "page_size": { "type": "integer" }, "users_count": { "type": "integer", "description": "The number of listed members across all pages." }, "users": { "type": "array", "items": { "$ref": "#/components/schemas/UserMembership" } } } } } } ] }, "example": { "result": "success", "response": { "page": 1, "page_size": 50, "users_count": 1, "users": [ { "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27", "email": "maria.santos@example.com", "name": "Maria Santos", "role": "Team lead", "expertise": "Agile coaching", "industry": "Software", "goal": "Plan sprints in half the time", "problem": "Planning meetings run long", "language": "English", "is_admin": false, "is_coach": false, "is_owner": false, "coach_user_id": "3b9e1f6a2c8d4e57b0a1c9d8e7f64a35", "status": "active", "license_expiry_date": "2027-06-30T00:00:00+00:00", "notes": "Prefers morning sessions.", "notes_withheld": false, "notes_meta": { "chars": 25, "updated_at": "2026-10-02T14:21:07+00:00", "updated_by_role": "api" }, "structured_data": { "cohort": "2026-Q4" }, "structured_data_withheld": false, "structured_data_meta": { "chars": 20 }, "joined_at": "2026-09-14T16:05:33+00:00" } ] } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" } } }, "post": { "tags": [ "Users" ], "operationId": "createUser", "summary": "Invite a user", "description": "Adds a user to your Avatar, identified by email address.\n\n- **New user.** Creates the user from the identity fields in the\n request, adds the membership and emails an invitation.\n- **Existing user, not yet a member.** Adds the membership and\n notifies the user. The user's identity fields are kept, and\n `name`, `role`, `expertise`, `industry`, `goal`, `problem` and\n `language` in the request are ignored.\n- **Existing member of your Avatar.** Returns `409`. Use\n `PUT /users/{user_id}` to change the membership.\n\n`is_admin`, `is_coach`, `license_expiry_date`, `notes` and\n`structured_data` always apply to the new membership. `is_owner` is\nnot accepted. The introduction states the role and field rules by key\nissuer, and the save limits.\n\n**Order of checks.** The request is checked in this order, and a\nrefused request writes nothing, sends no invitation and does not\ncount toward the rate limit until the limits below:\n\n1. `400` for a missing or invalid `email`, `name`, `license_expiry_date`\n or `notes`.\n2. `403` for a role change, an `is_coach` the Avatar type does not\n allow, or a `notes` or `structured_data` the key may not write.\n3. `429` when the Avatar has sent as many invitations in the last\n hour as its Avatar type allows (200 on an Enterprise Avatar, 100 on\n an Essential Avatar).\n4. `403` when the Avatar has 1,000 active members. The 1,000 limit\n does not apply to an Avatar whose user limit MaxGood.work staff\n have set. Contact support@maxgood.work to raise an Avatar's\n limit.\n5. `400` or `503` from the field save limits.\n6. `409` when the user is already a member.\n7. `403` when the Avatar has no seat open under its user limit.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "email", "name" ], "properties": { "email": { "type": "string", "format": "email" }, "name": { "type": "string", "maxLength": 200 }, "is_admin": { "type": "boolean", "description": "Makes the member an Avatar Admin, with a key the Avatar Owner or MaxGood.work staff issued. On an Enterprise Avatar the member also becomes an Avatar Coach." }, "is_coach": { "type": "boolean", "description": "`true` makes the member an Avatar Coach, on an Enterprise Avatar only, with a key the Avatar Owner or MaxGood.work staff issued." }, "role": { "type": "string", "maxLength": 1000 }, "expertise": { "type": "string", "maxLength": 1000 }, "industry": { "type": "string", "maxLength": 1000 }, "goal": { "type": "string", "maxLength": 1000 }, "problem": { "type": "string", "maxLength": 1000 }, "language": { "type": "string", "maxLength": 100 }, "license_expiry_date": { "type": "string", "description": "When the member's access ends, as an ISO 8601 date (`2027-06-30`) or date-time." }, "notes": { "type": "string", "maxLength": 2500, "description": "Your Avatar's note about the member." }, "structured_data": { "type": "object", "description": "Your Avatar's JSON metadata about the member." } } }, "example": { "email": "maria.santos@example.com", "name": "Maria Santos", "role": "Team lead", "expertise": "Agile coaching", "industry": "Software", "language": "English", "license_expiry_date": "2027-06-30", "notes": "Prefers morning sessions.", "structured_data": { "cohort": "2026-Q4" } } } } }, "responses": { "200": { "description": "The user is a member of your Avatar.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "user_id": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" }, "existing_user": { "type": "boolean", "description": "`true` when the email address already belonged to a user." }, "invitation_sent": { "type": "boolean", "description": "`true` when an email went to the user." } } } } } ] }, "example": { "result": "success", "response": { "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27", "email": "maria.santos@example.com", "name": "Maria Santos", "existing_user": false, "invitation_sent": true } } } } }, "400": { "description": "A field is missing or invalid, or is over its save limit.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "notes is over its limit of 2500 characters.", "error_code": "field_too_long", "field": "notes", "max_length": 2500 } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "A role or field rule refuses the key, or the Avatar has reached a member limit. A role or field refusal carries an `error_code` that names the rule.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Only an API key issued by the Avatar Owner can change Avatar Admin or Avatar Coach roles on this Avatar.", "error_code": "role_change_owner_key_only" } } } }, "409": { "description": "The user is already an active member of your Avatar.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "User already belongs to this Avatar." } } } }, "429": { "description": "The Avatar sent as many invitations in the last hour as its Avatar type allows. `Retry-After` gives the seconds to wait.", "headers": { "Retry-After": { "schema": { "type": "integer" }, "description": "Seconds until you may retry." } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Invite rate limit reached: 200 invites in the last 60 minutes. Retry after 120 seconds.", "error_code": "rate_limited", "retry_after_seconds": 120, "limit": 200, "window_seconds": 3600 } } } }, "503": { "$ref": "#/components/responses/FieldLimitsUnavailable" } } } }, "/users/batch": { "post": { "tags": [ "Users" ], "operationId": "createUsersBatch", "summary": "Invite up to 100 users", "description": "Adds up to 100 users to your Avatar in one request. Each row is the\nbody of `POST /users` and is added the same way: a new user is\ncreated and invited, an existing user keeps their identity fields,\nand an existing member of your Avatar is reported as\n`already_member`.\n\n**Seats.** Before anything is written, the Avatar's user limit is\nchecked once for every person in the list who needs a new seat (a\nrow that is blank, repeated or already a member needs none). When\nthe open seats do not cover them all, the request returns `409`\n`avatar_full` with `needed` and `open_seats`, and nobody is added.\nOtherwise each row is added on its own, so a row that is refused\ndoes not stop the rows after it.\n\n**Order of checks.** The request is checked in this order, and a\nrefused request writes nothing:\n\n1. `400` `invalid_batch` for a body without a `users` list of 1 to\n 100 rows.\n2. `403` for a role change, an `is_coach` the Avatar type does not\n allow, or a `notes` or `structured_data` the key may not write,\n in any row.\n3. `429` when the Avatar has sent, or the list would send, more\n invitations in the last hour than its Avatar type allows (200 on\n an Enterprise Avatar, 100 on an Essential Avatar).\n4. `409` `avatar_full` when the Avatar lacks open seats.\n\nAfter these checks each row's own result says what happened. The\n1,000 active-member limit of `POST /users` applies to each added\nrow, except for an Avatar whose user limit MaxGood.work staff have\nset. The introduction states the role and field rules by key issuer,\nand the save limits.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "users" ], "properties": { "users": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "object", "required": [ "email", "name" ], "description": "The body of `POST /users`.", "properties": { "email": { "type": "string", "format": "email" }, "name": { "type": "string", "maxLength": 200 } } } } } }, "example": { "users": [ { "email": "maria.santos@example.com", "name": "Maria Santos", "license_expiry_date": "2027-06-30" }, { "email": "li.wei@example.com", "name": "Li Wei" } ] } } } }, "responses": { "200": { "description": "One result for each row, in request order.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "added": { "type": "integer", "description": "The number of rows with status `added`." }, "results": { "type": "array", "items": { "type": "object", "properties": { "email": { "type": "string", "nullable": true }, "status": { "type": "string", "enum": [ "added", "already_member", "invalid", "failed" ] }, "user_id": { "type": "string", "description": "Present when `status` is `added`." }, "existing_user": { "type": "boolean", "description": "Present when `status` is `added`. `true` when the email address already belonged to a user." }, "error_code": { "type": "string", "description": "Present when `status` is `invalid` or `failed`. Names the refusal, such as `invalid_email`, `duplicate_email`, `name_required`, `field_too_long` or `user_cap_reached`." } } } } } } } } ] }, "example": { "result": "success", "response": { "added": 1, "results": [ { "email": "maria.santos@example.com", "status": "added", "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27", "existing_user": false }, { "email": "li.wei@example.com", "status": "already_member" } ] } } } } }, "400": { "description": "The body is not a `users` list of 1 to 100 rows.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "users may hold at most 100 rows.", "error_code": "invalid_batch" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "A role or field rule refuses the key for a row. The `error_code` names the rule.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Only an API key issued by the Avatar Owner can change Avatar Admin or Avatar Coach roles on this Avatar.", "error_code": "role_change_owner_key_only" } } } }, "409": { "description": "The Avatar has fewer open seats than the list needs. Nobody was added.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "This Avatar does not have enough open seats for everyone in the list. No one was added.", "error_code": "avatar_full", "needed": 12, "open_seats": 7 } } } }, "429": { "description": "The list would take the Avatar past the invitations its Avatar type allows in an hour. `Retry-After` gives the seconds to wait.", "headers": { "Retry-After": { "schema": { "type": "integer" }, "description": "Seconds until you may retry." } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Invite rate limit reached: 200 invites in the last 60 minutes. Retry after 120 seconds.", "error_code": "rate_limited", "retry_after_seconds": 120, "limit": 200, "window_seconds": 3600 } } } } } } }, "/users/{user_id}": { "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The MaxGood.work user id." } ], "get": { "tags": [ "Users" ], "operationId": "getUser", "summary": "Get a member", "description": "Returns a user's identity and the membership in your Avatar. A user\nthat does not exist and a user with no active membership in your\nAvatar both return `404`.\n", "responses": { "200": { "description": "The member.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "$ref": "#/components/schemas/UserMembership" } } } ] }, "examples": { "member": { "$ref": "#/components/examples/UserMembershipExample" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/UserNotFound" } } }, "put": { "tags": [ "Users" ], "operationId": "updateUser", "summary": "Update a member", "description": "Updates the fields of the membership in your Avatar: `is_admin`,\n`is_coach`, `license_expiry_date`, `notes` and `structured_data`.\nAny other field, including a user's identity, `is_owner` and\n`coach_user_id`, returns `400`; set an Avatar Coach with\n`PUT /users/{user_id}/coach`. Send only the fields to change. Each\nfield changed is recorded in the audit log.\n\nThe introduction states which key may change which field and the save\nlimits. The checks run in this order, and a refused request changes\nno field:\n\n1. `400` for a field this operation does not edit.\n2. `404` for a user who is not an active member.\n3. `400` for an invalid `license_expiry_date` or a `notes` value that\n is neither text nor null.\n4. `403` for a role change, an `is_coach: true` the Avatar type does\n not allow, or a `notes` or `structured_data` the key may not write.\n A request that re-sends the stored `is_admin` and `is_coach`\n values, or sends only other fields, is accepted from any key of the\n Avatar; re-sending a stored `is_coach: true` changes nothing and\n returns `200`.\n5. `400` or `503` from the field save limits.\n\n`notes` and `structured_data` accept `null` to clear the value, and\n`license_expiry_date` accepts `null` to remove the end date. Notes\nwritten through the API carry the role `api` in\n`notes_meta.updated_by_role`. Removing Avatar Admin leaves `is_coach`\nas it is; clearing `is_coach` on an Avatar Coach leaves their clients\nwith no Avatar Coach.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "is_admin": { "type": "boolean", "description": "Makes the member an Avatar Admin, or removes the role. On an Enterprise Avatar, making a member an Avatar Admin also makes them an Avatar Coach." }, "is_coach": { "type": "boolean", "description": "`true` makes the member an Avatar Coach, on an Enterprise Avatar only. `false` clears the role." }, "license_expiry_date": { "type": "string", "nullable": true, "description": "When the member's access ends, as an ISO 8601 date (`2027-06-30`) or date-time, or null for no end date." }, "notes": { "type": "string", "nullable": true, "maxLength": 2500, "description": "Your Avatar's note about the member, or null to clear it." }, "structured_data": { "type": "object", "nullable": true, "description": "Your Avatar's JSON metadata about the member, or null to clear it." } } }, "example": { "license_expiry_date": "2027-12-31", "notes": "Prefers morning sessions. Renewed for 2027." } } } }, "responses": { "200": { "description": "The member after the update.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "$ref": "#/components/schemas/UserMembership" } } } ] }, "examples": { "member": { "$ref": "#/components/examples/UserMembershipExample" } } } } }, "400": { "description": "The body has a field this operation does not edit, a value of the wrong type, or a value over its save limit.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Field(s) not editable via /v1beta/users/: name. User-level identity (name, role, expertise, industry, goal, problem, language) is set on POST and is not editable via this surface." } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "A role or field rule refuses the key. The `error_code` names the rule.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Only an API key issued by the Avatar Owner can read or write members' notes on this Avatar.", "error_code": "notes_owner_key_only" } } } }, "404": { "$ref": "#/components/responses/UserNotFound" }, "503": { "$ref": "#/components/responses/FieldLimitsUnavailable" } } }, "delete": { "tags": [ "Users" ], "operationId": "deleteUser", "summary": "Remove a member", "description": "Removes the user's membership in your Avatar. The user's account and\nmemberships in other Avatars are untouched. The Avatar Owner is never\nremoved through the API (`403` `owner_not_removable`). On every\nAvatar type, removing an Avatar Admin or Avatar Coach needs a\nkey the Avatar Owner or MaxGood.work staff issued (`403`\n`role_change_owner_key_only`). A refusal is recorded in the audit log.\nRemoving an Avatar Coach leaves their clients with no Avatar Coach, and\nremoving a client clears the client's Avatar Coach.\n", "responses": { "200": { "description": "The membership is removed.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "removed": { "type": "boolean" }, "user_id": { "type": "string" } } } } } ] }, "example": { "result": "success", "response": { "removed": true, "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The member is the Avatar Owner, or the key may not remove an Avatar Admin or Avatar Coach.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "The Avatar Owner cannot be removed from this Avatar.", "error_code": "owner_not_removable" } } } }, "404": { "$ref": "#/components/responses/UserNotFound" } } } }, "/users/{user_id}/coach": { "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The MaxGood.work user id of the member whose Avatar Coach is set (the client)." } ], "put": { "tags": [ "Users" ], "operationId": "setUserCoach", "summary": "Assign a member's Avatar Coach", "description": "Names the Avatar Coach of a member (the client), or removes it with\n`null`. Avatar Coaches are assigned on Enterprise Avatars only. A\nmember has at most one Avatar Coach, who must be an active member of\nyour Avatar holding the Avatar Coach role; the Avatar Owner has none;\nAvatar Coaches and Avatar Admins may be clients. The introduction\nstates which key may assign which member.\n\nSending the member's current Avatar Coach again, or `null` for a\nmember who has none, returns `200` and writes nothing. Each change is\nrecorded in the audit log with the Avatar Coach before and after.\n\nThe request is checked in this order, and every refusal writes\nnothing:\n\n1. `400` `coach_user_id_required`\n2. `403` `coach_role_not_enabled`\n3. `404` for a user who is not an active member\n4. `403` `not_org_admin`\n5. `403` `owner_has_no_coach`\n6. `403` `coach_assign_owner_only`\n7. `400` `coach_is_client` or `not_a_coach`\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "coach_user_id" ], "additionalProperties": false, "properties": { "coach_user_id": { "type": "string", "nullable": true, "maxLength": 128, "description": "The user id of an Avatar Coach of your Avatar, or null to remove the member's Avatar Coach." } } }, "example": { "coach_user_id": "3b9e1f6a2c8d4e57b0a1c9d8e7f64a35" } } } }, "responses": { "200": { "description": "The member with the new `coach_user_id`.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "$ref": "#/components/schemas/UserMembership" } } } ] }, "examples": { "member": { "$ref": "#/components/examples/UserMembershipExample" } } } } }, "400": { "description": "The body is not valid, the Avatar Coach named is the member, or the Avatar Coach named does not hold the role.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "A member cannot be their own Avatar Coach.", "error_code": "coach_is_client" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The Avatar type has no Avatar Coach role, or the key's issuer may not make this assignment. The `error_code` names the rule.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "The Avatar Owner cannot have an Avatar Coach.", "error_code": "owner_has_no_coach" } } } }, "404": { "$ref": "#/components/responses/UserNotFound" } } } }, "/facts": { "get": { "tags": [ "Facts" ], "operationId": "listFacts", "summary": "List Facts", "description": "Lists the Facts the key's issuer may see, in id order. A key whose\nissuer has left the Avatar, or holds no Avatar Owner, Avatar Admin or\nAvatar Coach role, gets `404` `fact_not_found`. The\nintroduction states which Facts each issuer sees. A Facts list is a\nmember-data read and counts against the key's read limit.\n\n- `scope` keeps `avatar` Facts or `member` Facts.\n- `user_id` keeps the Facts about one member, and implies scope\n `member`. A `user_id` that is not an active member of your Avatar\n returns `404` `user_not_found`. `scope` `avatar` with a `user_id`\n returns `400` `invalid_scope`.\n- `status` keeps `active` or `hidden` Facts; the default is `all`.\n- `page` starts at 1. `page_size` defaults to 50 and is limited to 1\n through 200.\n\n`limits` reports the limits of the Avatar's type and the tokens the\nactive Facts use now. An Avatar type with no Facts returns `403`\n`facts_disabled`.\n", "parameters": [ { "name": "scope", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "avatar", "member" ] } }, { "name": "user_id", "in": "query", "required": false, "schema": { "type": "string" }, "description": "The id of a member of your Avatar." }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "active", "hidden", "all" ], "default": "all" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1 } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } } ], "responses": { "200": { "description": "One page of Facts.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "page": { "type": "integer" }, "page_size": { "type": "integer" }, "facts_count": { "type": "integer", "description": "The number of Facts that match across all pages." }, "facts": { "type": "array", "items": { "$ref": "#/components/schemas/Fact" } }, "limits": { "$ref": "#/components/schemas/FactLimits" } } } } } ] }, "example": { "result": "success", "response": { "page": 1, "page_size": 50, "facts_count": 1, "facts": [ { "id": 412, "scope": "member", "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27", "text": "Maria prefers short, concrete action steps.", "token_count": 9, "status": "active", "source": "owner", "created_by_user_id": "3b9e1f6a2c8d4e57b0a1c9d8e7f64a35", "created_at": "2026-11-10T15:04:05+00:00", "updated_at": "2026-11-10T15:04:05+00:00", "version_count": 0, "access": "edit" } ], "limits": { "per_fact_tokens": 60, "total_tokens": 2000, "active_tokens": 9, "history_tracked": true } } } } } }, "400": { "description": "The `status` or `scope` filter is not valid.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "status must be 'active', 'hidden' or 'all'.", "error_code": "invalid_status" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The Avatar's type has no Facts, or does not offer the API.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Facts are not available on this Avatar's type.", "error_code": "facts_disabled" } } } }, "404": { "description": "The key's issuer holds no role that reads Facts, or `user_id` is not an active member of your Avatar.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "User not found.", "error_code": "user_not_found" } } } }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } }, "post": { "tags": [ "Facts" ], "operationId": "createFact", "summary": "Add a Fact", "description": "Adds a Fact about the Avatar, or about one member when `user_id` is\nsent. The Fact is `active` and the Avatar weaves it into its replies.\nThe text is at most 2,000 characters and at most the tokens one Fact\nmay hold on your Avatar type; the Avatar's active Facts together stay\nwithin the total limit. An Avatar Coach's key adds Facts only about\nthat Avatar Coach's clients. A Fact added through the API names the\nkey's issuer as its creator, and the issuer edits it in the\nMaxGood.work web app under the same rules.\n\nThe Avatar's fact writes in the last hour count against the hourly\nlimit of its Avatar type (see *Rate limits*).\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "text" ], "properties": { "text": { "type": "string", "maxLength": 2000, "description": "The Fact." }, "user_id": { "type": "string", "description": "The id of the member the Fact is about. Leave it out for a Fact about the Avatar." } } }, "example": { "text": "Maria prefers short, concrete action steps.", "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27" } } } }, "responses": { "200": { "description": "The Fact that was added.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "$ref": "#/components/schemas/Fact" } } } ] }, "examples": { "fact": { "$ref": "#/components/examples/FactExample" } } } } }, "400": { "description": "The body is not valid, the text is missing or too long, or the text uses more tokens than one Fact may hold.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "text is required and must be a non-empty string.", "error_code": "fact_text_required" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The Avatar's type has no Facts, or the key's issuer may not add this Fact (`fact_clients_only`, `fact_view_only`).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "This key's issuer can add facts only about a client assigned to them.", "error_code": "fact_clients_only" } } } }, "404": { "description": "The key's issuer holds no role that writes Facts, or `user_id` is not an active member the issuer may write about.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "User not found.", "error_code": "user_not_found" } } } }, "409": { "description": "The Fact would take the Avatar's active Facts past their total limit.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "This write would pass the total token limit of the Avatar's facts.", "error_code": "fact_budget_exceeded", "active_tokens": 1990, "max_tokens": 2000 } } } }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } } }, "/facts/{fact_id}": { "parameters": [ { "name": "fact_id", "in": "path", "required": true, "schema": { "type": "integer" }, "description": "The id of the Fact, from `GET /facts`." } ], "get": { "tags": [ "Facts" ], "operationId": "getFact", "summary": "Get a Fact", "description": "Returns one Fact. A Fact that does not exist, that belongs to another\nAvatar and one the key's issuer may not see all return the same\n`404` `fact_not_found`. A member-data read; it counts against the\nkey's read limit.\n", "responses": { "200": { "description": "The Fact.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "$ref": "#/components/schemas/Fact" } } } ] }, "examples": { "fact": { "$ref": "#/components/examples/FactExample" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The Avatar's type has no Facts.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Facts are not available on this Avatar's type.", "error_code": "facts_disabled" } } } }, "404": { "$ref": "#/components/responses/FactNotFound" }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } }, "patch": { "tags": [ "Facts" ], "operationId": "updateFact", "summary": "Reword, hide or show a Fact", "description": "Changes a Fact's `text`, its `status`, or both. The text changes\nfirst. Sending `status` `active` for a hidden Fact checks the\nAvatar's total Fact limit again. On an Avatar type that keeps an edit\nhistory, each change to the text adds a version, which\n`GET /facts/{fact_id}/history` returns. A Fact the key's issuer may\nread and not change returns `403` `fact_view_only`. A change counts\nagainst the Avatar's hourly fact write limit.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "string", "maxLength": 2000 }, "status": { "type": "string", "enum": [ "active", "hidden" ] } } }, "example": { "status": "hidden" } } } }, "responses": { "200": { "description": "The Fact after the change.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "$ref": "#/components/schemas/Fact" } } } ] }, "examples": { "fact": { "$ref": "#/components/examples/FactExample" } } } } }, "400": { "description": "The body sends neither `status` nor `text`, `status` is not `active` or `hidden`, or the text is missing, too long or over the Avatar's limit per Fact.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "status must be 'active' or 'hidden'.", "error_code": "invalid_status" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The Avatar's type has no Facts, or the key's issuer may read the Fact and not change it.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "This key's issuer can read this fact, not change it.", "error_code": "fact_view_only" } } } }, "404": { "$ref": "#/components/responses/FactNotFound" }, "409": { "description": "Showing the Fact would take the Avatar's active Facts past their total limit.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "This write would pass the total token limit of the Avatar's facts.", "error_code": "fact_budget_exceeded", "active_tokens": 1990, "max_tokens": 2000 } } } }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } }, "delete": { "tags": [ "Facts" ], "operationId": "deleteFact", "summary": "Delete a Fact", "description": "Deletes a Fact and its edit history for good. To keep a Fact and stop\nthe Avatar using it, hide it with `PATCH`. A deletion counts against\nthe Avatar's hourly fact write limit.\n", "responses": { "200": { "description": "The Fact is deleted.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "deleted": { "type": "boolean" }, "fact_id": { "type": "integer" } } } } } ] }, "example": { "result": "success", "response": { "deleted": true, "fact_id": 412 } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The Avatar's type has no Facts, or the key's issuer may read the Fact and not change it.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "This key's issuer can read this fact, not change it.", "error_code": "fact_view_only" } } } }, "404": { "$ref": "#/components/responses/FactNotFound" }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } } }, "/facts/{fact_id}/history": { "parameters": [ { "name": "fact_id", "in": "path", "required": true, "schema": { "type": "integer" }, "description": "The id of the Fact, from `GET /facts`." } ], "get": { "tags": [ "Facts" ], "operationId": "getFactHistory", "summary": "Get a Fact's edit history", "description": "Returns the earlier versions of a Fact's text, newest first. Available\non Enterprise Avatars, whose Avatar type keeps an edit history; an\nEssential Avatar's key gets `403` `fact_history_not_enabled`, after\nthe `404` for a Fact the key's issuer may not see. A member-data\nread; it counts against the key's read limit.\n", "responses": { "200": { "description": "The versions of the Fact.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "fact_id": { "type": "integer" }, "versions": { "type": "array", "items": { "$ref": "#/components/schemas/FactVersion" } } } } } } ] }, "example": { "result": "success", "response": { "fact_id": 412, "versions": [ { "id": 88, "text": "Maria likes short action steps.", "token_count": 7, "edited_at": "2026-11-12T09:30:00+00:00", "edited_by_user_id": "3b9e1f6a2c8d4e57b0a1c9d8e7f64a35", "edit_source": "owner" } ] } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The Avatar's type has no Facts or keeps no edit history.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Fact edit history is not available on this Avatar's type.", "error_code": "fact_history_not_enabled" } } } }, "404": { "$ref": "#/components/responses/FactNotFound" }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } } }, "/users/{user_id}/tags": { "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The MaxGood.work user id of the member." } ], "get": { "tags": [ "Avatar" ], "operationId": "listMemberTags", "summary": "List a member's tags", "description": "Returns the tags your Avatar has applied to a member, oldest first.\nAvailable on Enterprise Avatars; an Essential Avatar's key gets `403`\n`user_tags_not_enabled`. Only a key issued by the Avatar Owner, an\nAvatar Admin or MaxGood.work staff reads tags; a key issued by an\nAvatar Coach who is neither returns `403` `not_org_admin`. A user who\ndoes not exist, a user who is not an active member of your Avatar and\na member whose account was erased all return the same `404`. A\nmember-data read; it counts against the key's read limit.\n", "responses": { "200": { "description": "The member's tags.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "user_id": { "type": "string" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/MemberTag" } } } } } } ] }, "example": { "result": "success", "response": { "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27", "tags": [ { "name": "completed-onboarding", "description": "Finished the onboarding course", "source": "lms-sync", "applied_at": "2026-11-02T10:15:00+00:00" } ] } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The Avatar has no member tags (`user_tags_not_enabled`), or the key's issuer may not manage members (`not_org_admin`).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Member tags are available on Enterprise Avatars.", "error_code": "user_tags_not_enabled" } } } }, "404": { "$ref": "#/components/responses/UserNotFound" }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } }, "delete": { "tags": [ "Avatar" ], "operationId": "removeMemberTag", "summary": "Remove a tag from a member", "description": "Removes the tag named in the `name` query parameter from a member.\nThe request succeeds when the member has no such tag, and\n`removed` is `false` then. Available on Enterprise Avatars, to the\nsame keys and with the same `403` and `404` answers as\n`GET /users/{user_id}/tags`. Each request is recorded in the Avatar's\naudit log.\n", "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string", "maxLength": 2000 }, "description": "The tag name to remove." } ], "responses": { "200": { "description": "The tag is removed, or the member had no such tag.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "user_id": { "type": "string" }, "name": { "type": "string" }, "removed": { "type": "boolean" } } } } } ] }, "example": { "result": "success", "response": { "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27", "name": "completed-onboarding", "removed": true } } } } }, "400": { "description": "The `name` is missing, or over 2,000 characters, or holds a character a tag name cannot.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "The name query parameter must hold the tag to remove.", "error_code": "tag_name_required" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The Avatar has no member tags (`user_tags_not_enabled`), or the key's issuer may not manage members (`not_org_admin`).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Only the Avatar Owner or an Avatar Admin can manage member tags.", "error_code": "not_org_admin" } } } }, "404": { "$ref": "#/components/responses/UserNotFound" }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } } }, "/users/{user_id}/archive": { "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The MaxGood.work user id of the member." } ], "post": { "tags": [ "Users" ], "operationId": "archiveUser", "summary": "Archive a member", "description": "Pauses a member as an Avatar Owner or Avatar Admin does in the\nMaxGood.work web app: everything stored about the member stays, the\nmember cannot chat with the Avatar, and the member's seat is\nreleased. The request takes no body and succeeds again for a member\nwho is already archived. Only a key issued by the Avatar Owner, an\nAvatar Admin or MaxGood.work staff archives; a key issued by an\nAvatar Coach who is neither returns `403` `not_admin`. The Avatar\nOwner, an Avatar Admin and a member of the MaxGood.work User Support\nAvatar are never archived (`403` `owner`, `admin`, `support_avatar`),\nand a member whose account was erased cannot be changed (`409`\n`deleted`). The change is recorded in the Avatar's audit log.\n", "responses": { "200": { "description": "The member, now with `status` `archived` and `archived_at` set.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "$ref": "#/components/schemas/UserMembership" } } } ] }, "examples": { "member": { "$ref": "#/components/examples/UserMembershipExample" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The member may not be archived, or the key's issuer may not archive members. The `error_code` names the reason.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Avatar Admins cannot be archived.", "message": "Avatar Admins cannot be archived.", "error": "admin", "error_code": "admin" } } } }, "404": { "description": "The user is not a member of your Avatar (`not_member`).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "That person is not a member of this Avatar.", "message": "That person is not a member of this Avatar.", "error": "not_member", "error_code": "not_member" } } } }, "409": { "description": "The member's account was erased (`deleted`).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "This member's account has been erased and cannot be changed.", "message": "This member's account has been erased and cannot be changed.", "error": "deleted", "error_code": "deleted" } } } }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } } }, "/users/{user_id}/unarchive": { "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The MaxGood.work user id of the member." } ], "post": { "tags": [ "Users" ], "operationId": "unarchiveUser", "summary": "Unarchive a member", "description": "Restores an archived member exactly as archiving paused them, as an\nAvatar Owner or Avatar Admin does in the MaxGood.work web app. The\nrequest takes no body and succeeds again for a member who is not\narchived. It takes a seat, so an Avatar with no open seat returns\n`409` `avatar_full` with `needed` and `open_seats`. The keys that may\nunarchive, and the other refusals, are those of\n`POST /users/{user_id}/archive`.\n", "responses": { "200": { "description": "The member, now without `archived_at`.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "$ref": "#/components/schemas/UserMembership" } } } ] }, "examples": { "member": { "$ref": "#/components/examples/UserMembershipExample" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The key's issuer may not unarchive members. The `error_code` names the reason.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "You do not have permission to archive members of this Avatar.", "message": "You do not have permission to archive members of this Avatar.", "error": "not_admin", "error_code": "not_admin" } } } }, "404": { "description": "The user is not a member of your Avatar (`not_member`).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "That person is not a member of this Avatar.", "message": "That person is not a member of this Avatar.", "error": "not_member", "error_code": "not_member" } } } }, "409": { "description": "The Avatar has no open seat (`avatar_full`), or the member's account was erased (`deleted`).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "This Avatar has no open slots, so this member cannot be unarchived. Remove or archive another member first.", "message": "This Avatar has no open slots, so this member cannot be unarchived. Remove or archive another member first.", "error": "avatar_full", "error_code": "avatar_full", "needed": 1, "open_seats": 0 } } } }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } } }, "/users/{user_id}/files": { "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The MaxGood.work user id of the member." } ], "get": { "tags": [ "User Files" ], "operationId": "listUserFiles", "summary": "List a member's User Files", "description": "Lists the User Files kept about a member, newest first. The\nintroduction states which keys read them. A key whose issuer lists\nthe files without their names receives `access` `metadata`, with\n`filename` and `content_type` null. A user who is not an active\nmember of your Avatar, and a member the key's issuer may not reach,\nreturn the same `404`. A member-data read; it counts against the\nkey's read limit.\n\n`page` starts at 1. `page_size` defaults to 50 and is limited to 100;\na value outside the range returns `400` `invalid_paging`. `limits`\nreports the largest upload in bytes and the allowed file extensions,\nand `chunks_in_prompt` how many of a member's User File chunks the\nAvatar reads when it answers that member.\n", "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1 } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 50 } } ], "responses": { "200": { "description": "One page of the member's User Files.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "user_id": { "type": "string" }, "access": { "type": "string", "enum": [ "content", "metadata" ] }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/UserFile" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer", "description": "The member's User Files across all pages." }, "limits": { "type": "object", "properties": { "max_bytes": { "type": "integer", "format": "int64" }, "allowed_extensions": { "type": "array", "items": { "type": "string" } } } }, "chunks_in_prompt": { "type": "integer" } } } } } ] }, "example": { "result": "success", "response": { "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27", "access": "content", "files": [ { "file_id": "4f2a9c1e8b7d4a63b5c0e1f2a3b4c5d6", "filename": "intake-notes.pdf", "extension": "pdf", "content_type": "application/pdf", "size_bytes": 48213, "chunk_count": 6, "uploaded_at": "2026-11-09T14:20:00+00:00" } ], "page": 1, "page_size": 50, "total": 1, "limits": { "max_bytes": 10485760, "allowed_extensions": [ "pdf", "docx", "txt", "md" ] }, "chunks_in_prompt": 3 } } } } }, "400": { "description": "The `page` or `page_size` is outside its range.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "page_size must be from 1 to 100.", "error_code": "invalid_paging" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/UserNotFound" }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "description": "The User File settings or the Avatar type's settings could not be read. Retry the request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "User Files are not available right now.", "error_code": "user_documents_unavailable" } } } } } }, "post": { "tags": [ "User Files" ], "operationId": "uploadUserFile", "summary": "Upload a User File", "description": "Stores a document about a member and makes its text available to the\nAvatar when it answers that member. The request is\n`multipart/form-data` with one part named `file`. The file passes the\nsame checks as an upload in the MaxGood.work web app: its extension\nis one of `limits.allowed_extensions` of `GET /users/{user_id}/files`,\nit is not empty, it is within `limits.max_bytes`, and text can be read\nfrom it. Only a key whose issuer has full access to the member's User\nFiles uploads (see the introduction); another key returns `403`\n`user_files_owner_coach_only`. Uploads count against the Avatar's\nhourly upload limit, which is checked before anything else.\n", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "file" ], "properties": { "file": { "type": "string", "format": "binary", "description": "The document." } } } } } }, "responses": { "201": { "description": "The file is stored.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "file": { "$ref": "#/components/schemas/UserFile" } } } } } ] }, "example": { "result": "success", "response": { "file": { "file_id": "4f2a9c1e8b7d4a63b5c0e1f2a3b4c5d6", "filename": "intake-notes.pdf", "extension": "pdf", "content_type": "application/pdf", "size_bytes": 48213, "chunk_count": 6, "uploaded_at": "2026-11-09T14:20:00+00:00" } } } } } }, "400": { "description": "The request has no `file` part, the file is empty, its extension is not allowed, or no text could be read from it.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "This file type is not allowed.", "error_code": "file_type_not_allowed" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "description": "The key's issuer may list the member's User Files and may not upload.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "The key's issuer may list this member's User Files without their names but may not open, upload or delete them.", "error_code": "user_files_owner_coach_only" } } } }, "404": { "$ref": "#/components/responses/UserNotFound" }, "413": { "description": "The file is over the size limit.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "The file is too large.", "error_code": "file_too_large" } } } }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "description": "The text could not be extracted or stored. Nothing is stored; retry the upload.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "The text could not be read from the file right now.", "error_code": "extraction_failed" } } } } } } }, "/users/{user_id}/files/{file_id}": { "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The MaxGood.work user id of the member." }, { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The id of the User File, from `GET /users/{user_id}/files`." } ], "get": { "tags": [ "User Files" ], "operationId": "getUserFile", "summary": "Get a User File", "description": "Returns the details of one User File. The text the Avatar extracted\nis at `GET /users/{user_id}/files/{file_id}/chunks`; the original\nfile is not offered for download. A file that does not exist, is\nanother member's or belongs to another Avatar returns `404`\n`File not found.`. A key whose issuer has no full access to the\nmember's User Files returns `403` `user_files_owner_coach_only`. A\nmember-data read; it counts against the key's read limit.\n", "responses": { "200": { "description": "The User File.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "file": { "$ref": "#/components/schemas/UserFile" } } } } } ] }, "example": { "result": "success", "response": { "file": { "file_id": "4f2a9c1e8b7d4a63b5c0e1f2a3b4c5d6", "filename": "intake-notes.pdf", "extension": "pdf", "content_type": "application/pdf", "size_bytes": 48213, "chunk_count": 6, "uploaded_at": "2026-11-09T14:20:00+00:00" } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/UserFilesOwnerCoachOnly" }, "404": { "description": "The user is not a member the key's issuer may reach, or the file does not exist, is another member's or belongs to another Avatar.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "File not found." } } } }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } }, "delete": { "tags": [ "User Files" ], "operationId": "deleteUserFile", "summary": "Delete a User File", "description": "Deletes a User File and its original. `mode` is `hard` when nothing\nelse refers to the file, and `soft` when an earlier reply cited one of\nits chunks: the text is then redacted and a record of the citation\nstays. The key's issuer needs full access to the member's User Files.\n", "responses": { "200": { "description": "The User File is deleted.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "deleted": { "type": "boolean" }, "mode": { "type": "string", "enum": [ "hard", "soft" ] } } } } } ] }, "example": { "result": "success", "response": { "deleted": true, "mode": "hard" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/UserFilesOwnerCoachOnly" }, "404": { "description": "The user is not a member the key's issuer may reach, or the file does not exist, is another member's or belongs to another Avatar.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "File not found." } } } } } } }, "/users/{user_id}/files/{file_id}/chunks": { "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The MaxGood.work user id of the member." }, { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The id of the User File, from `GET /users/{user_id}/files`." } ], "get": { "tags": [ "User Files" ], "operationId": "listUserFileChunks", "summary": "Read a User File's text", "description": "Returns the text the Avatar extracted from a User File, in chunks in\nfile order, one page at a time. This is the text the Avatar reads\nwhen it answers the member. `page` starts at 1. `page_size` defaults\nto 50 and is limited to 100; a value outside the range returns `400`\n`invalid_paging`. The key's issuer needs full access to the member's\nUser Files. A member-data read; it counts against the key's read\nlimit.\n", "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1 } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 50 } } ], "responses": { "200": { "description": "One page of the file's chunks.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "file": { "$ref": "#/components/schemas/UserFile" }, "chunks": { "type": "array", "items": { "$ref": "#/components/schemas/UserFileChunk" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer", "description": "The file's chunks across all pages." } } } } } ] }, "example": { "result": "success", "response": { "file": { "file_id": "4f2a9c1e8b7d4a63b5c0e1f2a3b4c5d6", "filename": "intake-notes.pdf", "extension": "pdf", "content_type": "application/pdf", "size_bytes": 48213, "chunk_count": 6, "uploaded_at": "2026-11-09T14:20:00+00:00" }, "chunks": [ { "chunk_id": "9a1b2c3d4e5f60718293a4b5c6d7e8f9", "position": 1, "text": "Maria leads a team of eight and wants shorter planning meetings.", "token_count": 12 } ], "page": 1, "page_size": 50, "total": 6 } } } } }, "400": { "description": "The `page` or `page_size` is outside its range.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "page_size must be from 1 to 100.", "error_code": "invalid_paging" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/UserFilesOwnerCoachOnly" }, "404": { "description": "The user is not a member the key's issuer may reach, or the file does not exist, is another member's or belongs to another Avatar.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "File not found." } } } }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } } }, "/interactions": { "get": { "tags": [ "Interactions" ], "operationId": "listInteractions", "summary": "List the Avatar's interactions", "description": "Lists the interactions with your Avatar of every member the key's\nissuer reads in the MaxGood.work web app, newest first. The\nintroduction states what each issuer reads, and `scope` names the\nrule applied: `all`, `own_and_clients` or `clients`. A key whose\nissuer reads no interactions returns `404` `Interactions not found.`.\nA member-data read; it counts against the key's read limit.\n\n`page` starts at 1. `page_size` defaults to 50 and is limited to 100.\n`since` keeps the interactions stored at or after an ISO 8601 date\n(`2026-11-01`, midnight UTC) or timestamp (`2026-11-01T09:30:00Z`);\na value without an offset is UTC. A value outside a range returns\n`400`. Each read is recorded in the Avatar's audit log by interaction\nid, never by text.\n", "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1 } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 50 } }, { "name": "since", "in": "query", "required": false, "schema": { "type": "string" }, "description": "An ISO 8601 date or timestamp. Interactions stored before it are left out." } ], "responses": { "200": { "description": "One page of interactions.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "access": { "type": "string", "enum": [ "content" ] }, "scope": { "type": "string", "enum": [ "all", "own_and_clients", "clients" ] }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer", "description": "The interactions that match across all pages." }, "interactions": { "type": "array", "items": { "$ref": "#/components/schemas/Interaction" } } } } } } ] }, "example": { "result": "success", "response": { "access": "content", "scope": "all", "page": 1, "page_size": 50, "total": 1, "interactions": [ { "id": "1048223", "org_id": "65f1c2a9b7d3e4a1c8f09b12", "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27", "created_at": "2026-11-17T15:04:05.120Z", "access": "content", "references": [ "66a0d4e1c9b8f7a2d3e45f60" ], "user_text": "How can I make our sprint planning shorter?", "reply": "Start with a clear timebox for each topic." } ] } } } } }, "400": { "description": "The `page`, `page_size` or `since` is not valid.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "since must be an ISO-8601 date or timestamp.", "error_code": "invalid_since" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "description": "The key's issuer reads no interactions of your Avatar.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "Interactions not found." } } } }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } } }, "/users/{user_id}/interactions": { "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The MaxGood.work user id of the member." } ], "get": { "tags": [ "Interactions" ], "operationId": "listUserInteractions", "summary": "List a member's interactions", "description": "Lists one member's interactions with your Avatar, newest first, as the\nkey's issuer reads them in the MaxGood.work web app.\n\n- **Content access.** `access` is `content`, `interactions` holds the\n page and `summary` is null.\n- **Metadata access.** `access` is `metadata`, `interactions` is\n empty, `total` is 0 and `summary` holds counts and sizes without any\n text. This is what an Avatar Admin of an Enterprise Avatar sees of\n a member who is not their client.\n- **No access.** A user who does not exist, is not a member, was\n erased, or whose interactions the key's issuer may not read returns\n the same `404` `User not found.`.\n\nA member who left your Avatar is read where the key's issuer reads\nformer members in the web app (the Avatar Owner and MaxGood.work staff\nread every former member), under the Avatar's retention model: rows\nstored after the member left carry `access` `metadata` and no text\nunless the model keeps the whole interaction.\n\n`page`, `page_size` and `since` work as in `GET /interactions`. A\nmember-data read; it counts against the key's read limit.\n", "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1 } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 50 } }, { "name": "since", "in": "query", "required": false, "schema": { "type": "string" }, "description": "An ISO 8601 date or timestamp. Interactions stored before it are left out." } ], "responses": { "200": { "description": "One page of the member's interactions, or their summary.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "user_id": { "type": "string" }, "access": { "type": "string", "enum": [ "content", "metadata" ] }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" }, "interactions": { "type": "array", "items": { "$ref": "#/components/schemas/Interaction" } }, "summary": { "nullable": true, "allOf": [ { "$ref": "#/components/schemas/InteractionSummary" } ] } } } } } ] }, "example": { "result": "success", "response": { "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27", "access": "content", "page": 1, "page_size": 50, "total": 1, "interactions": [ { "id": "1048223", "org_id": "65f1c2a9b7d3e4a1c8f09b12", "user_id": "7c1d5e0a9b2f4c36a8e1d0b4f5a96c27", "created_at": "2026-11-17T15:04:05.120Z", "access": "content", "references": [ "66a0d4e1c9b8f7a2d3e45f60" ], "user_text": "How can I make our sprint planning shorter?", "reply": "Start with a clear timebox for each topic." } ], "summary": null } } } } }, "400": { "description": "The `page`, `page_size` or `since` is not valid.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FailureEnvelope" }, "example": { "result": "failure", "response": "page_size must be a whole number from 1 to 100.", "error_code": "invalid_page_size" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/UserNotFound" }, "429": { "$ref": "#/components/responses/RateLimited" }, "503": { "$ref": "#/components/responses/TierCheckUnavailable" } } } }, "/public/avatars": { "get": { "tags": [ "Public" ], "operationId": "listPublicAvatars", "summary": "List publicly listed Avatars", "security": [], "description": "Lists the Avatars whose public listing is on and whose Avatar type has\na public listing category, in ascending order of Avatar id. Each entry\ncarries only public fields. The optional `type` query narrows the list\nto one Avatar type, by exact name. A listing change appears on the\nnext request.\n\n`vision`, `mission`, `values`, `expertise` and `industries` are the\nAvatar's current Align settings. `category` is the heading the Avatar\nbelongs under, with its `rank`; show the list grouped by\n`category.rank`, lowest first, and render whatever `key`, `label` and\n`rank` you receive, because categories can be added. The current\ncategories are `featured` (\"Featured Avatars\", rank 1: Author and\nEnterprise Avatars), `essential` (\"Essential Avatars\", rank 2),\n`sai_starter` (\"Coach Avatars in Partnership with Scrum Alliance\",\nrank 3) and `tester` (\"Tester Avatars\", rank 4).\n\n`popularity` is `WAITLIST` when anyone is waiting to join the Avatar,\n`POPULAR` when half or more of the Avatar type's member capacity is\nfilled, and `NEW` otherwise, including when the type has no capacity\nlimit. Member and waitlist counts are not published. `public_link` is\nthe page to send a visitor to: the Avatar's newest intake form that is\nopen to the public without an access code, an absolute URL on the\nMaxGood.work web app of the form `\u2026/forms//
`;\notherwise `avatar_info_url` when it is not empty; otherwise null.\n", "parameters": [ { "name": "type", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Narrows the list to one Avatar type, for example \"Author Avatar\"." } ], "responses": { "200": { "description": "The listed Avatars.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "avatars": { "type": "array", "items": { "type": "object", "required": [ "category", "public_sort_rank" ], "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "mission": { "type": "string" }, "vision": { "type": "string" }, "values": { "type": "string" }, "industries": { "type": "string" }, "expertise": { "type": "string" }, "avatar_logo_url": { "type": "string" }, "type": { "type": "string" }, "avatar_info_url": { "type": "string", "description": "The Avatar's public info URL, or the empty string when it has none." }, "category": { "type": "object", "required": [ "key", "label", "rank" ], "description": "The public listing category the Avatar belongs under.", "properties": { "key": { "type": "string", "example": "featured" }, "label": { "type": "string", "example": "Featured Avatars" }, "rank": { "type": "integer", "example": 1 } } }, "created_on": { "type": "string", "format": "date", "nullable": true, "description": "The date the Avatar was created (`YYYY-MM-DD`, UTC), or null when unknown." }, "has_icon": { "type": "boolean", "description": "The Avatar has its own logo." }, "popularity": { "type": "string", "enum": [ "NEW", "POPULAR", "WAITLIST" ] }, "public_link": { "type": "string", "nullable": true, "description": "The page to send a visitor to, or null." }, "public_sort_rank": { "type": "integer", "description": "The order to show the list in, lowest first. It equals `category.rank`." } } } } } } } } ] }, "example": { "result": "success", "response": { "avatars": [ { "id": "65f1c2a9b7d3e4a1c8f09b12", "name": "Northwind Leadership Coach", "mission": "Help leaders build teams that trust each other.", "vision": "Workplaces where people do their best work.", "values": "Candour, curiosity, care", "industries": "Software, professional services", "expertise": "Team coaching", "avatar_logo_url": "https://app.example.com/logos/northwind.png", "type": "Author Avatar", "avatar_info_url": "https://northwind.example.com/coach", "category": { "key": "featured", "label": "Featured Avatars", "rank": 1 }, "created_on": "2026-03-18", "has_icon": true, "popularity": "POPULAR", "public_link": "https://app.example.com/forms/65f1c2a9b7d3e4a1c8f09b12/intake", "public_sort_rank": 1 } ] } } } } }, "429": { "$ref": "#/components/responses/PublicRateLimited" } } } }, "/public/free-avatars": { "get": { "tags": [ "Public" ], "operationId": "listPublicFreeAvatars", "summary": "List the free Avatars", "security": [], "description": "Lists the Avatars that every new MaxGood.work account receives for free\n(the Avatars granted to everyone who signs up and to every free\naccount), once per Avatar, ordered by `name` without regard to case.\nEach entry has exactly three fields:\n\n- `name`, the Avatar's name.\n- `free_trial_days`, how long the Avatar is free for a new account.\n `0` means free with no end date; any other value is the free period\n in days. When an Avatar is granted more than once, the grant a new\n free account receives applies; among several such grants `0` wins\n over any period, otherwise the longest period.\n- `key_benefit`, one short sentence naming what a person gets from the\n Avatar, or the empty string when none is written.\n\nThe response is cached for up to 5 minutes, and a change to the free\nAvatars or their key benefits appears on the next request.\n", "responses": { "200": { "description": "The free Avatars.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "required": [ "avatars" ], "properties": { "avatars": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "name", "free_trial_days", "key_benefit" ], "properties": { "name": { "type": "string" }, "free_trial_days": { "type": "integer", "minimum": 0, "description": "`0` is free with no end date; otherwise the free period in days." }, "key_benefit": { "type": "string", "description": "One short sentence naming the Avatar's key benefit, or the empty string." } } } } } } } } ] }, "example": { "result": "success", "response": { "avatars": [ { "name": "MaxGood.work User Support", "free_trial_days": 0, "key_benefit": "Get quick, friendly answers about using MaxGood.work whenever you need them." } ] } } } } }, "429": { "$ref": "#/components/responses/PublicRateLimited" } } } }, "/public/foundation-titles": { "get": { "tags": [ "Public" ], "operationId": "listPublicFoundationTitles", "summary": "List public Foundation Titles", "security": [], "description": "Lists the public Foundation Titles (licensed expert content) with\ntheir descriptions and a live usage count, the number of times the\ntitle's content has been cited in an Avatar reply. A title is public\nwhen it is visible to all Avatars and not deleted.\n", "responses": { "200": { "description": "The public Foundation Titles.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "titles": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "authors": { "type": "array", "items": { "type": "string" } }, "owner": { "type": "string", "description": "The title's owner." }, "title_usage_count": { "type": "integer", "description": "The number of times the title's content has been cited in an Avatar reply." }, "image_url": { "type": "string", "description": "The title's approved image, or the empty string." } } } } } } } } ] }, "example": { "result": "success", "response": { "titles": [ { "id": "66a0d4e1c9b8f7a2d3e45f77", "title": "The Team Retrospective Handbook", "description": "A practical guide to running retrospectives.", "authors": [ "Jordan Lee" ], "owner": "5d2c9a7e1b3f4086a9c1e2d3f4a5b6c7", "title_usage_count": 1280, "image_url": "https://app.example.com/images/retrospective-handbook.png" } ] } } } } }, "429": { "$ref": "#/components/responses/PublicRateLimited" } } } }, "/public/showcase": { "get": { "tags": [ "Public" ], "operationId": "getPublicShowcase", "summary": "Get the licensed-expert showcase", "security": [], "description": "Returns the two collections a licensed-expert showcase page shows\ntogether, composed for display: the public Foundation Titles and the\npublicly listed Author Avatars (the `GET /public/avatars` listing\nnarrowed to the type `Author Avatar`).\n\nEach entry of `titles` appears once, ordered by `name`, with its\n`description` and the author names to print: the names the title\ncarries, otherwise the display name of the Licensed Author who owns\nit. `image_url` and `owner_image_url` hold an approved image and are\nthe empty string when there is none.\n\nEach entry of `author_avatars` carries the Avatar's logo, its info URL\n(`avatar_info_url`, the empty string when there is none) and a `blurb`\ncomposed from the Avatar's mission, vision, values, industries and\nexpertise, in that order, with blank fields left out.\n", "responses": { "200": { "description": "The showcase.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "titles": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "authors": { "type": "array", "items": { "type": "string" } }, "image_url": { "type": "string" }, "owner_image_url": { "type": "string" } } } }, "author_avatars": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" }, "blurb": { "type": "string" }, "avatar_logo_url": { "type": "string" }, "avatar_info_url": { "type": "string", "description": "The Avatar's public info URL, or the empty string when it has none." } } } } } } } } ] }, "example": { "result": "success", "response": { "titles": [ { "id": "66a0d4e1c9b8f7a2d3e45f77", "name": "The Team Retrospective Handbook", "description": "A practical guide to running retrospectives.", "authors": [ "Jordan Lee" ], "image_url": "https://app.example.com/images/retrospective-handbook.png", "owner_image_url": "https://app.example.com/images/jordan-lee.png" } ], "author_avatars": [ { "id": "65f1c2a9b7d3e4a1c8f09b12", "name": "Northwind Leadership Coach", "type": "Author Avatar", "blurb": "Help leaders build teams that trust each other. Workplaces where people do their best work.", "avatar_logo_url": "https://app.example.com/logos/northwind.png", "avatar_info_url": "https://northwind.example.com/coach" } ] } } } } }, "429": { "$ref": "#/components/responses/PublicRateLimited" } } } }, "/public/authors": { "get": { "tags": [ "Public" ], "operationId": "listPublicAuthors", "summary": "List public Licensed Authors", "security": [], "description": "Lists the Licensed Authors who are publicly shown: authors who own a\npublic Author Avatar or have at least one public Foundation Title.\nEach entry has the display name, bio, backlink and an approved photo\nURL.\n", "responses": { "200": { "description": "The public Licensed Authors.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "authors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "display_name": { "type": "string" }, "bio": { "type": "string" }, "backlink": { "type": "string" }, "photo_url": { "type": "string", "description": "The author's approved photo, or the empty string." } } } } } } } } ] }, "example": { "result": "success", "response": { "authors": [ { "id": "5d2c9a7e1b3f4086a9c1e2d3f4a5b6c7", "display_name": "Jordan Lee", "bio": "Jordan coaches teams through change.", "backlink": "https://jordanlee.example.com", "photo_url": "https://app.example.com/images/jordan-lee.png" } ] } } } } }, "429": { "$ref": "#/components/responses/PublicRateLimited" } } } }, "/public/stats": { "get": { "tags": [ "Public" ], "operationId": "getPublicStats", "summary": "Get platform statistics", "security": [], "description": "Returns platform-wide historical totals: the number of Avatars, user\naccounts and stored interactions. The totals are historical and\ninclude archived and removed accounts and interactions, so they only\ngrow. The response is cached for up to 2 minutes.\n", "responses": { "200": { "description": "The totals.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/SuccessEnvelope" }, { "type": "object", "properties": { "response": { "type": "object", "properties": { "total_organizations": { "type": "integer", "description": "The number of Avatars." }, "total_users": { "type": "integer" }, "total_interactions": { "type": "integer" } } } } } ] }, "example": { "result": "success", "response": { "total_organizations": 412, "total_users": 18230, "total_interactions": 1204518 } } } } }, "429": { "$ref": "#/components/responses/PublicRateLimited" } } } } } }