Every API here is available over the APIs.io API and to AI agents over MCP.
{"openapi":"3.1.0","info":{"title":"Historis API","version":"0.1.0","summary":"Public REST + MCP surface for the Historis operational memory.","description":"Historis keeps a shared, event-based timeline of what happened, linked to the right people. This document describes the public REST API and the MCP transport. Most REST endpoints require a Supabase session JWT (a signed-in person) and are rate-limited per identity; a Supabase OAuth 2.1 access token carries a client_id claim, belongs on the MCP transport, and is refused on the REST gates with 403 assistant_token_rejected (HIS-926). Discover the MCP server at /.well-known/mcp and the OAuth authorization server at /.well-known/oauth-authorization-server.","contact":{"name":"Historis","url":"https://historis.app"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://api.historis.app","description":"Historis REST API"},{"url":"https://historis.app","description":"Marketing host (proxies /api/* to the REST API)"}],"tags":[{"name":"Auth","description":"Authentication and session management"},{"name":"Persons","description":"Contacts (clients, suppliers, partners)"},{"name":"Events","description":"Timeline events and their links"},{"name":"Search","description":"Full-text search"},{"name":"Tags","description":"Tag-based organization"},{"name":"Organization","description":"Organization, members, invitations"},{"name":"Teams","description":"Teams and team membership"},{"name":"Rules","description":"Markdown automation rules for agents"},{"name":"Knowledge","description":"Knowledge notes: faceted exploration and saved views"},{"name":"Dashboard","description":"Dashboard and usage insights"},{"name":"Billing","description":"Stripe subscriptions and billing"},{"name":"Webhooks","description":"Inbound webhook endpoints"},{"name":"Integrations","description":"Connected AI clients and permissions"},{"name":"Onboarding","description":"Onboarding checklist"},{"name":"MCP","description":"Model Context Protocol transport"},{"name":"OAuth","description":"OAuth consent proxy"},{"name":"Health","description":"Health checks"},{"name":"Discovery","description":"Self-describing discovery documents"}],"security":[{"bearerAuth":[]}],"paths":{"/api/health":{"get":{"tags":["Health"],"summary":"Liveness + schema health","responses":{"200":{"description":"Service status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"timestamp":{"type":"string","format":"date-time"}},"required":["status"]}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[]}},"/api/auth/signup":{"post":{"tags":["Auth"],"summary":"Create an account","responses":{"200":{"description":"Session created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}}}}},"/api/auth/login":{"post":{"tags":["Auth"],"summary":"Log in, returns a session (JWT)","responses":{"200":{"description":"Session","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}}}}},"/api/auth/logout":{"post":{"tags":["Auth"],"summary":"Log out the current session","responses":{"200":{"description":"Logged out","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/auth/session":{"get":{"tags":["Auth"],"summary":"Current session + user role","responses":{"200":{"description":"Session details","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/auth/reset-password":{"post":{"tags":["Auth"],"summary":"Send a password-reset email","responses":{"200":{"description":"Email queued","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"]}}}}}},"/api/auth/change-password":{"post":{"tags":["Auth"],"summary":"Change the current password","responses":{"200":{"description":"Password changed","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/auth/profile":{"patch":{"tags":["Auth"],"summary":"Update the user profile (name)","responses":{"200":{"description":"Updated profile","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}}}},"/api/auth/preferences":{"get":{"tags":["Auth"],"summary":"Read user preferences (locale, timezone, density, theme)","responses":{"200":{"description":"Preferences","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"patch":{"tags":["Auth"],"summary":"Update user preferences","responses":{"200":{"description":"Updated preferences","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/auth/account":{"delete":{"tags":["Auth"],"summary":"Delete the current account","responses":{"200":{"description":"Account deleted","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/auth/refresh":{"post":{"tags":["Auth"],"summary":"Rotate the refresh token","responses":{"200":{"description":"New session","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[]}},"/api/bootstrap":{"post":{"tags":["Organization"],"summary":"Create the default organization on first login","responses":{"200":{"description":"Existing organization","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Organization created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/persons":{"get":{"tags":["Persons"],"summary":"List persons (paginated, filterable by tags/search)","responses":{"200":{"description":"Page of persons","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"parameters":[{"$ref":"#/components/parameters/SearchQuery"},{"$ref":"#/components/parameters/TagsQuery"},{"$ref":"#/components/parameters/LimitQuery"},{"$ref":"#/components/parameters/OffsetQuery"}]},"post":{"tags":["Persons"],"summary":"Create a person","responses":{"201":{"description":"Created person","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/DuplicateEmail"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonInput"}}}}}},"/api/persons/{personId}":{"parameters":[{"name":"personId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Persons"],"summary":"Get a person and their events","responses":{"200":{"description":"Person","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"patch":{"tags":["Persons"],"summary":"Update a person","responses":{"200":{"description":"Updated person","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/DuplicateEmail"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonInput"}}}}},"delete":{"tags":["Persons"],"summary":"Delete a person","responses":{"204":{"description":"Deleted"},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/persons/{personId}/relations":{"parameters":[{"name":"personId","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Persons"],"summary":"Create a contact-to-contact relation from this person","responses":{"201":{"description":"Relation created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"relatedPersonId":{"type":"string","format":"uuid"},"type":{"type":"string"}},"required":["relatedPersonId"]}}}}}},"/api/persons/{personId}/relations/{relatedPersonId}":{"parameters":[{"name":"personId","in":"path","required":true,"schema":{"type":"string"}},{"name":"relatedPersonId","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"tags":["Persons"],"summary":"Delete a contact-to-contact relation","responses":{"204":{"description":"Deleted"},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/events":{"get":{"tags":["Events"],"summary":"List events (paginated, filterable)","responses":{"200":{"description":"Page of events","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"parameters":[{"$ref":"#/components/parameters/SearchQuery"},{"$ref":"#/components/parameters/TagsQuery"},{"$ref":"#/components/parameters/LimitQuery"},{"$ref":"#/components/parameters/OffsetQuery"}]},"post":{"tags":["Events"],"summary":"Create an event","responses":{"201":{"description":"Created event","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventInput"}}}}}},"/api/events/{eventId}":{"parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Events"],"summary":"Get an event","responses":{"200":{"description":"Event","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"patch":{"tags":["Events"],"summary":"Update an event","responses":{"200":{"description":"Updated event","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventInput"}}}}},"delete":{"tags":["Events"],"summary":"Delete an event","responses":{"204":{"description":"Deleted"},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/events/{eventId}/persons":{"parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Events"],"summary":"Link a person to an event","responses":{"200":{"description":"Linked","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"}},"required":["personId"]}}}}}},"/api/events/{eventId}/persons/{personId}":{"parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}},{"name":"personId","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"tags":["Events"],"summary":"Unlink a person from an event","responses":{"204":{"description":"Unlinked"},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/events/{eventId}/related":{"parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Events"],"summary":"Link an event to another event","responses":{"200":{"description":"Linked","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"relatedEventId":{"type":"string","format":"uuid"}},"required":["relatedEventId"]}}}}}},"/api/events/{eventId}/related/{relatedEventId}":{"parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}},{"name":"relatedEventId","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"tags":["Events"],"summary":"Unlink a related event","responses":{"204":{"description":"Unlinked"},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/events/{parentId}/children":{"parameters":[{"name":"parentId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Events"],"summary":"List an event's child events (thread)","responses":{"200":{"description":"Child events","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/search":{"get":{"tags":["Search"],"summary":"Full-text search across events and persons","responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"parameters":[{"$ref":"#/components/parameters/SearchQuery"}]}},"/api/tags":{"get":{"tags":["Tags"],"summary":"List tags with counters","responses":{"200":{"description":"Tags","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"tags":["Tags"],"summary":"Create a tag","responses":{"201":{"description":"Created tag","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagInput"}}}}}},"/api/tags/events":{"get":{"tags":["Tags"],"summary":"Tags used on events","responses":{"200":{"description":"Tags","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/tags/persons":{"get":{"tags":["Tags"],"summary":"Tags used on persons","responses":{"200":{"description":"Tags","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/tags/manage":{"get":{"tags":["Tags"],"summary":"Management list (all org tags incl. unused, with counts)","responses":{"200":{"description":"Tag management list","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"parameters":[{"$ref":"#/components/parameters/SearchQuery"},{"$ref":"#/components/parameters/LimitQuery"},{"$ref":"#/components/parameters/OffsetQuery"}]}},"/api/tags/duplicates":{"get":{"tags":["Tags"],"summary":"Likely-duplicate tag pairs","responses":{"200":{"description":"Duplicate pairs","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/tags/followed":{"get":{"tags":["Tags"],"summary":"Tags the current user follows","responses":{"200":{"description":"Followed tags","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/tags/followed/{tagId}":{"parameters":[{"name":"tagId","in":"path","required":true,"schema":{"type":"string"}}],"put":{"tags":["Tags"],"summary":"Follow a tag","responses":{"200":{"description":"Followed","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"delete":{"tags":["Tags"],"summary":"Unfollow a tag","responses":{"204":{"description":"Unfollowed"},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/tags/{id}/impact":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Tags"],"summary":"Org-wide impact preview for delete/merge dialogs","responses":{"200":{"description":"Impact","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/tags/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"tags":["Tags"],"summary":"Update a tag description and/or name (owner-only rename)","responses":{"200":{"description":"Updated tag","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagInput"}}}}},"delete":{"tags":["Tags"],"summary":"Delete a tag","responses":{"204":{"description":"Deleted"},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/tags/merge":{"post":{"tags":["Tags"],"summary":"Merge one tag into another","responses":{"200":{"description":"Merged","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fromSlug":{"type":"string"},"toSlug":{"type":"string"}},"required":["fromSlug","toSlug"]}}}}}},"/api/tags/keep-separate":{"get":{"tags":["Tags"],"summary":"List pairs marked \"keep separate\"","responses":{"200":{"description":"Pairs","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"tags":["Tags"],"summary":"Mark a pair as not duplicates","responses":{"200":{"description":"Marked","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagPair"}}}}},"delete":{"tags":["Tags"],"summary":"Restore a dismissed pair","responses":{"200":{"description":"Restored","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagPair"}}}}}},"/api/organization/members":{"get":{"tags":["Organization"],"summary":"List members","responses":{"200":{"description":"Members","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/organization/members/{userId}":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"tags":["Organization"],"summary":"Change a member's role (owner only)","responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","member"]}},"required":["role"]}}}}},"delete":{"tags":["Organization"],"summary":"Remove a member (owner only)","responses":{"204":{"description":"Removed"},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/organization/invitations":{"get":{"tags":["Organization"],"summary":"List invitations (owner only)","responses":{"200":{"description":"Invitations","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"tags":["Organization"],"summary":"Create an invitation (owner only)","responses":{"201":{"description":"Invitation created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["owner","member"]}},"required":["email"]}}}}}},"/api/organization/invitations/{invitationId}":{"parameters":[{"name":"invitationId","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"tags":["Organization"],"summary":"Cancel an invitation (owner only)","responses":{"204":{"description":"Cancelled"},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/organization/invitations/token/{token}":{"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Organization"],"summary":"Public invitation details by token","responses":{"200":{"description":"Invitation","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[]}},"/api/organization/invitations/token/{token}/accept":{"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Organization"],"summary":"Accept an invitation","responses":{"200":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/organization/leave":{"post":{"tags":["Organization"],"summary":"Leave the organization","responses":{"200":{"description":"Left","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/organization":{"delete":{"tags":["Organization"],"summary":"Delete the organization (owner only)","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/organization/export":{"get":{"tags":["Organization"],"summary":"Export all organization data","responses":{"200":{"description":"Export","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/organization/info":{"get":{"tags":["Organization"],"summary":"Read organization info","responses":{"200":{"description":"Org info","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"patch":{"tags":["Organization"],"summary":"Update organization info","responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/organization/security":{"get":{"tags":["Organization"],"summary":"Read organization security settings (MFA, min visibility)","responses":{"200":{"description":"Security settings","content":{"application/json":{"schema":{"type":"obj
# --- truncated at 32 KB (65 KB total) ---
# Full source: https://artifacts.apis.io/historis-app/openapi/_original/historis-app-api-openapi.json