---
title: "Publish Releases"
method: POST
path: "/v1/projects/{project_id}/cdn/releases"
tags: ["cdn"]
---

# Publish Releases

`POST /v1/projects/{project_id}/cdn/releases`

## Request

- Base URL: `https://api.sonenta.dev`
- URL: `https://api.sonenta.dev/v1/projects/{project_id}/cdn/releases`
- Auth: none declared

Build releases for one (or all) language+namespace combinations.

Idempotent: existing releases with matching content_hash are reused
rather than duplicated.

## Path parameters

- `project_id` string, required

## Request body

- CdnPublishIn
  - `language_code` string, nullable
  - `namespace` string, nullable
  - `version_slug` string, nullable: Project-version slug to publish. Defaults to the production version when omitted.
  - `allow_empty` boolean: By default a BASE bundle whose namespace has keys but ZERO publishable ones (all below 'translated', e.g. draft) is REFUSED (it would serve an empty bundle) and reported in `warnings`. Set true to force-publish the empty bundle anyway.

## Response `201`

Successful Response

- CdnPublishOut
  - `items` CdnReleaseSummary[], required
    - `uuid` string, required
    - `language_code` string, required
    - `namespace_slug` string, required
    - `namespace_uuid` string, required
    - `version_hash` string, required
    - `content_hash` string, required
    - `size_bytes` integer, required
    - `key_count` integer, required
    - `included_count` integer, required
    - `status` string, required
    - `published_at` string, date-time, required
    - `public_url` string, nullable
    - `latest_url` string, nullable
  - `new_count` integer, required
  - `reused_count` integer, required
  - `warnings` CdnEmptyBundleWarning[]
    - `language_code` string, required
    - `namespace` string, required
    - `key_count` integer, required
    - `included_count` integer, required
    - `excluded_count` integer, required
    - `skipped` boolean, required
    - `reason` string, required

## Other responses

- `422`: Validation Error

---

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