Errors

RFC 9457 problem responses and every error code the API returns.

Every failed API call returns application/problem+json as defined by RFC 9457. The type links to the section of this page for the status, title and code name the error, and detail says what to do about it. Quote request_id when you contact jonathan@getglossa.dev; you can also send your own in X-Request-Id.

422 Unprocessable content
{  "type": "https://getglossa.dev/docs/errors#422",  "title": "placeholder_mismatch",  "status": 422,  "detail": "The translation must keep the source's placeholders: {name}.",  "request_id": "5b0e3c7a-…",  "code": "placeholder_mismatch",  "mismatch": [    "{name}"  ]}

A 401 also carries WWW-Authenticate: Bearer resource_metadata=…, which MCP clients follow to sign in with OAuth. Over MCP, the same errors come back as tool errors with the code and message.

400 Bad request

CodeMeaning
invalid_jsonThe body (or ?input for GET) is not valid JSON.
invalid_inputThe input failed the op's schema. `issues` lists each problem with its path.
invalid_actionresolve_task got an action the task's kind does not accept. The message lists the valid ones.
invalid_slugThe project name produced no usable slug. Use letters, digits and dashes.
text_requiredAn edit action needs `text` with the corrected translation.
unknown_formatThe forced `format` id is neither built in nor learned by this workspace.
ambiguous_pathset_source_text: the path matches several files. Name one file pattern or concrete path.

401 Unauthorized

CodeMeaning
unauthorizedNo credential. Send `Authorization: Bearer gls_…`.
invalid_keyThe API key does not exist or was revoked.
invalid_tokenThe OAuth access token is invalid or expired. Refresh it and retry.

402

CodeMeaning
payment_failedStripe declined the charge for a plan change. Ask a human to update the card (create_billing_portal_link) or pay through create_checkout_link.
audit_limitThe workspace used this calendar month's AI audits (run_audit). The problem names the plan, limit, used and resets_at, plus checkout_url and next_plan. Agent audits are free and unlimited: list_translations_for_audit, then submit_translations.

403 Forbidden

CodeMeaning
forbiddenThe op needs an owner or admin.
no_workspaceThe signed-in user is not a member of the requested workspace (or of any).

404 Not found

CodeMeaning
unknown_opNo op has that name. `GET /api/v1` lists them.
not_foundThe project, unit, task or other record is not in this workspace.
unknown_keyset_source_text: the file has no such key. The message lists its keys.
no_adapted_filesThe project has no adapted files. Pass paths, or mark files adapted with set_file_localization.

405 Method not allowed

CodeMeaning
method_not_allowedA write op was sent with GET. Use POST.

409 Conflict

CodeMeaning
project_existsA project with that slug already exists.
task_closedThe task was already resolved or dismissed.
format_not_readyThe file has no working format yet. Resolve its learn_format task first.
job_missingThe job a task refers to no longer exists. Push the file again.
no_sourceset_source_text: no source copy of the file has been pushed yet. Push it first.
source_edited_in_glossaThe source was edited in Glossa (set_source_text) and not pulled since; this push would undo it. Pull, commit and push again, or pass overwrite_source_edits.
already_subscribedThe workspace is already on that plan and interval. get_billing shows the subscription.
no_subscriptionThere is no paid subscription to cancel or resume.

422 Unprocessable content

CodeMeaning
unreadable_filepush_file: the file's format recognizes it but finds syntax errors (broken JSON, an unclosed XML tag, an unterminated string). `errors` lists each by line; nothing was imported or removed. Fix the file and push it again.
placeholder_mismatchA translation's placeholders differ from the source string's. Keep every placeholder exactly.
too_longThe text is over the string's max_length (a store limit such as the App Store subtitle's 30 characters). `length` and `max_length` say by how much.
not_adaptedpropagate_source_change: none of the files is adapted, so nothing can be behind its source.
multi_locale_sourceset_source_text edits single-locale files only; edit a multi-locale file (xcstrings, XLIFF, CSV) in the repo and push it.
plural_sourceset_source_text: the key is a plural string; edit its forms in the repo and push the file.
invalid_templateA learned format template is malformed.
template_reads_nothingA learned format template parses the sample into zero entries.

500 Internal error

CodeMeaning
internal_errorSomething failed on our side. Retry, and quote `request_id` if it persists.

503

CodeMeaning
billing_unavailableBilling is not configured on this server yet (no Stripe key or price). Email support to subscribe.

Retrying

  • 4xx errors will fail the same way again until you change the request.
  • 5xx errors are safe to retry with backoff. Write ops that queue work (translate, run_audit) may have taken effect; check with get_job or list_jobs first.