/content/markdown/{id}/publishcontentPublish a document under an author-defined public route slug
Makes the document readable UNAUTHENTICATED at /public/users/{slug}/papers/{route}. The route is lowercase, url-safe, and UNIQUE PER AUTHOR — a collision with another of the caller’s live papers returns 409.
Auth: bearerAuth — calls run as the authenticated user.
- idpathstring
- workspacequery · optionalstring
Scope to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own documents. Unknown/foreign slug: 404.
application/json · optional
- routestring
Public route slug: lowercase, url-safe ([a-z0-9_-], leading alphanumeric), 2–128 chars.
{
"route": "string"
}The published document
- idstring
- customerIdstring
The CREATOR/author (public routes key on this).
- ecosystemIdstring
Ecosystem (tenant) id.
- ownerKind"customer" | "organization"
The kind of principal that OWNS the doc (what access scopes by).
- ownerIdstring
The owning principal (customer or organization id); server-stamped from the verified ?workspace= scope, else the creator.
- deletedAtoptionalstring?
- titlestring
- contentstring
Full raw markdown, byte-exact.
- frontmatteroptionalobject?
- categoryoptionalstring?
Optional classification label.
- tagsstring[]
Tag set (defaults to []).
- visibility"private" | "public"
Publication state: 'public' is readable on the public surface, 'private' is a draft.
- stage"draft" | "final"
Editorial stage: 'draft' is editable; 'final' is immutable (content/title edits + version writes are rejected).
- kind"paper" | "research"
Document kind: 'paper' (ordinary) or 'research' (AI-ingested, carries an adh_source frontmatter key).
- publicRouteoptionalstring?
Public route slug (non-null iff visibility='public'); unique per author.
- contentHashstring
SHA-256 hex of content (ETag).
- sizeBytesinteger
- currentVersioninteger
The current revision number (incremented on every edit).
- latestVersionIdoptionalstring?
- createdAtstring
- updatedAtstring
- isDeletedboolean
{
"id": "string",
"customerId": "string",
"ecosystemId": "string",
"ownerKind": "customer",
"ownerId": "string",
"deletedAt": "string",
"title": "string",
"content": "string",
"frontmatter": {},
"category": "string",
"tags": [
"string"
],
"visibility": "private",
"stage": "draft",
"kind": "paper",
"publicRoute": "string",
"contentHash": "string",
"sizeBytes": 0,
"currentVersion": 0,
"latestVersionId": "string",
"createdAt": "string",
"updatedAt": "string",
"isDeleted": true
}Error
- erroroptionalobject
{
"error": {
"message": "string",
"code": "string"
}
}Error
- erroroptionalobject
{
"error": {
"message": "string",
"code": "string"
}
}Error
- erroroptionalobject
{
"error": {
"message": "string",
"code": "string"
}
}Error
- erroroptionalobject
{
"error": {
"message": "string",
"code": "string"
}
}curl -X POST "https://api.agenticdeveloperhub.com/content/markdown/{id}/publish" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"route": "string"
}'const res = await fetch("https://api.agenticdeveloperhub.com/content/markdown/{id}/publish", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"route\": \"string\"\n}",
});
const data = await res.json();