---
title: "Publish Draft"
method: POST
path: "/v3/agent-editor/{draft_id}/publish"
tags: ["agent-editor"]
---

# Publish Draft

`POST /v3/agent-editor/{draft_id}/publish`

## Request

- Base URL: `https://api.mentium.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mentium.io/v3/agent-editor/{draft_id}/publish`
- Auth: HTTP bearer

Refused: a draft agent is published as a revision, through the safety gate.

Note: ``draft_id`` is the ID of the **draft** row (``is_draft=True``),
not the published agent it was cloned from.

## Path parameters

- `draft_id` string, uuid, required

## Headers

- `mentium-workspace-id` string, nullable

## Response `200`

Successful Response

- PublishDraftResponse: Response body for the publish draft endpoint.
  - `id` string, required: Published agent ID
  - `published` boolean, required: Whether the agent was published

## Other responses

- `422`: Validation Error

---

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