Overview
POST
/document/versionsdocumentCreate versions
Create a record in versions.
Auth: bearerAuth — calls run as the authenticated user.
Request body
application/json · optional
- documentIdstring
- deletedAtoptionalstring?
- ecosystemIdoptionalstring
- namestring
- descriptionoptionalstring
- pinnedOpIdstring
- pinnedSyncVersioninteger
- isDeletedoptionalboolean
Example
{
"documentId": "string",
"deletedAt": "string",
"ecosystemId": "string",
"name": "string",
"description": "string",
"pinnedOpId": "string",
"pinnedSyncVersion": 0,
"isDeleted": true
}Responses
201
versions
- idstring
- documentIdstring
- customerIdstring
- deletedAtstring?
- ecosystemIdstring
- namestring
- descriptionstring
- pinnedOpIdstring
- pinnedSyncVersioninteger
- createdAtstring
- updatedAtstring
- isDeletedboolean
- syncVersioninteger
Example
{
"id": "string",
"documentId": "string",
"customerId": "string",
"deletedAt": "string",
"ecosystemId": "string",
"name": "string",
"description": "string",
"pinnedOpId": "string",
"pinnedSyncVersion": 0,
"createdAt": "string",
"updatedAt": "string",
"isDeleted": true,
"syncVersion": 0
}400
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/document/versions" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"documentId": "string",
"deletedAt": "string",
"ecosystemId": "string",
"name": "string",
"description": "string",
"pinnedOpId": "string",
"pinnedSyncVersion": 0,
"isDeleted": true
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/document/versions", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"documentId\": \"string\",\n \"deletedAt\": \"string\",\n \"ecosystemId\": \"string\",\n \"name\": \"string\",\n \"description\": \"string\",\n \"pinnedOpId\": \"string\",\n \"pinnedSyncVersion\": 0,\n \"isDeleted\": true\n}",
});
const data = await res.json();