---
title: "Publish To Platform"
method: POST
path: "/v1/platforms/publish/{content_id}"
tags: ["platforms"]
---

# Publish To Platform

`POST /v1/platforms/publish/{content_id}`

## Request

- Base URL: `https://api.theagentc.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.theagentc.io/v1/platforms/publish/{content_id}`
- Auth: HTTP bearer

Publish a content item to its target platform.

This endpoint:
1. Loads the content and its platform credentials
2. Auto-refreshes expired tokens
3. Posts via the platform adapter (X, YouTube, etc.)
4. Updates the content record with the result

The content must be in a publishable state (draft, approved,
or pending_approval). Credits should already be deducted via
the /content/{id}/publish endpoint before calling this.

## Path parameters

- `content_id` string, uuid, required

## Response `200`

Successful Response

- PublishResponse: Result of publishing content to a platform.
  - `success` boolean, required
  - `platform` string, required
  - `platform_post_id` string, nullable
  - `platform_url` string, nullable
  - `status` string, required
  - `error_message` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/theagentc/apis/the-agent-c-api.md) · [All operations](https://skmtc.dev/theagentc/apis/the-agent-c-api/llms.txt) · [OpenAPI document](https://skmtc.dev/theagentc/apis/the-agent-c-api/revisions/1c9868b44584?raw)
