---
title: "Publish a data policy"
method: POST
path: "/v1/data-policies/{id}/publish"
tags: ["Data Policies"]
---

# Publish a data policy

`POST /v1/data-policies/{id}/publish`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/data-policies/{id}/publish`
- Auth: HTTP bearer

Publishes the latest checked version and makes it the one runs use. Send `expected_version` (from `GET /v1/data-policies/{id}/versions`): if the policy changed since you read it, the answer is 409 `revision_conflict`. A script rule with a syntax error is a 400 `POLICY_SCRIPT_SYNTAX_ERROR` naming the line. Requires `specs:write`. The person behind the key must be an Admin of the workspace, and the workspace must manage its own configuration; otherwise the answer is 403 `insufficient_role`.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `expected_version` integer

## Response `200`

OK

- object
  - `id` string, uuid
  - `status` 'published'
  - `version_id` string, uuid
  - `version` integer

## Other responses

- `400`: The request is invalid.
- `401`: Missing or invalid API key.
- `403`: The API key does not have the required scope.
- `404`: The requested resource was not found.
- `409`: The request conflicts with the current resource state.
- `429`: Daily rate limit exceeded.

## Changes

- **2026-11-26** `622d429de7ea`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/data-policies/:id/publish/post.md)

---

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