# Push to git integration

`POST https://api.lingohub.com/v2/branches/{branchId}/integrations/git/push`

LingoHub API V2 (Beta) · [Git Integrations](https://developers.lingohub.com/reference/v2/operations/tags/git-integrations.md) · operation `pushToGit`

Pushes the branch's files to its remote branch in the background, or once to another remote branch given in `git_branch`, as a commit or a pull request; poll the export at the URL in `Location`. Fields you leave out come from the project's push settings. A pull request needs a `pull_request_branch` here or in the push settings, and a direct push to a protected branch is refused (422 on `push_type`). Requires stack-level resource management permission.

## Parameters

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `branchId` | path | yes | string |  |
| `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/branches/BRANCH_ID/integrations/git/push \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "git_branch": "feature/checkout",
  "push_type": "PULL_REQUEST",
  "commit_message": "Update translations",
  "commit_description": "Latest translations from LingoHub",
  "pull_request_branch": "lingohub/translations",
  "pull_request_title": "Update translations",
  "pull_request_description": "Latest translations from LingoHub"
}'
```

## Responses

- `202`: The push is queued.
- `400`: 
- `401`: 
- `403`: 
- `404`: 
- `409`: The project has no git integration (`git_integration_not_configured`), the branch is not bound to a git branch (`branch_git_integration_not_configured`), or the git provider refuses it access (`git_integration_unauthoriz…
- `413`: 
- `422`: A field is invalid; `errors` names it. A `git_branch` the repository does not have is `not_found`. A direct push to a protected git branch is `not_supported` on `push_type`.
- `429`: 
- `500`: 
- `502`: The git provider failed or answered unexpectedly (`upstream_error`).
- `503`: 
- `504`: The git provider did not answer in time (`upstream_timeout`).

## 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": "Git Integrations",
      "description": "Connect a project to a Git repository and sync files with it as async jobs."
    }
  ],
  "paths": {
    "/v2/branches/{branchId}/integrations/git/push": {
      "post": {
        "tags": [
          "Git Integrations"
        ],
        "summary": "Push to git integration",
        "description": "Pushes the branch's files to its remote branch in the background, or once to another remote branch given in `git_branch`, as a commit or a pull request; poll the export at the URL in `Location`. Fields you leave out come from the project's push settings. A pull request needs a `pull_request_branch` here or in the push settings, and a direct push to a protected branch is refused (422 on `push_type`). Requires stack-level resource management permission.",
        "operationId": "pushToGit",
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Public id that is created from the type prefix of the corresponding resource and its UUID. I.e : For a project branch, a valid value would be : prb_0197c8f2-5a6b-7cde-8f12-3456789abcde",
              "pattern": "^prb_[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": "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/PushToGit"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The push is queued.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Location": {
                "description": "URL of the export to poll.",
                "style": "simple",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJob"
                },
                "example": {
                  "object_type": "JOB",
                  "job_type": "EXPORT",
                  "data": {
                    "object_type": "EXPORT",
                    "id": "reg_0197c8f2-5a6b-7cde-8f12-3456789abcde",
                    "branch_id": "prb_0197c8f2-5a6b-7cde-8f12-3456789abcde",
                    "status": "QUEUED",
                    "status_details": null,
                    "language_codes": null,
                    "download_url": null,
                    "download_url_expires_at": null,
                    "git_result": null,
                    "created_at": "2026-09-30T10:00:00.123Z",
                    "updated_at": "2026-09-30T10:00:00.123Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The project has no git integration (`git_integration_not_configured`), the branch is not bound to a git branch (`branch_git_integration_not_configured`), or the git provider refuses it access (`git_integration_unauthorized`). The branch has not completed initialization (`branch_not_ready`); poll its initialization_status before retrying. 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": "A field is invalid; `errors` names it. A `git_branch` the repository does not have is `not_found`. A direct push to a protected git branch is `not_supported` on `push_type`.",
            "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"
          },
          "502": {
            "description": "The git provider failed or answered unexpectedly (`upstream_error`).",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "description": "The git provider did not answer in time (`upstream_timeout`).",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "PushToGit": {
        "type": "object",
        "additionalProperties": false,
        "description": "Request body to schedule a push to the connected git repository.",
        "properties": {
          "git_branch": {
            "type": [
              "string",
              "null"
            ],
            "description": "The repository branch to push to. If left empty, LingoHub pushes to the connected branch.",
            "example": "feature/checkout"
          },
          "push_type": {
            "description": "The type of push you want to perform. It can be a push or a pull request. If left empty the default push type of the git integration is used.",
            "example": "PULL_REQUEST",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PushType"
              },
              {
                "type": "null"
              }
            ]
          },
          "commit_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "The commit message to use. If left empty the default commit message is used.",
            "example": "Update translations"
          },
          "commit_description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The commit description to use. If left empty the default commit description is used.",
            "example": "Latest translations from LingoHub"
          },
          "pull_request_branch": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the branch which is used to create the pull request. Required for push type PULL_REQUEST when the git integration has no default pull request branch.",
            "example": "lingohub/translations"
          },
          "pull_request_title": {
            "type": [
              "string",
              "null"
            ],
            "description": "The title of the pull request.",
            "example": "Update translations"
          },
          "pull_request_description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The description of the pull request.",
            "example": "Latest translations from LingoHub"
          }
        }
      },
      "PushType": {
        "type": "string",
        "description": "How files should be pushed to git repositories.",
        "enum": [
          "PUSH",
          "PULL_REQUEST"
        ]
      },
      "ExportJob": {
        "type": "object",
        "description": "An export scheduled for asynchronous processing.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Export",
            "description": "The export this job is processing."
          },
          "job_type": {
            "type": "string",
            "description": "Always `EXPORT`.",
            "enum": [
              "EXPORT"
            ],
            "example": "EXPORT"
          },
          "object_type": {
            "type": "string",
            "description": "Always `JOB`.",
            "enum": [
              "JOB"
            ],
            "example": "JOB"
          }
        },
        "required": [
          "data",
          "job_type",
          "object_type"
        ]
      },
      "Export": {
        "type": "object",
        "description": "An export of the branch's files, or a push of them to an integration.",
        "properties": {
          "object_type": {
            "type": "string",
            "description": "Always `EXPORT`.",
            "enum": [
              "EXPORT"
            ],
            "example": "EXPORT"
          },
          "id": {
            "type": "string",
            "description": "Unique identifier of the export.",
            "example": "reg_0197c8f2-5a6b-7cde-8f12-3456789abcde",
            "minLength": 1,
            "pattern": "^reg_[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}$"
          },
          "branch_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique identifier of the branch the export was made from; null once the branch is deleted.",
            "example": "prb_0197c8f2-5a6b-7cde-8f12-3456789abcde",
            "pattern": "^prb_[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_codes": {
            "type": [
              "array",
              "null"
            ],
            "description": "Languages the export was limited to; null when it includes every language.",
            "example": [
              "de",
              "fr"
            ],
            "items": {
              "type": "string"
            }
          },
          "status": {
            "$ref": "#/components/schemas/ExportStatus",
            "description": "Status of the export.",
            "example": "SUCCEEDED"
          },
          "status_details": {
            "description": "Machine-readable outcome explanation, including failures and explained skips; null when no explanation was recorded or is needed.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/SyncStatusDetails"
              },
              {
                "type": "null"
              }
            ],
            "example": null
          },
          "git_result": {
            "description": "Persisted commit, actual Git head branch and any associated pull-request reference for this export's confirmed successful push; null when no complete result was recorded. A later failed or skipped attempt can retain an earlier confirmed result. A null result does not prove that a failed provider request had no remote side effects.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExportGitResult"
              },
              {
                "type": "null"
              }
            ],
            "example": null
          },
          "download_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the zip with the exported files, valid for 24 hours; reading the export again gives a fresh one. Null unless the export SUCCEEDED.",
            "example": "https://storage.lingohub.com/exports/reg_0197c8f2-5a6b-7cde-8f12-3456789abcde?token=abc"
          },
          "download_url_expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When `download_url` stops working. Retrieve the export again for a fresh URL; null when there is no URL.",
            "example": "2025-01-16T10:30:00.123Z"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the export was created.",
            "example": "2025-01-15T10:30:00.123Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the export was last updated.",
            "example": "2025-06-20T14:45:00.123Z"
          }
        },
        "required": [
          "branch_id",
          "created_at",
          "download_url",
          "download_url_expires_at",
          "git_result",
          "id",
          "language_codes",
          "object_type",
          "status",
          "status_details",
          "updated_at"
        ]
      },
      "ExportStatus": {
        "type": "string",
        "description": "Status of an export. `QUEUED` and `PROCESSING` are pending; the others are final. `SUCCEEDED`: every file was exported and the zip can be downloaded. `PARTIALLY_SUCCEEDED`: a git or content-platform push in which some items failed. `FAILED`: a file failed and the export stopped; `status_details` says why. `CANCELLED`: the project was deleted before the export ran. `SKIPPED`: an integration push found nothing to do.",
        "enum": [
          "QUEUED",
          "PROCESSING",
          "SUCCEEDED",
          "PARTIALLY_SUCCEEDED",
          "FAILED",
          "CANCELLED",
          "SKIPPED"
        ]
      },
      "SyncStatusDetails": {
        "type": "object",
        "description": "A machine-readable explanation of a background operation or entry outcome. The detail is safe display text, not a value to parse. A failed or partial operation may already have applied changes; inspect its entries before retrying.",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/SyncStatusCode",
            "description": "Stable public outcome code.",
            "example": "NO_FILES"
          },
          "detail": {
            "type": "string",
            "description": "English explanation of the outcome.",
            "example": "There are no files to export."
          }
        },
        "required": [
          "code",
          "detail"
        ]
      },
      "SyncStatusCode": {
        "type": "string",
        "description": "Public background-operation and entry outcome codes. ALREADY_EXISTS explains a skipped language addition. PARTIAL_FAILURE means some work completed. UNKNOWN_ERROR means no more specific cause was recorded. Clients must tolerate future codes.",
        "enum": [
          "ALREADY_EXISTS",
          "UNKNOWN_ERROR",
          "PARTIAL_FAILURE",
          "STORAGE_UPLOAD_FAILED",
          "STORAGE_DOWNLOAD_FAILED",
          "ARCHIVE_CREATION_FAILED",
          "LANGUAGE_NOT_DETECTED",
          "FILE_PATH_NOT_DETECTED",
          "PRETRANSLATION_FAILED",
          "TRANSLATION_PROVIDER_FAILED",
          "EMPTY_FILE",
          "UNKNOWN_ENCODING",
          "UNSUPPORTED_IMPORT_FORMAT",
          "INVALID_FILE_SYNTAX",
          "DUPLICATE_KEY",
          "KEY_OPERATION_IN_PROGRESS",
          "INVALID_DOCUMENT",
          "DOCUMENT_PROCESSING_FAILED",
          "UNSUPPORTED_EXPORT_FORMAT",
          "FILE_GENERATION_FAILED",
          "INVALID_FILE_STRUCTURE",
          "RESOURCE_TREE_CHANGED",
          "RESOURCE_NOT_FOUND",
          "LANGUAGE_NOT_FOUND",
          "LANGUAGE_NOT_SUPPORTED",
          "NO_RESOURCES",
          "NO_FILES",
          "ENTRY_FAILURES",
          "DOCUMENT_VERSION_MISSING",
          "DOCUMENT_MERGE_FAILED",
          "INVALID_TRANSLATIONS",
          "INTEGRATION_RESOURCE_NOT_FOUND",
          "INTEGRATION_FAILED",
          "INCOMPLETE_TRANSLATION",
          "INTERRUPTED",
          "SELECTION_CHANGED",
          "EMPTY_SELECTION",
          "MOVE_SOURCE_CHANGED",
          "BACKUP_FAILED",
          "RESTORE_FAILED",
          "EXECUTION_FAILED",
          "TIMED_OUT"
        ]
      },
      "ExportGitResult": {
        "type": "object",
        "description": "The persisted result of a confirmed Git push for this export.",
        "properties": {
          "commit_sha": {
            "type": "string",
            "description": "Commit SHA returned by the Git provider for this export's successful push.",
            "example": "0a1b2c3d4e5f0a1b2c3d4e5f0a1b2c3d4e5f0a1b"
          },
          "git_branch": {
            "type": "string",
            "description": "Actual destination Git branch; for a pull-request push this is the normalized head branch, not the base branch.",
            "example": "lingohub/main"
          },
          "pull_request_reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Repository-local pull-request reference confirmed by the provider for this export. Null for direct pushes, older exports or a confirmed pull request whose provider response lacks a usable reference. This is a provider reference, not a LingoHub entity ID.",
            "example": "42"
          },
          "pull_request_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-returned web link for the confirmed pull request, or null when unavailable. No URL is inferred from a branch or credential-bearing connection.",
            "example": "https://github.com/example/translations/pull/42"
          }
        },
        "required": [
          "commit_sha",
          "git_branch",
          "pull_request_reference",
          "pull_request_url"
        ]
      },
      "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"
        }
      },
      "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"
            }
          }
        }
      },
      "NotFound": {
        "description": "The resource does not exist, or the API key cannot see it.",
        "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"
      }
    }
  }
}
````
