---
title: "Publish translations to given environment"
method: POST
path: "/api/v2/environments/{environmentKey}/publish"
tags: ["Hosting"]
---

# Publish translations to given environment

`POST /api/v2/environments/{environmentKey}/publish`

## Request

- Base URL: `https://api.simplelocalize.io`
- URL: `https://api.simplelocalize.io/api/v2/environments/{environmentKey}/publish`
- Auth: API key in header `X-SimpleLocalize-Token`
- TypeScript: <https://skmtc.dev/simplelocalize/apis/simplelocalize-api/docs/api/v2/environments/:environmentKey/publish/post.ts> (a function with typed inputs; its response is checked against the schema)

The endpoint is used for publishing translations for given environment.
- By default, every project has two Translation Hosting environments (`_latest` and `_production`) and Translation Editor environment.
- Publication always (if not specified differently in the project settings) happens from the Translation Editor environment to the `_latest` environment, and then to the `_production` environment.
- There is no way to change this flow other than creating a custom environment in the project settings.
- In order to publish translations to the Production environment, you need use `_production` as 'environmentKey' parameter.
- In order to publish translations to the Latest environment, you need use `_latest` as `environmentKey` parameter.
- In order to publish translations to the custom environment, you need use your custom environment key as `environmentKey` parameter.
- Labels can be specified only for the Latest environment.

## Path parameters

- `environmentKey` string, required

## Request body

- CdnEnvironmentApiRequestPublication
  - `labels` string[]

## Response `200`

OK

## Other responses

- `400`: Bad Request
- `402`: Payment Required
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `429`: Too Many Requests
- `500`: Internal Server Error

## Changes

- **2026-11-07** `67a25a25863a`: 1 info
  - added optional request body
- **2025-11-12** `0329534cd557`: 1 warning, 16 info
  - deleted the `header` request parameter `X-SimpleLocalize-Token`
  - the endpoint scheme security `Project API Key` was added to the API
  - the endpoint scheme security `apiKey` was removed from the API
  - added the optional property `title` to the response with the `400` status
  - …13 more
- **2025-04-19** `5475c7163be9`: 7 info
  - added the optional property `code` to the response with the `400` status
  - added the optional property `code` to the response with the `402` status
  - added the optional property `code` to the response with the `403` status
  - added the optional property `code` to the response with the `404` status
  - …3 more
- **2023-11-30** `18bfbf87af44`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/simplelocalize/apis/simplelocalize-api/changes/api/v2/environments/:environmentKey/publish/post.md)

---

[API](https://skmtc.dev/simplelocalize/apis/simplelocalize-api.md) - [All operations](https://skmtc.dev/simplelocalize/apis/simplelocalize-api/llms.txt) - [OpenAPI document](https://skmtc.dev/simplelocalize/apis/simplelocalize-api/revisions/67a25a25863a?raw)
