Create Document
Create a new document
POST
Creates a new document in the specified collection.
Request Body
collectionstringrequiredCollection name.
dataobjectrequiredDocument data.
curl -X POST "https://api.example.com/v1/documents" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"collection": "posts",
"data": {
"title": "My First Post",
"content": "Hello world!",
"published": true
}
}'{
"data": {
"id": "doc_xyz",
"collection": "posts",
"data": {
"title": "My First Post",
"content": "Hello world!",
"published": true
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}