curl --request POST \
--url https://{api-address}.org.machina.gg/document \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data @- <<EOF
{
"embed-vector": false,
"metadata": {
"agent_id": "123"
},
"name": "New test document",
"value": {
"chat": [
"What is Lorem Ipsum?",
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
" It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
]
}
}
EOF{
"data": {
"_id": "67e1fc8c2a5ade8c69c03fe7",
"created": "Tue, 25 Mar 2025 00:45:00 GMT",
"embed-vector": false,
"id": "67e1fc8c2a5ade8c69c03fe7",
"metadata": {
"agent_id": "123"
},
"name": "New test document",
"status": null,
"updated": "Tue, 25 Mar 2025 00:45:00 GMT",
"value": {
"chat": [
"What is Lorem Ipsum?",
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
" It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
]
}
},
"message": "document saved",
"status": true
}Create a new document and configure metadata and properties.
curl --request POST \
--url https://{api-address}.org.machina.gg/document \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data @- <<EOF
{
"embed-vector": false,
"metadata": {
"agent_id": "123"
},
"name": "New test document",
"value": {
"chat": [
"What is Lorem Ipsum?",
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
" It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
]
}
}
EOF{
"data": {
"_id": "67e1fc8c2a5ade8c69c03fe7",
"created": "Tue, 25 Mar 2025 00:45:00 GMT",
"embed-vector": false,
"id": "67e1fc8c2a5ade8c69c03fe7",
"metadata": {
"agent_id": "123"
},
"name": "New test document",
"status": null,
"updated": "Tue, 25 Mar 2025 00:45:00 GMT",
"value": {
"chat": [
"What is Lorem Ipsum?",
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
" It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
]
}
},
"message": "document saved",
"status": true
}API key authentication
Unique identifier for the document
The main data of the document, can be any type (string, object, array, etc.)
Additional metadata for the document
Current status of the document
active, draft, archived Whether to create a vector embedding for the document
Document created successfully
Show child attributes
Unique identifier of the created document
Unique identifier of the created document (duplicate)
Unique name of the document
The main data of the document
Additional metadata for the document
Current status of the document
Creation timestamp
Update timestamp
Whether a vector embedding was created
Success message
Operation status