{"openapi":"3.1.0","info":{"title":"Glossa API","version":"1","summary":"Localization your AI agents can run","description":"Glossa is an AI-native translation management system: push any translation file, get every language translated by Claude, dedupe strings across apps, and let agents review, audit and improve your translations over MCP, CLI and API.\n\nEvery op is POST /api/v1/{op} with its input as a JSON body. The same ops are MCP tools at https://glossa-meterapp.vercel.app/api/mcp and CLI commands (npx @meterapp/glossa). Errors are RFC 9457 problem details; see https://glossa-meterapp.vercel.app/docs/errors.","contact":{"name":"Meter","email":"jonathan@welcome.meterapp.co","url":"https://glossa-meterapp.vercel.app/docs"}},"servers":[{"url":"https://glossa-meterapp.vercel.app"}],"externalDocs":{"description":"API reference","url":"https://glossa-meterapp.vercel.app/docs/api"},"security":[{"bearerAuth":[]}],"tags":[{"name":"meta","description":"The API catalog."},{"name":"workspace","description":"Workspace: Settings, stats and the activity log."},{"name":"projects","description":"Projects: Apps or repos, each with its source and target locales."},{"name":"files","description":"Files: Push translation files in, pull any locale back out."},{"name":"formats","description":"Formats: Detect, list and teach file formats."},{"name":"strings","description":"Strings: Deduplicated units, translations, merges and splits."},{"name":"tasks","description":"Review queue: Claim and resolve review tasks."},{"name":"glossary","description":"Glossary: Brand names and fixed terms."},{"name":"rules","description":"Rules: Standing instructions for every translation."},{"name":"audits","description":"Audits: Per-language quality reviews."},{"name":"jobs","description":"Jobs: Background AI work and its status."},{"name":"keys","description":"API keys: Workspace keys for CLI, MCP and CI."},{"name":"billing","description":"Billing: Plans, prices, checkout links and the subscription."}],"paths":{"/api/v1":{"get":{"operationId":"list_ops","summary":"List every op","description":"The machine-readable catalog of every op with its input JSON Schema. Public; needs no credential.","tags":["meta"],"security":[],"responses":{"200":{"description":"The op catalog.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsManifest"}}}}}}},"/api/v1/get_workspace":{"post":{"operationId":"get_workspace","summary":"Get workspace","description":"The workspace this credential belongs to: name, source locale and the product context every AI prompt starts with. Call first to orient yourself.","tags":["workspace"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"get_workspace_get","summary":"Get workspace (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. The workspace this credential belongs to: name, source locale and the product context every AI prompt starts with. Call first to orient yourself.","tags":["workspace"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/update_workspace":{"post":{"operationId":"update_workspace","summary":"Update workspace","description":"Change the workspace name, source locale or product context. The product context (what the app is, who uses it, tone) is prepended to every translation and audit prompt, so a good one improves every translation.","tags":["workspace"],"x-read-only":false,"x-admin-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"product_context":{"description":"What the product is, its audience, voice and tone.","type":"string","maxLength":8000},"source_locale":{"type":"string","minLength":2,"maxLength":35,"description":"BCP 47 locale, e.g. es, pt-BR, zh-Hans."}}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/get_stats":{"post":{"operationId":"get_stats","summary":"Get stats","description":"Counts across the workspace (projects, units, keys, open tasks) and per-locale translation coverage per project.","tags":["workspace"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"get_stats_get","summary":"Get stats (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Counts across the workspace (projects, units, keys, open tasks) and per-locale translation coverage per project.","tags":["workspace"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/list_projects":{"post":{"operationId":"list_projects","summary":"List projects","description":"Every project (app) in the workspace with its target locales. Strings are shared across projects; files belong to one.","tags":["projects"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"list_projects_get","summary":"List projects (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Every project (app) in the workspace with its target locales. Strings are shared across projects; files belong to one.","tags":["projects"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/create_project":{"post":{"operationId":"create_project","summary":"Create project","description":"Add a project (one app, site or service) with the locales it ships in. Push files to it with push_file.","tags":["projects"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"description":"URL-safe id; derived from the name when omitted.","type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,47}$"},"description":{"default":"","description":"What this app is; added to the product context for its strings.","type":"string","maxLength":4000},"target_locales":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":2,"maxLength":35,"description":"BCP 47 locale, e.g. es, pt-BR, zh-Hans."}},"auto_translate":{"default":true,"description":"Translate new strings into every target locale automatically.","type":"boolean"}},"required":["name"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/update_project":{"post":{"operationId":"update_project","summary":"Update project","description":"Change a project's name, description, target locales or auto-translate. Adding a locale with auto_translate on queues translation of every existing string into it.","tags":["projects"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"description":"Project slug or id."},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":4000},"target_locales":{"maxItems":100,"type":"array","items":{"type":"string","minLength":2,"maxLength":35,"description":"BCP 47 locale, e.g. es, pt-BR, zh-Hans."}},"auto_translate":{"type":"boolean"}},"required":["project"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/list_files":{"post":{"operationId":"list_files","summary":"List files","description":"Files of a project. `path` is a pattern: `{locale}` (or `{android_locale}`) stands for each locale's copy, so one row covers en.json, es.json, ….","tags":["files"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"description":"Project slug or id."}},"required":["project"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"list_files_get","summary":"List files (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Files of a project. `path` is a pattern: `{locale}` (or `{android_locale}`) stands for each locale's copy, so one row covers en.json, es.json, ….","tags":["files"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/push_file":{"post":{"operationId":"push_file","summary":"Push file","description":"Upload a translation file in any format (JSON, YAML, xcstrings, .strings, stringsdict, strings.xml, PO, XLIFF, ARB, properties, RESX, CSV, or one Glossa learned). A source-locale file creates or updates keys and dedupes their strings into shared units across every project; another locale's file imports its translations. New strings are queued for AI translation. A format nobody can read yet starts a learn_format job instead.","tags":["files"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"description":"Project slug or id."},"path":{"type":"string","minLength":1,"maxLength":500,"description":"Path in the repo, e.g. ios/App/en.lproj/Localizable.strings or locales/en.json. Used to infer the locale."},"content":{"type":"string","maxLength":10000000,"description":"The file's text."},"locale":{"description":"The file's locale when the path doesn't say.","type":"string","minLength":2,"maxLength":35},"format":{"description":"Format id to force (see list_formats); detected when omitted.","type":"string"}},"required":["project","path","content"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/pull_file":{"post":{"operationId":"pull_file","summary":"Pull file","description":"Render one locale of a file in its own format, ready to write to disk. Returns {path, content}.","tags":["files"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"description":"Project slug or id."},"path":{"type":"string","description":"The file's path pattern from list_files, or a concrete path such as locales/es.json."},"locale":{"type":"string","minLength":2,"maxLength":35,"description":"BCP 47 locale, e.g. es, pt-BR, zh-Hans."},"missing":{"default":"source","description":"What untranslated keys contain.","type":"string","enum":["source","empty","omit"]},"approved_only":{"default":false,"description":"Only ship reviewed or approved translations.","type":"boolean"}},"required":["project","path","locale"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"pull_file_get","summary":"Pull file (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Render one locale of a file in its own format, ready to write to disk. Returns {path, content}.","tags":["files"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/detect_format":{"post":{"operationId":"detect_format","summary":"Detect format","description":"Which format Glossa would read a file as, with confidence and the runner-up candidates. Doesn't store anything.","tags":["formats"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string"},"content":{"type":"string","maxLength":2000000}},"required":["filename","content"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"detect_format_get","summary":"Detect format (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Which format Glossa would read a file as, with confidence and the runner-up candidates. Doesn't store anything.","tags":["formats"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/list_formats":{"post":{"operationId":"list_formats","summary":"List formats","description":"Built-in formats and the templates this workspace has learned, with their status.","tags":["formats"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"list_formats_get","summary":"List formats (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Built-in formats and the templates this workspace has learned, with their status.","tags":["formats"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/learn_format":{"post":{"operationId":"learn_format","summary":"Learn format","description":"Ask the AI to write a template for a file format Glossa can't read yet, from a sample. Runs as a job (see get_job); the learned format is stored and reads every similar file from then on.","tags":["formats"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"description":"Project slug or id."},"path":{"type":"string"},"content":{"type":"string","maxLength":2000000},"hint":{"description":"Anything that helps: which fields are keys, which are comments.","type":"string","maxLength":2000}},"required":["project","path","content"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/approve_format":{"post":{"operationId":"approve_format","summary":"Save or retire a format","description":"Set a learned format's status (active reads files, retired stops). Optionally replace its template; the new template is validated against the stored sample first.","tags":["formats"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","description":"Format slug or id."},"status":{"default":"active","type":"string","enum":["active","retired","draft"]},"template":{}},"required":["format"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/search_units":{"post":{"operationId":"search_units","summary":"Search strings","description":"Full-text and fuzzy search across every source string, key name and translation in the workspace. Use it to find how a term is translated everywhere, spot inconsistencies, or find the unit behind a key.","tags":["strings"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":500},"locale":{"description":"Also match and return translations in this locale.","type":"string","minLength":2,"maxLength":35},"limit":{"default":50,"description":"Page size, at most 200.","type":"integer","minimum":1,"maximum":200}},"required":["query"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"search_units_get","summary":"Search strings (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Full-text and fuzzy search across every source string, key name and translation in the workspace. Use it to find how a term is translated everywhere, spot inconsistencies, or find the unit behind a key.","tags":["strings"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/list_units":{"post":{"operationId":"list_units","summary":"List strings","description":"Page through units (deduplicated source strings) with their translation in one locale. Filter by project and by translation status, e.g. status=missing to find what still needs translating or status=machine to review AI output.","tags":["strings"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"description":"Project slug or id."},"locale":{"type":"string","minLength":2,"maxLength":35,"description":"BCP 47 locale, e.g. es, pt-BR, zh-Hans."},"status":{"default":"any","type":"string","enum":["any","missing","machine","imported","reviewed","approved","needs_review"]},"limit":{"default":50,"description":"Page size, at most 200.","type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["locale"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"list_units_get","summary":"List strings (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Page through units (deduplicated source strings) with their translation in one locale. Filter by project and by translation status, e.g. status=missing to find what still needs translating or status=machine to review AI output.","tags":["strings"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/get_unit":{"post":{"operationId":"get_unit","summary":"Get string","description":"One unit with every key that uses it (across projects and files), all its translations and their history.","tags":["strings"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"unit":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Unit id (a deduplicated source string shared by every key that points at it)."}},"required":["unit"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"get_unit_get","summary":"Get string (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. One unit with every key that uses it (across projects and files), all its translations and their history.","tags":["strings"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/update_unit":{"post":{"operationId":"update_unit","summary":"Update string context","description":"Set a unit's description (context for translators and the AI), max length or tags. A good description fixes ambiguous strings in every locale at once; pass retranslate=true to redo its machine translations with the new context.","tags":["strings"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"unit":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Unit id (a deduplicated source string shared by every key that points at it)."},"description":{"type":"string","maxLength":4000},"max_length":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tags":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":50}},"retranslate":{"default":false,"type":"boolean"}},"required":["unit"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/set_translation":{"post":{"operationId":"set_translation","summary":"Set translation","description":"Write or correct a unit's translation in one locale. Every key sharing the unit gets it. Defaults to status reviewed; use approved for final copy. Placeholders must match the source.","tags":["strings"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"unit":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Unit id (a deduplicated source string shared by every key that points at it)."},"locale":{"type":"string","minLength":2,"maxLength":35,"description":"BCP 47 locale, e.g. es, pt-BR, zh-Hans."},"text":{"type":"string","maxLength":20000},"plural":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"status":{"default":"reviewed","type":"string","enum":["machine","imported","reviewed","approved","needs_review"]},"note":{"default":"","type":"string","maxLength":2000}},"required":["unit","locale","text"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/review_translations":{"post":{"operationId":"review_translations","summary":"Review translations","description":"Mark many translations reviewed, approved or needs_review at once, by unit and locale.","tags":["strings"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":"string","minLength":2,"maxLength":35,"description":"BCP 47 locale, e.g. es, pt-BR, zh-Hans."},"units":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Unit id (a deduplicated source string shared by every key that points at it)."}},"status":{"type":"string","enum":["reviewed","approved","needs_review"]}},"required":["locale","units","status"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/translate":{"post":{"operationId":"translate","summary":"Translate","description":"Queue AI translation. Without units: fills every missing translation of a project (or the whole workspace) in the given locales. With units: (re)translates exactly those, replacing machine output but never reviewed, approved, imported or human translations. Returns a job id (get_job).","tags":["strings"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"locales":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":2,"maxLength":35,"description":"BCP 47 locale, e.g. es, pt-BR, zh-Hans."}},"project":{"type":"string","minLength":1,"description":"Project slug or id."},"units":{"maxItems":2000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Unit id (a deduplicated source string shared by every key that points at it)."}}},"required":["locales"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/merge_units":{"post":{"operationId":"merge_units","summary":"Merge strings","description":"Point every key of the `merge` units at the `into` unit, so they share one translation per locale. The kept unit's translations win; a merged unit's translation fills a locale the kept unit lacks. The merged units are deleted.","tags":["strings"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"into":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Unit id (a deduplicated source string shared by every key that points at it)."},"merge":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Unit id (a deduplicated source string shared by every key that points at it)."}}},"required":["into","merge"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/split_key":{"post":{"operationId":"split_key","summary":"Split key","description":"Give one key its own unit (a copy of the source and its translations) so it can be translated differently from the other keys that shared the string. Use when the same English means different things in different places.","tags":["strings"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"key_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The key to split off (get_unit lists keys with ids)."},"description":{"description":"Context that tells the new unit apart.","type":"string","maxLength":4000},"retranslate":{"default":true,"description":"Retranslate the new unit's machine translations with its own context.","type":"boolean"}},"required":["key_id"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/list_tasks":{"post":{"operationId":"list_tasks","summary":"List review tasks","description":"The review queue, highest priority first. Each task has a kind, a title, a payload with everything needed to decide, and the actions it accepts (merge_review: keep_merged | split; merge_suggestion: merge_into_a | merge_into_b | keep_separate; learn_format: keep | retire | retry_with_hint | dismiss; translation_review: approve | edit | retranslate; audit_finding: apply | edit | dismiss; rule_suggestion: add | edit | dismiss; glossary_suggestion: add | dismiss).","tags":["tasks"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"default":"open","type":"string","enum":["open","claimed","resolved","dismissed"]},"kind":{"type":"string","enum":["merge_review","merge_suggestion","learn_format","translation_review","audit_finding","rule_suggestion","glossary_suggestion"]},"limit":{"default":50,"description":"Page size, at most 200.","type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"list_tasks_get","summary":"List review tasks (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. The review queue, highest priority first. Each task has a kind, a title, a payload with everything needed to decide, and the actions it accepts (merge_review: keep_merged | split; merge_suggestion: merge_into_a | merge_into_b | keep_separate; learn_format: keep | retire | retry_with_hint | dismiss; translation_review: approve | edit | retranslate; audit_finding: apply | edit | dismiss; rule_suggestion: add | edit | dismiss; glossary_suggestion: add | dismiss).","tags":["tasks"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/claim_tasks":{"post":{"operationId":"claim_tasks","summary":"Claim review tasks","description":"Claim up to `limit` open tasks so parallel agents don't work the same ones. Claims expire after 30 minutes. Then decide each and call resolve_task.","tags":["tasks"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["merge_review","merge_suggestion","learn_format","translation_review","audit_finding","rule_suggestion","glossary_suggestion"]},"limit":{"default":10,"type":"integer","minimum":1,"maximum":50}}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/resolve_task":{"post":{"operationId":"resolve_task","summary":"Resolve review task","description":"Decide a task by naming one of its actions (merge_review: keep_merged | split; merge_suggestion: merge_into_a | merge_into_b | keep_separate; learn_format: keep | retire | retry_with_hint | dismiss; translation_review: approve | edit | retranslate; audit_finding: apply | edit | dismiss; rule_suggestion: add | edit | dismiss; glossary_suggestion: add | dismiss). The action is applied (split, merge, set translation, add rule, …) and the task is closed with your note. Pass text for edit actions, body for a rule edit, key_ids to choose which keys to split, hint for retry_with_hint.","tags":["tasks"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"action":{"type":"string"},"note":{"default":"","type":"string","maxLength":2000},"text":{"type":"string","maxLength":20000},"body":{"type":"string","maxLength":2000},"key_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"hint":{"type":"string","maxLength":2000}},"required":["task","action"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/list_glossary":{"post":{"operationId":"list_glossary","summary":"List glossary","description":"Glossary terms: brand and product names that are never translated, and terms with a fixed translation per locale. Every translation prompt includes them.","tags":["glossary"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"list_glossary_get","summary":"List glossary (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Glossary terms: brand and product names that are never translated, and terms with a fixed translation per locale. Every translation prompt includes them.","tags":["glossary"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/upsert_glossary_term":{"post":{"operationId":"upsert_glossary_term","summary":"Add or update glossary term","description":"Add a term or change it. do_not_translate=true for brand names; translations maps locale → required translation (merged into the existing map).","tags":["glossary"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"term":{"type":"string","minLength":1,"maxLength":200},"do_not_translate":{"default":false,"type":"boolean"},"translations":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"note":{"default":"","type":"string","maxLength":1000}},"required":["term"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/delete_glossary_term":{"post":{"operationId":"delete_glossary_term","summary":"Delete glossary term","description":"Remove a glossary term; future translations no longer enforce it. Existing translations are unchanged.","tags":["glossary"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"term":{"type":"string"}},"required":["term"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/list_rules":{"post":{"operationId":"list_rules","summary":"List translation rules","description":"Standing instructions appended to every translation prompt, globally or for one locale. Audits propose new ones as rule_suggestion tasks.","tags":["rules"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":"string","minLength":2,"maxLength":35,"description":"BCP 47 locale, e.g. es, pt-BR, zh-Hans."},"include_inactive":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"list_rules_get","summary":"List translation rules (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Standing instructions appended to every translation prompt, globally or for one locale. Audits propose new ones as rule_suggestion tasks.","tags":["rules"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/add_rule":{"post":{"operationId":"add_rule","summary":"Add translation rule","description":"Add a standing instruction for future translations, e.g. \"Spanish: use tú, never usted\" or \"Keep button labels under 20 characters\". locale null applies to every language.","tags":["rules"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":3,"maxLength":2000},"locale":{"default":null,"anyOf":[{"type":"string","minLength":2,"maxLength":35,"description":"BCP 47 locale, e.g. es, pt-BR, zh-Hans."},{"type":"null"}]},"rationale":{"default":"","type":"string","maxLength":2000}},"required":["body"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/update_rule":{"post":{"operationId":"update_rule","summary":"Update translation rule","description":"Edit a translation rule's text, or set active=false to stop adding it to translation prompts.","tags":["rules"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"rule":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"body":{"type":"string","minLength":3,"maxLength":2000},"active":{"type":"boolean"}},"required":["rule"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/run_audit":{"post":{"operationId":"run_audit","summary":"Run audit","description":"Ask the AI to review one locale holistically (\"How is our Spanish? Are brand names consistent?\"). It answers the question, scores the locale, and files audit_finding, glossary_suggestion and rule_suggestion tasks. Runs as a job; read the result with get_audit.","tags":["audits"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":"string","minLength":2,"maxLength":35,"description":"BCP 47 locale, e.g. es, pt-BR, zh-Hans."},"question":{"default":"","type":"string","maxLength":2000},"sample_size":{"default":300,"type":"integer","minimum":20,"maximum":1000}},"required":["locale"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/get_audit":{"post":{"operationId":"get_audit","summary":"Get audit","description":"An audit's answer, score and findings (empty while its job runs; see job_status).","tags":["audits"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"audit":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["audit"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"get_audit_get","summary":"Get audit (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. An audit's answer, score and findings (empty while its job runs; see job_status).","tags":["audits"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/list_audits":{"post":{"operationId":"list_audits","summary":"List audits","description":"Past locale audits with their summary and score, newest first. Filter by locale.","tags":["audits"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":"string","minLength":2,"maxLength":35,"description":"BCP 47 locale, e.g. es, pt-BR, zh-Hans."},"limit":{"default":50,"description":"Page size, at most 200.","type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"list_audits_get","summary":"List audits (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Past locale audits with their summary and score, newest first. Filter by locale.","tags":["audits"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/get_job":{"post":{"operationId":"get_job","summary":"Get job","description":"Status and output of a background job (translate, learn_format, audit, dedupe_scan).","tags":["jobs"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["job"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"get_job_get","summary":"Get job (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Status and output of a background job (translate, learn_format, audit, dedupe_scan).","tags":["jobs"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/list_jobs":{"post":{"operationId":"list_jobs","summary":"List jobs","description":"Recent background jobs (translate, learn_format, audit, dedupe_scan) with status and errors, newest first.","tags":["jobs"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["queued","running","done","failed"]},"limit":{"default":50,"description":"Page size, at most 200.","type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"list_jobs_get","summary":"List jobs (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Recent background jobs (translate, learn_format, audit, dedupe_scan) with status and errors, newest first.","tags":["jobs"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/scan_duplicates":{"post":{"operationId":"scan_duplicates","summary":"Scan for near-duplicates","description":"Queue a scan for near-duplicate strings (same meaning, slightly different text) and file merge_suggestion tasks for them.","tags":["strings"],"x-read-only":false,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"threshold":{"default":0.8,"type":"number","minimum":0.5,"maximum":0.99}}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/list_activity":{"post":{"operationId":"list_activity","summary":"List activity","description":"Who changed what, from which surface (dashboard, api, mcp, cli, ai), newest first.","tags":["workspace"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":50,"description":"Page size, at most 200.","type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"list_activity_get","summary":"List activity (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. Who changed what, from which surface (dashboard, api, mcp, cli, ai), newest first.","tags":["workspace"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/list_api_keys":{"post":{"operationId":"list_api_keys","summary":"List API keys","description":"API keys of this workspace (prefix only; the full key is shown once at creation).","tags":["keys"],"x-read-only":true,"x-admin-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"list_api_keys_get","summary":"List API keys (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. API keys of this workspace (prefix only; the full key is shown once at creation).","tags":["keys"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/create_api_key":{"post":{"operationId":"create_api_key","summary":"Create API key","description":"Create a workspace API key for the CLI, MCP or CI. The full key (gls_…) is returned only once; store it as a secret.","tags":["keys"],"x-read-only":false,"x-admin-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/revoke_api_key":{"post":{"operationId":"revoke_api_key","summary":"Revoke API key","description":"Revoke an API key immediately; every CLI, CI job or MCP host using it stops working.","tags":["keys"],"x-read-only":false,"x-admin-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/get_pricing":{"post":{"operationId":"get_pricing","summary":"Get pricing","description":"The plans (Free, Pro, Team, Enterprise) with monthly and yearly prices in cents, AI translations included a month, member and project limits, features, and how to buy. Needs no credential over REST (GET /api/v1/get_pricing). Call before recommending or buying a plan.","tags":["billing"],"x-read-only":true,"x-admin-only":false,"security":[{},{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"get_pricing_get","summary":"Get pricing (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. The plans (Free, Pro, Team, Enterprise) with monthly and yearly prices in cents, AI translations included a month, member and project limits, features, and how to buy. Needs no credential over REST (GET /api/v1/get_pricing). Call before recommending or buying a plan.","tags":["billing"],"security":[{},{"bearerAuth":[]}],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/get_billing":{"post":{"operationId":"get_billing","summary":"Get billing","description":"This workspace's plan, subscription status, renewal or end date, whether a card is saved (so subscribe can charge it), and usage this month against the plan (AI translations, members, projects). Pass refresh: true right after a human finished a checkout to pull the latest state from Stripe.","tags":["billing"],"x-read-only":true,"x-admin-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"refresh":{"default":false,"description":"Re-read the subscription from Stripe instead of the stored copy.","type":"boolean"}}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"get_billing_get","summary":"Get billing (GET)","description":"Read-only ops also answer GET with the input as URL-encoded JSON in ?input=. This workspace's plan, subscription status, renewal or end date, whether a card is saved (so subscribe can charge it), and usage this month against the plan (AI translations, members, projects). Pass refresh: true right after a human finished a checkout to pull the latest state from Stripe.","tags":["billing"],"parameters":[{"name":"input","in":"query","required":false,"description":"The op's input as URL-encoded JSON.","schema":{"type":"string"}}],"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/create_checkout_link":{"post":{"operationId":"create_checkout_link","summary":"Create checkout link","description":"A Stripe Checkout URL where a human pays for a plan; hand it to them (or open it in their browser). Nothing is charged and the plan does not change until they complete it; then get_billing {refresh: true} shows the new plan. The link expires after 24 hours. If the workspace already has a subscription, the URL is a Stripe page where they confirm the plan change instead. Returns {url, kind: checkout | plan_change, plan, interval, amount_cents, expires_at}.","tags":["billing"],"x-read-only":false,"x-admin-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["pro","team"],"description":"pro or team. get_pricing lists what each includes. Enterprise is sold by email."},"interval":{"default":"month","description":"month, or year (two months free).","type":"string","enum":["month","year"]}},"required":["plan"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/subscribe":{"post":{"operationId":"subscribe","summary":"Subscribe","description":"Start or change this workspace's paid plan in one call, charging the card already saved for the workspace. Only after a human approved this plan and price: confirm must be true. Without a saved card (or if the card needs the human, e.g. 3-D Secure) nothing is charged and it returns status checkout_required with a checkout_url for a human to finish. A plan change is prorated and invoiced immediately. Returns {status: subscribed | changed | unchanged | checkout_required, billing}.","tags":["billing"],"x-read-only":false,"x-admin-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["pro","team"],"description":"pro or team. get_pricing lists what each includes. Enterprise is sold by email."},"interval":{"default":"month","description":"month, or year (two months free).","type":"string","enum":["month","year"]},"confirm":{"type":"boolean","const":true,"description":"Must be true: a human has seen the plan and price and asked you to buy it. Never set it on your own initiative."}},"required":["plan","confirm"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/cancel_subscription":{"post":{"operationId":"cancel_subscription","summary":"Cancel subscription","description":"Cancel the paid plan at the end of the current period (no refund; the plan stays until then, then the workspace is on Free). Only when a human asked: confirm must be true. resume_subscription undoes it before the period ends.","tags":["billing"],"x-read-only":false,"x-admin-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"boolean","const":true,"description":"Must be true: a human has seen the plan and price and asked you to buy it. Never set it on your own initiative."}},"required":["confirm"]}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/resume_subscription":{"post":{"operationId":"resume_subscription","summary":"Resume subscription","description":"Undo a cancellation that has not taken effect yet, so the plan renews as before. Nothing is charged until the normal renewal date.","tags":["billing"],"x-read-only":false,"x-admin-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/create_billing_portal_link":{"post":{"operationId":"create_billing_portal_link","summary":"Create billing portal link","description":"A private Stripe page where a human downloads invoices, updates the card or billing details, or cancels. The link is for a human and expires after a few minutes of inactivity; never open it on your own.","tags":["billing"],"x-read-only":false,"x-admin-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"The op's output.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid JSON or input that fails the schema (invalid_json, invalid_input).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credential (unauthorized, invalid_key, invalid_token).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The op needs an owner or admin, or no workspace is available (forbidden, no_workspace).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown op or record (unknown_op, not_found).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request conflicts with the current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The input is well-formed but cannot be applied, e.g. placeholder_mismatch.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error. Retry and quote request_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A workspace API key (gls_…) or an OAuth access token. X-Api-Key is accepted as an alternative header."}},"schemas":{"Problem":{"type":"object","description":"RFC 9457 problem details.","required":["type","title","status","detail"],"properties":{"type":{"type":"string","format":"uri","description":"https://glossa-meterapp.vercel.app/docs/errors#{status}"},"title":{"type":"string","description":"The error code."},"status":{"type":"integer"},"detail":{"type":"string","description":"What went wrong and what to do about it."},"code":{"type":"string","enum":["invalid_json","invalid_input","invalid_action","invalid_slug","text_required","unknown_format","unauthorized","invalid_key","invalid_token","payment_failed","forbidden","no_workspace","unknown_op","not_found","method_not_allowed","project_exists","task_closed","format_not_ready","job_missing","already_subscribed","no_subscription","placeholder_mismatch","invalid_template","template_reads_nothing","internal_error","billing_unavailable"]},"request_id":{"type":"string"},"issues":{"type":"array","items":{"type":"object"},"description":"Schema issues for invalid_input."}}},"OpsManifest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"mcp":{"type":"string","format":"uri"},"openapi":{"type":"string","format":"uri"},"ops":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"group":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"read_only":{"type":"boolean"},"admin_only":{"type":"boolean"},"input_schema":{"type":"object"}}}}}}}}}