Tolgee Projects API

Create and manage localization projects.

OpenAPI Specification

tolgee-projects-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Tolgee API Keys Projects API
  description: Subset of the Tolgee localization platform REST API covering projects, keys, translations, languages, import/export, and screenshots. Tolgee is open source and can be self-hosted; this specification targets Tolgee Cloud at https://app.tolgee.io. Project-scoped resources are authenticated with a Project API key (prefixed `tgpak_`) sent in the `X-API-Key` header. A Project API key is bound to a single project, so endpoints that implicitly operate on "the current project" (such as export) are accessible when authenticated with that key.
  termsOfService: https://tolgee.io/terms_and_conditions
  contact:
    name: Tolgee Support
    email: support@tolgee.io
  license:
    name: Source available / AGPL and commercial (self-hosted)
    url: https://docs.tolgee.io/platform/self_hosting/licensing
  version: v2
servers:
- url: https://app.tolgee.io
  description: Tolgee Cloud
security:
- ApiKeyAuth: []
tags:
- name: Projects
  description: Create and manage localization projects.
paths:
  /v2/projects:
    get:
      operationId: getAllProjects
      tags:
      - Projects
      summary: List projects
      description: Returns a paginated list of projects the caller can access.
      parameters:
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/Size'
      - name: search
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedProjectsModel'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createProject
      tags:
      - Projects
      summary: Create a project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectModel'
        '400':
          $ref: '#/components/responses/BadRequest'
  /v2/projects/{projectId}:
    parameters:
    - $ref: '#/components/parameters/ProjectId'
    get:
      operationId: getProject
      tags:
      - Projects
      summary: Get a project
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectModel'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: editProject
      tags:
      - Projects
      summary: Update a project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectModel'
    delete:
      operationId: deleteProject
      tags:
      - Projects
      summary: Delete a project
      responses:
        '200':
          description: OK
components:
  parameters:
    Page:
      name: page
      in: query
      required: false
      description: Zero-based page index.
      schema:
        type: integer
        format: int32
        default: 0
    ProjectId:
      name: projectId
      in: path
      required: true
      description: Numeric project identifier.
      schema:
        type: integer
        format: int64
    Size:
      name: size
      in: query
      required: false
      description: Page size.
      schema:
        type: integer
        format: int32
        default: 20
  responses:
    Unauthorized:
      description: Missing or invalid API key.
    BadRequest:
      description: Invalid request payload.
    NotFound:
      description: Resource not found.
  schemas:
    PagedProjectsModel:
      type: object
      properties:
        _embedded:
          type: object
          properties:
            projects:
              type: array
              items:
                $ref: '#/components/schemas/ProjectModel'
        page:
          $ref: '#/components/schemas/PageMeta'
    LanguageModel:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        tag:
          type: string
        originalName:
          type: string
        flagEmoji:
          type: string
        base:
          type: boolean
    CreateProjectRequest:
      type: object
      required:
      - name
      - languages
      properties:
        name:
          type: string
        slug:
          type: string
        description:
          type: string
        baseLanguageTag:
          type: string
        languages:
          type: array
          items:
            $ref: '#/components/schemas/LanguageRequest'
        organizationId:
          type: integer
          format: int64
    LanguageRequest:
      type: object
      required:
      - name
      - tag
      properties:
        name:
          type: string
        tag:
          type: string
          description: BCP-47 language tag, e.g. en, de, fr-FR.
        originalName:
          type: string
        flagEmoji:
          type: string
    PageMeta:
      type: object
      properties:
        size:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
        number:
          type: integer
          format: int32
    ProjectModel:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        slug:
          type: string
        description:
          type: string
        baseLanguage:
          $ref: '#/components/schemas/LanguageModel'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Project API key prefixed with `tgpak_`. Scoped to a single project.