# Create a LINA

`POST https://api.lingohub.com/v2/linas`

LingoHub API V2 (Beta) · [LINAs](https://developers.lingohub.com/reference/v2/operations/tags/linas.md) · operation `createLina`

Creates a LINA whose engines you choose; LingoHub-managed LINAs are set up by LingoHub. Only `name` and `linguistic_engine_id` are required; the context sources default to what the engine supports. The name must be unique in the workspace, ignoring case. The LINA gets its own actor, which its translations are attributed to, and default quality-check settings. Requires workspace-level AI translation management permission.

## Parameters

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | no | string | Optional unique key for best-effort POST retry protection. The key is reserved, the request runs with ordinary service transactions, then the successful response is retained separately for 24 hours by default. There is n… |

## Example request

```sh
curl --request POST \
  --url https://api.lingohub.com/v2/linas \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Localization",
  "description": "Product translator",
  "color": "#C084FC",
  "linguistic_engine_id": "engine_0197c8f2-5a6b-7cde-8f12-3456789abcde",
  "glossary_id": "gls_0197c8f2-5a6b-7cde-8f12-3456789abcde",
  "style_guide_id": "sg_0197c8f2-5a6b-7cde-8f12-3456789abcde",
  "is_tm_match_enabled": false,
  "restricted_stack_ids": [
    "stack_0197c8f2-5a6b-7cde-8f12-3456789abcde"
  ],
  "language_engine_overrides": [
    {
      "language_code": "de",
      "linguistic_engine_id": "engine_0197c8f2-5a6b-7cde-8f12-3456789abcde"
    }
  ]
}'
```

## Responses

- `201`: The LINA was created.
- `400`: 
- `401`: 
- `403`: 
- `409`: `already_exists`: another LINA of the workspace has this name (`#/name`). An unresolved request returns `idempotency_outcome_unknown` without Retry-After; inspect the affected resource before starting a new operation. A…
- `413`: 
- `422`: An engine isn't in the workspace (`not_found`) or is disabled (`not_supported`); the glossary, style guide or a stack isn't in the workspace (`not_found`); a language or stack is listed twice (`uniqueItems`).
- `429`: 
- `500`: 
- `503`: 

## OpenAPI definition

The complete definition of this operation, with every schema it references:

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "LingoHub API V2 (Beta)",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://api.lingohub.com",
      "description": "LingoHub"
    }
  ],
  "tags": [
    {
      "name": "LINAs",
      "description": "Manage LINAs, LingoHub's AI translation agents, and translate texts with them."
    }
  ],
  "paths": {
    "/v2/linas": {
      "post": {
        "tags": [
          "LINAs"
        ],
        "summary": "Create a LINA",
        "description": "Creates a LINA whose engines you choose; LingoHub-managed LINAs are set up by LingoHub. Only `name` and `linguistic_engine_id` are required; the context sources default to what the engine supports. The name must be unique in the workspace, ignoring case. The LINA gets its own actor, which its translations are attributed to, and default quality-check settings. Requires workspace-level AI translation management permission.",
        "operationId": "createLina",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional unique key for best-effort POST retry protection. The key is reserved, the request runs with ordinary service transactions, then the successful response is retained separately for 24 hours by default. There is no request-wide transaction or atomic commit between the operation and its replay result. A matching cached response is replayed verbatim with `Idempotent-Replayed: true`. Loss or expiry of the retained response can remove protection and allow re-execution. Uploads and chunked bodies are covered; multipart boundaries and JSON property order may differ. Retries still pass validation and current authorization; a later 403/404 does not undo the original operation. A changed payload returns 422 `idempotency_key_mismatch`. A recent active reservation returns 409 `idempotency_key_in_use` with `Retry-After`. A retry with an unresolved key, including an unfinished reservation older than 5 minutes, returns 409 `idempotency_outcome_unknown` without `Retry-After`. This timeout does not release the reservation or permit re-execution while it is retained. Inspect the affected resource before starting a new operation; do not blindly reuse an unresolved key after expiry. A 4xx rejection releases the reservation, allowing the same key to be retried after correcting the cause. A 5xx or interruption after execution starts leaves it unresolved. An unavailable reservation store returns 503 before execution; an oversized request returns 413. Cache-save failure or a response over the cache limit preserves the original success status, headers and body; only future retries become unresolved. When idempotency is explicitly disabled by server configuration, the header is ignored and requests execute normally without retry protection. Use a new unique key for each intended operation.",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255,
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLina"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The LINA was created.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Location": {
                "description": "URL of the new LINA.",
                "style": "simple",
                "schema": {
                  "type": "string",
                  "format": "uri-reference"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lina"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "`already_exists`: another LINA of the workspace has this name (`#/name`). An unresolved request returns `idempotency_outcome_unknown` without Retry-After; inspect the affected resource before starting a new operation. A recent request with the same Idempotency-Key is still being processed (`idempotency_key_in_use`); retry after the number of seconds in the `Retry-After` header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait for an in-progress keyed request; absent for other conflicts.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/ContentTooLarge"
          },
          "422": {
            "description": "An engine isn't in the workspace (`not_found`) or is disabled (`not_supported`); the glossary, style guide or a stack isn't in the workspace (`not_found`); a language or stack is listed twice (`uniqueItems`).",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CreateLina": {
        "type": "object",
        "additionalProperties": false,
        "description": "Request body to create a LINA whose engines you choose.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the LINA; it must be unique in the workspace, ignoring case.",
            "example": "Localization",
            "maxLength": 255,
            "minLength": 1
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description of the LINA.",
            "example": "Product translator",
            "maxLength": 1024,
            "minLength": 0
          },
          "color": {
            "type": "string",
            "description": "Color of the LINA's icon, as a hexadecimal RGB value. Defaults to `#C084FC`.",
            "example": "#C084FC",
            "pattern": "^#[0-9A-Fa-f]{6}$"
          },
          "linguistic_engine_id": {
            "type": "string",
            "description": "Engine the LINA translates with; it must be enabled in the workspace (GET /v2/linguistic-engines lists them).",
            "example": "engine_0197c8f2-5a6b-7cde-8f12-3456789abcde",
            "pattern": "^engine_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
          },
          "glossary_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Glossary of the workspace the LINA uses for translation and for the terminology check. Left out or null: none.",
            "example": "gls_0197c8f2-5a6b-7cde-8f12-3456789abcde",
            "pattern": "^gls_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
          },
          "style_guide_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Style guide of the workspace the LINA follows when translating and for the style checks. Left out or null: none.",
            "example": "sg_0197c8f2-5a6b-7cde-8f12-3456789abcde",
            "pattern": "^sg_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
          },
          "context": {
            "$ref": "#/components/schemas/CreateLinaContext",
            "description": "Which context the LINA sends along with each text it translates. A source left out is enabled when the engine supports it.",
            "example": {
              "is_translation_memory_enabled": false
            }
          },
          "is_tm_match_enabled": {
            "type": "boolean",
            "description": "Whether the LINA reuses a translation-memory match with exactly the same source text instead of translating it. Defaults to `false`.",
            "example": false
          },
          "restricted_stack_ids": {
            "type": [
              "array",
              "null"
            ],
            "description": "Stacks of the workspace the LINA may work in; an empty list allows none. Left out or null: every stack.",
            "example": [
              "stack_0197c8f2-5a6b-7cde-8f12-3456789abcde"
            ],
            "items": {
              "type": "string",
              "pattern": "^stack_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
            },
            "maxItems": 1000,
            "minItems": 0,
            "uniqueItems": true
          },
          "language_engine_overrides": {
            "type": "array",
            "description": "Engines the LINA uses for single target languages instead of `linguistic_engine_id`, one per language. Defaults to none.",
            "example": [
              {
                "language_code": "de",
                "linguistic_engine_id": "engine_0197c8f2-5a6b-7cde-8f12-3456789abcde"
              }
            ],
            "items": {
              "$ref": "#/components/schemas/SetLinaLanguageEngine"
            },
            "maxItems": 1000,
            "minItems": 0
          }
        },
        "required": [
          "linguistic_engine_id",
          "name"
        ]
      },
      "CreateLinaContext": {
        "type": "object",
        "additionalProperties": false,
        "description": "Request body to choose the context a LINA sends along with each text. A source left out is enabled when the engine supports it.",
        "properties": {
          "is_style_guide_enabled": {
            "type": "boolean",
            "description": "Send the rules of the LINA's style guide.",
            "example": true
          },
          "is_glossary_enabled": {
            "type": "boolean",
            "description": "Send the terms of the LINA's glossary.",
            "example": true
          },
          "is_labels_enabled": {
            "type": "boolean",
            "description": "Send the labels of the segment.",
            "example": true
          },
          "is_segments_enabled": {
            "type": "boolean",
            "description": "Send the description of the segment.",
            "example": true
          },
          "is_translation_memory_enabled": {
            "type": "boolean",
            "description": "Send similar translations from the translation memory.",
            "example": false
          }
        }
      },
      "SetLinaLanguageEngine": {
        "type": "object",
        "additionalProperties": false,
        "description": "Request body to choose the engine for one target language.",
        "properties": {
          "language_code": {
            "type": "string",
            "description": "Target language the engine is used for.",
            "example": "de"
          },
          "linguistic_engine_id": {
            "type": "string",
            "description": "Engine to use for this language; it must be enabled in the workspace.",
            "example": "engine_0197c8f2-5a6b-7cde-8f12-3456789abcde",
            "pattern": "^engine_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
          }
        },
        "required": [
          "language_code",
          "linguistic_engine_id"
        ]
      },
      "Lina": {
        "type": "object",
        "description": "A LINA: an AI translator with its engines, the context it translates with and the stacks it may work in.",
        "properties": {
          "object_type": {
            "type": "string",
            "description": "Always `LINA`.",
            "enum": [
              "LINA"
            ],
            "example": "LINA"
          },
          "id": {
            "type": "string",
            "description": "Unique identifier of the LINA.",
            "example": "lina_0197c8f2-5a6b-7cde-8f12-3456789abcde",
            "minLength": 1,
            "pattern": "^lina_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
          },
          "name": {
            "type": "string",
            "description": "Name of the LINA, unique in the workspace ignoring case.",
            "example": "Localization assistant"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description of the LINA.",
            "example": "Product localization"
          },
          "color": {
            "type": "string",
            "description": "Color of the LINA's icon, as a hexadecimal RGB value.",
            "example": "#C084FC"
          },
          "engine_mode": {
            "$ref": "#/components/schemas/LinaEngineMode",
            "description": "Who chooses the LINA's engines.",
            "example": "CUSTOMER_MANAGED"
          },
          "linguistic_engine_id": {
            "type": "string",
            "description": "Engine the LINA translates with. For a LingoHub-managed LINA it is the default engine; LingoHub may choose another one for each translation.",
            "example": "engine_0197c8f2-5a6b-7cde-8f12-3456789abcde",
            "pattern": "^engine_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
          },
          "glossary_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Glossary the LINA uses for translation and for the terminology check; null for none.",
            "example": "gls_0197c8f2-5a6b-7cde-8f12-3456789abcde",
            "pattern": "^gls_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
          },
          "style_guide_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Style guide the LINA follows when translating and for the style checks; null for none.",
            "example": "sg_0197c8f2-5a6b-7cde-8f12-3456789abcde",
            "pattern": "^sg_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
          },
          "context": {
            "$ref": "#/components/schemas/LinaContext",
            "description": "Which context the LINA sends along with each text it translates.",
            "example": {
              "is_style_guide_enabled": true,
              "is_glossary_enabled": true,
              "is_labels_enabled": true,
              "is_segments_enabled": true,
              "is_translation_memory_enabled": true
            }
          },
          "is_tm_match_enabled": {
            "type": "boolean",
            "description": "Whether the LINA reuses a translation-memory match with exactly the same source text instead of translating it.",
            "example": false
          },
          "restricted_stack_ids": {
            "type": [
              "array",
              "null"
            ],
            "description": "Stacks the LINA may work in, sorted by ID; null when it may work in every stack. An empty list means it may work in none.",
            "example": [
              "stack_0197c8f2-5a6b-7cde-8f12-3456789abcde"
            ],
            "items": {
              "type": "string",
              "example": "stack_0197c8f2-5a6b-7cde-8f12-3456789abcde",
              "pattern": "^stack_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
            }
          },
          "language_engine_overrides": {
            "type": "array",
            "description": "Engines the LINA uses for single target languages instead of `linguistic_engine_id`, sorted by language code.",
            "example": [
              {
                "language_code": "de",
                "linguistic_engine_id": "engine_0197c8f2-5a6b-7cde-8f12-3456789abcde"
              }
            ],
            "items": {
              "$ref": "#/components/schemas/LinaLanguageEngine"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the LINA was created.",
            "example": "2026-09-29T10:00:00.123Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the LINA was last updated.",
            "example": "2026-09-29T10:00:00.123Z"
          }
        },
        "required": [
          "color",
          "context",
          "created_at",
          "description",
          "engine_mode",
          "glossary_id",
          "id",
          "is_tm_match_enabled",
          "language_engine_overrides",
          "linguistic_engine_id",
          "name",
          "object_type",
          "restricted_stack_ids",
          "style_guide_id",
          "updated_at"
        ]
      },
      "LinaEngineMode": {
        "type": "string",
        "description": "Who chooses a LINA's engines:\n  - CUSTOMER_MANAGED: you choose the engine and per-language engines.\n  - LINGOHUB_MANAGED: LingoHub chooses them for each translation; these fields show the defaults and can't be changed.\n",
        "enum": [
          "CUSTOMER_MANAGED",
          "LINGOHUB_MANAGED"
        ]
      },
      "LinaContext": {
        "type": "object",
        "description": "The context a LINA sends along with each text it translates.",
        "properties": {
          "is_style_guide_enabled": {
            "type": "boolean",
            "description": "Whether the LINA sends the rules of its style guide.",
            "example": true
          },
          "is_glossary_enabled": {
            "type": "boolean",
            "description": "Whether the LINA sends the terms of its glossary.",
            "example": true
          },
          "is_labels_enabled": {
            "type": "boolean",
            "description": "Whether the LINA sends the labels of the segment.",
            "example": true
          },
          "is_segments_enabled": {
            "type": "boolean",
            "description": "Whether the LINA sends the description of the segment.",
            "example": true
          },
          "is_translation_memory_enabled": {
            "type": "boolean",
            "description": "Whether the LINA sends similar translations from the translation memory.",
            "example": true
          }
        },
        "required": [
          "is_glossary_enabled",
          "is_labels_enabled",
          "is_segments_enabled",
          "is_style_guide_enabled",
          "is_translation_memory_enabled"
        ]
      },
      "LinaLanguageEngine": {
        "type": "object",
        "description": "The engine a LINA uses for one target language.",
        "properties": {
          "language_code": {
            "type": "string",
            "description": "Target language the engine is used for.",
            "example": "de"
          },
          "linguistic_engine_id": {
            "type": "string",
            "description": "Engine used for this language.",
            "example": "engine_0197c8f2-5a6b-7cde-8f12-3456789abcde",
            "pattern": "^engine_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
          }
        },
        "required": [
          "language_code",
          "linguistic_engine_id"
        ]
      },
      "Error": {
        "type": "object",
        "description": "RFC 9457 problem details. `code` identifies the problem type (one per `type` URL); `errors` lists rejected fields or parameters; `required_permission` names the permission a 403 lacked.",
        "properties": {
          "type": {
            "type": "string",
            "description": "URL identifying the problem type and pointing to its documentation.",
            "example": "https://api.lingohub.com/errors/resource-not-found"
          },
          "title": {
            "type": "string",
            "description": "Short, constant summary of the problem type.",
            "example": "Resource not found"
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "HTTP status code.",
            "example": 404
          },
          "detail": {
            "type": "string",
            "description": "Human-readable explanation of this occurrence of the problem.",
            "example": "Resource with ID 'pr_0197c8f2-5a6b-7cde-8f12-3456789abcde' was not found."
          },
          "instance": {
            "type": "string",
            "description": "Path of the request that produced the problem.",
            "example": "/v2/projects/pr_0197c8f2-5a6b-7cde-8f12-3456789abcde"
          },
          "code": {
            "$ref": "#/components/schemas/ErrorCode",
            "description": "Machine-readable problem type.",
            "example": "resource_not_found"
          },
          "request_id": {
            "type": "string",
            "description": "Correlation id of the request, also returned in the `X-Request-ID` header. Quote it when contacting support.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "errors": {
            "type": "array",
            "description": "Rejected fields or parameters. Present when the problem concerns specific fields or parameters.",
            "example": [
              {
                "detail": "must be at least 2 characters long",
                "pointer": "#/name",
                "parameter": "limit",
                "code": "minLength"
              }
            ],
            "items": {
              "$ref": "#/components/schemas/FieldError"
            }
          },
          "required_permission": {
            "$ref": "#/components/schemas/RequiredPermission",
            "description": "The permission the API key lacks. Present on 403 responses."
          }
        },
        "required": [
          "code",
          "detail",
          "instance",
          "request_id",
          "status",
          "title",
          "type"
        ]
      },
      "ErrorCode": {
        "type": "string",
        "description": "Machine-readable problem type of a V2 error response. Each code has a fixed HTTP status and documentation at its `type` URL.",
        "enum": [
          "invalid_json",
          "invalid_parameter",
          "missing_parameter",
          "unknown_parameter",
          "invalid_filter",
          "invalid_cursor",
          "bad_request",
          "missing_api_key",
          "invalid_api_key",
          "expired_api_key",
          "revoked_api_key",
          "disabled_api_key",
          "insufficient_permissions",
          "resource_not_found",
          "route_not_found",
          "method_not_allowed",
          "not_acceptable",
          "precondition_failed",
          "content_too_large",
          "unsupported_media_type",
          "already_exists",
          "idempotency_outcome_unknown",
          "idempotency_key_in_use",
          "stack_not_empty",
          "branch_not_ready",
          "backup_not_ready",
          "backup_in_use",
          "default_branch_protected",
          "owner_membership_protected",
          "source_language_protected",
          "branch_limit_reached",
          "context_image_limit_reached",
          "automation_limit_reached",
          "translation_order_pending",
          "git_integration_not_configured",
          "branch_git_integration_not_configured",
          "git_integration_unauthorized",
          "conflict",
          "validation_failed",
          "idempotency_key_mismatch",
          "rate_limit_exceeded",
          "internal_error",
          "upstream_error",
          "service_unavailable",
          "upstream_timeout"
        ]
      },
      "FieldError": {
        "type": "object",
        "description": "A rejected field or parameter. `pointer` locates a body field (RFC 6901 JSON Pointer), `parameter` a query, path or header parameter or a field of a multipart upload; both are set for a position inside a JSON-valued parameter such as `filter`.",
        "properties": {
          "detail": {
            "type": "string",
            "description": "Human-readable description of the problem.",
            "example": "must be at least 2 characters long"
          },
          "pointer": {
            "type": [
              "string",
              "null"
            ],
            "description": "JSON Pointer to the offending body field, or to the position inside a JSON-valued parameter.",
            "example": "#/name"
          },
          "parameter": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the offending query, path or header parameter, or of the multipart form field.",
            "example": "limit"
          },
          "code": {
            "$ref": "#/components/schemas/FieldErrorCode",
            "description": "Why the field or parameter was rejected.",
            "example": "minLength"
          }
        },
        "required": [
          "code",
          "detail",
          "parameter",
          "pointer"
        ]
      },
      "FieldErrorCode": {
        "type": "string",
        "description": "Why a field or parameter was rejected: the JSON Schema keyword of the violated rule, or one of the documented rules that no schema can express.",
        "enum": [
          "required",
          "type",
          "enum",
          "minLength",
          "maxLength",
          "minimum",
          "maximum",
          "pattern",
          "format",
          "additionalProperties",
          "minItems",
          "maxItems",
          "uniqueItems",
          "already_exists",
          "not_found",
          "not_supported",
          "unsupported_file_extension",
          "file_too_large",
          "file_empty",
          "invalid_archive",
          "empty_archive"
        ]
      },
      "RequiredPermission": {
        "type": "object",
        "description": "The permission the API key lacks, in the vocabulary of the API key permission settings.",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/PermissionScope",
            "description": "Where the permission applies.",
            "example": "STACK"
          },
          "target": {
            "$ref": "#/components/schemas/PermissionTarget",
            "description": "The area the permission governs.",
            "example": "SETTINGS"
          },
          "level": {
            "$ref": "#/components/schemas/PermissionLevel",
            "description": "The access level required.",
            "example": "MANAGE"
          }
        },
        "required": [
          "level",
          "scope",
          "target"
        ]
      },
      "PermissionScope": {
        "type": "string",
        "description": "Where a permission applies: `WORKSPACE` permissions cover workspace-level resources, `STACK` permissions the resources of a stack (its projects, branches, resources, languages, ...).",
        "enum": [
          "WORKSPACE",
          "STACK"
        ]
      },
      "PermissionTarget": {
        "type": "string",
        "description": "The area a permission governs.",
        "enum": [
          "GENERAL",
          "BILLING_SUBSCRIPTION",
          "WORKSPACES",
          "MEMBERS",
          "PLUGINS_INTEGRATIONS",
          "LOGS",
          "API_ACCESS",
          "STACKS",
          "TRANSLATION_ORDERS",
          "WORK_REPORTS",
          "STYLE_GUIDES",
          "GLOSSARIES",
          "TRANSLATION_MEMORIES",
          "LABELS",
          "AI_TRANSLATION",
          "QUICK_TRANSLATIONS",
          "SETTINGS",
          "ACTIVITIES",
          "RESOURCES",
          "CONTEXT_IMAGES",
          "LANGUAGES",
          "SEGMENT_KEYS",
          "SEGMENTS",
          "SEGMENT_TEXTS"
        ]
      },
      "PermissionLevel": {
        "type": "string",
        "description": "Access level of a permission: `MANAGE` includes `WRITE` and `VIEW`.",
        "enum": [
          "NO_ACCESS",
          "VIEW",
          "WRITE",
          "MANAGE"
        ]
      }
    },
    "headers": {
      "RateLimit": {
        "description": "State of the rate-limit policy currently closest to rejection (IETF draft-ietf-httpapi-ratelimit-headers): the quoted policy name with `r` = requests remaining right now and `t` = seconds until the full quota is available again. Example: `\"api-key\";r=42;t=7`. Advisory: absent when the request fails authentication or the limiter state is momentarily unknown.",
        "schema": {
          "type": "string"
        }
      },
      "Idempotent-Replayed": {
        "description": "True when the original successful result was replayed for this key.",
        "schema": {
          "type": "boolean"
        }
      },
      "ETag": {
        "description": "Opaque strong validator for this representation. Keep its quotation marks and use it as If-Match on a documented conditional write. A replay carries the original ETag, which may now be stale.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Policy": {
        "description": "The rate-limit policies applied to the request: each quoted policy name with `q` = sustained request quota per window of `w` seconds. Example: `\"api-key\";q=180;w=60, \"workspace\";q=600;w=60`. Advisory: absent when the request fails authentication or the limiter state is momentarily unknown.",
        "schema": {
          "type": "string"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request is malformed: an unknown or invalid query parameter, an invalid id in the path, or a body that is not valid JSON. `code` names the problem, `errors` the parameter or field.",
        "headers": {
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimit-Policy"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Invalid or missing API key.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Insufficient permissions.",
        "headers": {
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimit-Policy"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ContentTooLarge": {
        "description": "The request exceeds the body or upload limit; no operation was performed.",
        "headers": {
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimit-Policy"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "The API rate limit was exceeded. Wait for the number of seconds given in the Retry-After header, then retry.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          },
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimit-Policy"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "An unexpected internal server error occurred.",
        "headers": {
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimit-Policy"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "The service is temporarily unavailable. Retry after the number of seconds in the Retry-After header.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          },
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimit-Policy"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "description": "API key authentication. Create API keys in your LingoHub workspace settings. Keys use the `lh-api_` prefix. Pass the full key as the Bearer token.",
        "scheme": "bearer"
      }
    }
  }
}
````
