---
title: "Publish Agent"
method: POST
path: "/api/agents/{agent_id}/publish"
tags: ["agents"]
---

# Publish Agent

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

Publish an agent (make it publicly accessible).

## Path parameters

- `agent_id` integer, required

## Response `200`

Successful Response

- PublishResponse — Response model for publish/unpublish operations.
  - `message` string, required
  - `agent` AgentResponse, required — Response model for agent data.
    - `id` integer, required
    - `user_id` integer, required
    - `name` string, required
    - `description` string, nullable, required
    - `instructions` string, nullable, required
    - `execution_mode` string, required
    - `models` object, nullable, required
    - `knowledge_bases` string[], required
    - `skills` string[], required
    - `tool_categories` string[], required
    - `suggested_prompts` string[], required
    - `logo_url` string, nullable, required
    - `status` string, required
    - `published_at` string, nullable, required
    - `created_at` string, required
    - `updated_at` string, required
    - `widget_enabled` boolean, required
    - `allowed_domains` string[], required
    - `share_enabled` boolean, required
    - `share_updated_at` string, nullable, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/xorbitsai/apis/xagent.md) · [All operations](https://skmtc.net/xorbitsai/apis/xagent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xorbitsai/xagent/versions/33e4ba4936ad/schema)
