Overview
POST
/document/blocksdocumentCreate blocks
Create a record in blocks.
Auth: bearerAuth — calls run as the authenticated user.
Request body
application/json · optional
- documentIdstring
- deletedAtoptionalstring?
- ecosystemIdoptionalstring
- positionstring
- blockTypestring
- contentTextoptionalstring
- contentMetaoptionalstring
- isDeletedoptionalboolean
- lastOpIdoptionalstring?
Example
{
"documentId": "string",
"deletedAt": "string",
"ecosystemId": "string",
"position": "string",
"blockType": "string",
"contentText": "string",
"contentMeta": "string",
"isDeleted": true,
"lastOpId": "string"
}Responses
201
blocks
- idstring
- documentIdstring
- customerIdstring
- deletedAtstring?
- ecosystemIdstring
- positionstring
- blockTypestring
- contentTextstring
- contentMetastring
- createdAtstring
- updatedAtstring
- isDeletedboolean
- syncVersioninteger
- lastOpIdstring?
Example
{
"id": "string",
"documentId": "string",
"customerId": "string",
"deletedAt": "string",
"ecosystemId": "string",
"position": "string",
"blockType": "string",
"contentText": "string",
"contentMeta": "string",
"createdAt": "string",
"updatedAt": "string",
"isDeleted": true,
"syncVersion": 0,
"lastOpId": "string"
}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/blocks" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"documentId": "string",
"deletedAt": "string",
"ecosystemId": "string",
"position": "string",
"blockType": "string",
"contentText": "string",
"contentMeta": "string",
"isDeleted": true,
"lastOpId": "string"
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/document/blocks", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"documentId\": \"string\",\n \"deletedAt\": \"string\",\n \"ecosystemId\": \"string\",\n \"position\": \"string\",\n \"blockType\": \"string\",\n \"contentText\": \"string\",\n \"contentMeta\": \"string\",\n \"isDeleted\": true,\n \"lastOpId\": \"string\"\n}",
});
const data = await res.json();