OpenAPI Specification
openapi: 3.0.1
info:
title: Tolgee API Keys Languages 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: Languages
description: Manage project languages (locales).
paths:
/v2/projects/{projectId}/languages:
parameters:
- $ref: '#/components/parameters/ProjectId'
get:
operationId: getLanguages
tags:
- Languages
summary: List languages
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Size'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PagedLanguagesModel'
post:
operationId: createLanguage
tags:
- Languages
summary: Create a language
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LanguageRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LanguageModel'
/v2/projects/{projectId}/languages/{languageId}:
parameters:
- $ref: '#/components/parameters/ProjectId'
- name: languageId
in: path
required: true
schema:
type: integer
format: int64
put:
operationId: editLanguage
tags:
- Languages
summary: Update a language
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LanguageRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LanguageModel'
delete:
operationId: deleteLanguage
tags:
- Languages
summary: Delete a language
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
schemas:
LanguageModel:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
tag:
type: string
originalName:
type: string
flagEmoji:
type: string
base:
type: boolean
PageMeta:
type: object
properties:
size:
type: integer
format: int32
totalElements:
type: integer
format: int64
totalPages:
type: integer
format: int32
number:
type: integer
format: int32
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
PagedLanguagesModel:
type: object
properties:
_embedded:
type: object
properties:
languages:
type: array
items:
$ref: '#/components/schemas/LanguageModel'
page:
$ref: '#/components/schemas/PageMeta'
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: Project API key prefixed with `tgpak_`. Scoped to a single project.