> ## Documentation Index
> Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create release

> Promote a ready build to a formal version. The version number is fixed at this moment.

**`POST`** `https://api-datahub.octoparse.com/v1/data-apps/{app_id}/releases`

Authentication: API key required (`Authorization: Bearer <API Key>`). App author only; others get `404`.

Promote a specified ready build to a formal version. **The version number is fixed here**: by default the patch segment of the current max version increments by one (first release is `0.1.0`). An explicit version must be three numeric segments and strictly greater than the current max — use it for major or minor bumps.

Preconditions: the build exists and is ready; the snapshot is re-run through the validation pipeline (specs may have evolved while the build lived); if `expected_revision` is set, the workspace must not have concurrent edits. Concurrent publishes are arbitrated by the unique constraint on (publisher, app name, version); on auto-version conflicts the engine recomputes and retries once. After publish the workspace is kept — it may already be ahead of the released snapshot.

## Request

### Path parameters

<ParamField path="app_id" type="string" required>
  App reference.
</ParamField>

### Request body

<ParamField body="build_id" type="string" required>
  Build id to publish. Must be ready.
</ParamField>

<ParamField body="version" type="string">
  Explicit three-segment version. Omit to bump the patch segment.
</ParamField>

<ParamField body="expected_revision" type="integer">
  Expected current draft revision. Mismatch returns `409`.
</ParamField>

### Example request

```bash theme={null}
curl -X POST \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"build_id": "bld_a583f440a0ab", "version": "1.2.0"}' \
  "https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/releases"
```

## Response

### 200 success

```json theme={null}
{
  "data": {
    "version": "1.2.0",
    "build_id": "bld_a583f440a0ab",
    "published_at": "2026-09-15T08:00:00+00:00",
    "latest": true
  }
}
```

The payload is wrapped in `data`. Fields:

<ResponseField name="app_name" type="string" required>
  —
</ResponseField>

<ResponseField name="namespace" type="string">
  —
</ResponseField>

<ResponseField name="version" type="string" required>
  Published version number.
</ResponseField>

<ResponseField name="build_id" type="string" required>
  Corresponding build.
</ResponseField>

<ResponseField name="published_at" type="string">
  Publish time.
</ResponseField>

<ResponseField name="missing_secrets" type="string[]">
  —
</ResponseField>

### Errors

| HTTP | `code`              | `category`      | Description                                                                      |
| ---- | ------------------- | --------------- | -------------------------------------------------------------------------------- |
| 401  | `unauthorized`      | `forbidden`     | Missing or invalid API key.                                                      |
| 404  | `build-not-found`   | `not_found`     | Build snapshot does not exist.                                                   |
| 409  | `build-not-ready`   | `invalid_input` | Build is not ready yet (building or failed) and cannot be published.             |
| 422  | `invalid-manifest`  | `invalid_input` | Manifest failed validation; `issues[]` lists the problems.                       |
| 409  | `revision-conflict` | `invalid_input` | `expected_revision` does not match the current draft revision — concurrent edit. |

Error responses use `{"error": {code, category, message, retryable}}`. See <a href="/docs/en/datahub/api/reference/introduction#errors">Errors</a>.

## Client libraries

The Python and JavaScript SDKs do not wrap this endpoint yet. Call REST directly.
