---
title: "Publish an agent"
method: POST
path: "/v1/agents/{agent_id}/publish"
tags: ["Agents"]
---

# Publish an agent

`POST /v1/agents/{agent_id}/publish`

Publish an agent's latest draft as its live published version.

You must be a member of the agent's organization. Publishing promotes the current
draft graph to a new published version. A draft that cannot produce its declared
input/output contract is rejected with `422` and is not published.

## Path parameters

- `agent_id` string, uuid, required — The ID of the agent to publish.

## Response `201`

Successful Response

- Agent — Summary information for an agent.
  - `id` string, uuid, required — Unique ID for the agent.
  - `organization_id` string, uuid, required — Unique ID of the organization that owns the agent.
  - `name` string, required — Display name of the agent.
  - `status` 'draft' | 'published' | 'unknown', required — Current availability status for an agent.
  - `created_at` string, date-time, required — When the agent was created.
  - `description` string, nullable — Short description of the agent, if provided.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/cooper-square-technologies/apis/external-api.md) · [All operations](https://skmtc.net/cooper-square-technologies/apis/external-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cooper-square-technologies/external-api/revisions/ab03b3c80494/schema)
