Overview
GET
/content/markdown/{id}/versionscontentList a document’s versions, newest first (metadata only)
Fetch a record from versions by id.
Auth: bearerAuth — calls run as the authenticated user.
Parameters
- 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.
Responses
200
Version metadata, newest first
- itemsMarkdownDocumentVersionSummary[]
Example
{
"items": [
{
"id": "string",
"version": 0,
"title": "string",
"contentHash": "string",
"sizeBytes": 0,
"authorType": "string",
"authorId": "string",
"authorName": "string",
"createdAt": "string"
}
]
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}404
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X GET "https://api.agenticdeveloperhub.com/content/markdown/{id}/versions" \
-H "Authorization: Bearer YOUR_TOKEN"JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/content/markdown/{id}/versions", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
},
});
const data = await res.json();