/content/markdowncontentCreate a markdown document (writes the head + version 1)
Create a record in markdown.
Auth: bearerAuth — calls run as the authenticated user.
- 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
- contentstring
Full raw markdown (stored byte-exact).
- titleoptionalstring
Optional; derived from frontmatter/H1 if omitted.
- categoryoptionalstring
Optional classification label.
- tagsoptionalstring[]
Optional tag set (trimmed + de-duplicated server-side).
- authoroptionalobject
Author of this revision; omit to attribute to the calling customer. customer/user are pinned to the caller; other types are caller-asserted (unverified).
{
"content": "string",
"title": "string",
"category": "string",
"tags": [
"string"
],
"author": {
"type": "string",
"id": "string",
"name": "string"
}
}The created 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"
}
}curl -X POST "https://api.agenticdeveloperhub.com/content/markdown" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "string",
"title": "string",
"category": "string",
"tags": [
"string"
],
"author": {
"type": "string",
"id": "string",
"name": "string"
}
}'const res = await fetch("https://api.agenticdeveloperhub.com/content/markdown", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"content\": \"string\",\n \"title\": \"string\",\n \"category\": \"string\",\n \"tags\": [\n \"string\"\n ],\n \"author\": {\n \"type\": \"string\",\n \"id\": \"string\",\n \"name\": \"string\"\n }\n}",
});
const data = await res.json();