Every API here is available over the APIs.io API and to AI agents over MCP.
{"openapi":"3.1.0","info":{"title":"Tintin API","description":"Control Plane for Tintin AI Virtual MCN Platform","version":"0.1.0"},"paths":{"/api/auth/invite/{token}":{"get":{"tags":["auth"],"summary":"Get Invite Info","description":"Public endpoint to validate an invite token and return its details.","operationId":"get_invite_info_api_auth_invite__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_api_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/register/verify":{"post":{"tags":["auth"],"summary":"Register Verify","operationId":"register_verify_api_auth_register_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCodeRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/register/resend":{"post":{"tags":["auth"],"summary":"Register Resend","operationId":"register_resend_api_auth_register_resend_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/password/reset/request":{"post":{"tags":["auth"],"summary":"Password Reset Request","description":"Issue a 6-digit password-reset code via email.\n\nAlways returns 200 with the same generic message regardless of whether\nthe email belongs to an account, to avoid leaking which addresses are\nregistered. A pending lockout (`pwd_reset_lock:{email}`) silently\nsuppresses code generation.","operationId":"password_reset_request_api_auth_password_reset_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/password/reset/confirm":{"post":{"tags":["auth"],"summary":"Password Reset Confirm","description":"Verify the code, set the new password, and revoke all existing JWTs.\n\nBumps `user.token_version` so any token issued before this call is\nrejected by `get_current_user` on the next request. Frontend is\nexpected to redirect the user to the login page — no token is\nreturned.","operationId":"password_reset_confirm_api_auth_password_reset_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetConfirm"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google":{"post":{"tags":["auth"],"summary":"Google Auth","operationId":"google_auth_api_auth_google_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleAuthRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google/authorize":{"get":{"tags":["auth"],"summary":"Google Authorize","description":"Redirect to Google OAuth consent screen.\n\n`redirect_to` lets an allowlisted standalone app (nail.tintin-x.com) ask\nthe callback to return the user to its own host instead of app_url.\nRejected unless it matches `_ALLOWED_OAUTH_REDIRECT_BASES`.\n\n`signup_source` is the browser's base64url attribution blob. Signing it into\nthe state is the only way it survives the Google round-trip — a Google\nsign-in that turns out to be a first-time user creates the account in the\ncallback, with no further contact with the originating page.","operationId":"google_authorize_api_auth_google_authorize_get","parameters":[{"name":"client","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client"}},{"name":"redirect_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect To"}},{"name":"signup_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google/callback":{"get":{"tags":["auth"],"summary":"Google Callback","description":"Handle Google OAuth callback — exchange code, create/find user, redirect to frontend.","operationId":"google_callback_api_auth_google_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Clear the SSO cookie. Caller is also expected to drop any\nlocalStorage token of its own — this endpoint owns only the\n`Domain=.tintin-x.com` cookie. Unauthenticated to keep idempotent;\na stale call from a logged-out user is a no-op.","operationId":"logout_api_auth_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/api/auth/me":{"get":{"tags":["auth"],"summary":"Get Me","operationId":"get_me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/profile":{"patch":{"tags":["auth"],"summary":"Update Profile","description":"Update user profile and mark onboarding as completed.","operationId":"update_profile_api_auth_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/avatar-upload-url":{"post":{"tags":["auth"],"summary":"Get Avatar Upload Url","description":"Return a presigned PUT URL for uploading a profile avatar.","operationId":"get_avatar_upload_url_api_auth_avatar_upload_url_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/ui-state":{"patch":{"tags":["auth"],"summary":"Update Ui State","description":"Merge values into user.last_ui_state.","operationId":"update_ui_state_api_auth_ui_state_patch","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/studio/active-context":{"post":{"tags":["studio-teams"],"summary":"Set Active Context","description":"Switch the signed-in user's active studio context (personal ⇄ a team\nthey belong to). The server is the source of truth; reads (/me, billing)\nresolve from it. Switching to a team requires current membership.","operationId":"set_active_context_api_studio_active_context_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveContextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/studio/teams":{"post":{"tags":["studio-teams"],"summary":"Create Studio Team","description":"Create a studio team (caller becomes owner). One team per owner.","operationId":"create_studio_team_api_studio_teams_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStudioTeamRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/studio/teams/{team_id}/leave":{"post":{"tags":["studio-teams"],"summary":"Leave Studio Team","description":"Leave a studio team (members/admins only — owner must dissolve).","operationId":"leave_studio_team_api_studio_teams__team_id__leave_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}":{"get":{"tags":["studio-teams"],"summary":"Get Studio Team","description":"Team detail (members + pending invitations for owner/admin). Members only.","operationId":"get_studio_team_api_studio_teams__team_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTeamDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["studio-teams"],"summary":"Dissolve Studio Team","description":"Dissolve a studio team (owner only) — merges team credits into the\nowner's personal wallet, then deletes the team.","operationId":"dissolve_studio_team_api_studio_teams__team_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}/members":{"get":{"tags":["studio-teams"],"summary":"List Studio Team Members","description":"List a team's members. Members only.","operationId":"list_studio_team_members_api_studio_teams__team_id__members_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTeamMembersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}/invite":{"post":{"tags":["studio-teams"],"summary":"Invite Studio Member","description":"Invite an email to the team (owner/admin only). Sends the invite email\nbest-effort (reusing the legacy SES helper), then returns the invitation.","operationId":"invite_studio_member_api_studio_teams__team_id__invite_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTeamInvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/invitations/{token}":{"get":{"tags":["studio-teams"],"summary":"Get Studio Invitation Info","description":"PUBLIC (no auth) — fetch a pending invitation's team name / inviter /\nrole for the accept page. Still under the flag-gated router (so the whole\nfeature is off when the flag is off), but does NOT require a signed-in\nuser.","operationId":"get_studio_invitation_info_api_studio_invitations__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioInvitationInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/invitations/{token}/accept":{"post":{"tags":["studio-teams"],"summary":"Accept Studio Invitation","description":"Accept an invitation — adds a TeamMember row (multi-team, no money move).","operationId":"accept_studio_invitation_api_studio_invitations__token__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}/invitations/{invitation_id}":{"delete":{"tags":["studio-teams"],"summary":"Cancel Studio Invitation","description":"Cancel a pending invitation (owner/admin only).","operationId":"cancel_studio_invitation_api_studio_teams__team_id__invitations__invitation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}/members/{member_user_id}/role":{"patch":{"tags":["studio-teams"],"summary":"Change Studio Member Role","description":"Change a member's role (owner only).","operationId":"change_studio_member_role_api_studio_teams__team_id__members__member_user_id__role_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioChangeRoleRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}/members/{member_user_id}":{"delete":{"tags":["studio-teams"],"summary":"Remove Studio Member","description":"Remove (kick) a member (owner/admin only).","operationId":"remove_studio_member_api_studio_teams__team_id__members__member_user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}/transfer-ownership":{"post":{"tags":["studio-teams"],"summary":"Transfer Studio Ownership","description":"Transfer team ownership to another member (current owner only).","operationId":"transfer_studio_ownership_api_studio_teams__team_id__transfer_ownership_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTransferOwnershipRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/merge-duplicate-folders":{"post":{"tags":["agents"],"summary":"Merge Duplicate Folders","description":"Find and merge duplicate root-level storage folders with the same name.\n\nWhen team members trigger file tracking independently, duplicate folders\ncan be created (same name, different user_id). This merges them by moving\nall files from the smaller folder into the larger one, then deleting the empty folder.","operationId":"merge_duplicate_folders_api_agents_merge_duplicate_folders_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/cleanup-duplicate-media/{agent_id}":{"post":{"tags":["agents"],"summary":"Cleanup Duplicate Media User","description":"Delete duplicate media delivery messages and set Redis dedup flags.","operationId":"cleanup_duplicate_media_user_api_agents_cleanup_duplicate_media__agent_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/media":{"get":{"tags":["agents"],"summary":"List Media","description":"Return media items (images/videos) from chat history, paginated independently.","operationId":"list_media_api_agents__agent_id__media_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/feed":{"post":{"tags":["agents"],"summary":"Agent Feed","description":"Accept heartbeat reports and activity feed items from running agents.","operationId":"agent_feed_api_agents__agent_id__feed_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/doc-upload-urls":{"post":{"tags":["agent-documents"],"summary":"Get Doc Upload Urls","description":"Generate presigned PUT URLs for uploading context documents.","operationId":"get_doc_upload_urls_api_agents_doc_upload_urls_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocUploadUrlsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocUploadUrlsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/process-documents":{"post":{"tags":["agent-documents"],"summary":"Process Documents","description":"Extract text from uploaded documents and analyze with AI.","operationId":"process_documents_api_agents_process_documents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessDocumentsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessDocumentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/{agent_id}/update-documents":{"post":{"tags":["agent-documents"],"summary":"Update Agent Documents","description":"Process new documents for an existing agent.\n\nExtracts text, analyzes with AI, merges with existing doc_context and\ncurrent workspace content, updates character_json, and triggers\nworkspace refresh if the agent is active.","operationId":"update_agent_documents_api_agents__agent_id__update_documents_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentDocumentsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentDocumentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/chat-history":{"get":{"tags":["agent-chat-history"],"summary":"Get Chat History","description":"Return recent chat messages for this agent with cursor pagination.","operationId":"get_chat_history_api_agents__agent_id__chat_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before Id"}},{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/refresh-workspace-bulk":{"post":{"tags":["agents"],"summary":"Refresh Workspace Bulk","description":"Regenerate and upload workspace files for all active agents of the current user.","operationId":"refresh_workspace_bulk_api_agents_refresh_workspace_bulk_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/refresh-token":{"post":{"tags":["agents"],"summary":"Refresh Agent Token","description":"Refresh an expired agent JWT. Accepts tokens up to 7 days past expiry.\n\nCalled by long-running agent services to renew their API token\nwithout a full stop/start cycle.","operationId":"refresh_agent_token_api_agents_refresh_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agents/{agent_id}/refresh-workspace":{"post":{"tags":["agents"],"summary":"Refresh Workspace","description":"Regenerate and upload workspace files for a single active agent.\n\nReads existing tokens from S3 openclaw.json to avoid token rotation.\nOnly regenerates .md and skill files (not openclaw.json) by default.","operationId":"refresh_workspace_api_agents__agent_id__refresh_workspace_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/memories":{"get":{"tags":["agent-memories"],"summary":"List Memories","description":"List memories for an agent, scoped to what the caller can see.\n\nVisibility rule: caller sees memories where (user_id IS NULL) OR\n(user_id == self). Other users' user-scoped memories are not visible\neven when they share the same agent.","operationId":"list_memories_api_agents__agent_id__memories_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"user_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"'me' = current user only, 'agent' = agent-scoped only, 'all' = both (default)","title":"User Scope"},"description":"'me' = current user only, 'agent' = agent-scoped only, 'all' = both (default)"},{"name":"pinned","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pinned"}},{"name":"include_expired","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Expired"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/memories/{memory_id}":{"get":{"tags":["agent-memories"],"summary":"Get Memory","operationId":"get_memory_api_agents__agent_id__memories__memory_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Memory Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agent-memories"],"summary":"Update Memory","description":"Pin/unpin, edit text, or change kind.\n\nConfidence is admin-only — silently ignored for non-admins (we don't\nraise so the same UI form works for both admin and user). Admin\ndetection: `user.is_admin` flag on the User model.","operationId":"update_memory_api_agents__agent_id__memories__memory_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Memory Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agent-memories"],"summary":"Delete Memory","description":"Soft delete — sets expires_at = now(). The consolidator hard-deletes later.\n\nSoft delete preserves auditability and lets us recover from accidental\nUI deletes within a window. Pinned memories cannot be soft-deleted via\nthis route; unpin first.","operationId":"delete_memory_api_agents__agent_id__memories__memory_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Memory Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/memories":{"post":{"tags":["agent-memories"],"summary":"Create Memory Internal","description":"Internal-key write path.\n\nServer-side writers POST here with `X-Internal-Key` +\n`X-Internal-User-Id`. The route trusts the payload's agent_id but\nvalidates that the agent exists and that the resolved user can\naccess it.","operationId":"create_memory_internal_api_internal_memories_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/sche
# --- truncated at 32 KB (1156 KB total) ---
# Full source: https://artifacts.apis.io/tintin-x-com/openapi/_original/tintin-x-com-api-openapi.json