POST/api/v1/documents
Create a new document
Create a new document (admin/owner only)
REQUEST BODY · APPLICATION/JSON · REQUIRED
{
"content": "string",
"content_type": "text",
"tags": [],
"title": "string"
}
REQUEST
curl -X POST "https://gateway.kumkuat.ai/api/v1/documents" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "string",
"content_type": "text",
"tags": [],
"title": "string"
}'
import requests
r = requests.post("https://gateway.kumkuat.ai/api/v1/documents", headers={"X-API-Key": "YOUR_KEY"}, json={
"content": "string",
"content_type": "text",
"tags": [],
"title": "string"
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://gateway.kumkuat.ai/api/v1/documents", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"content": "string",
"content_type": "text",
"tags": [],
"title": "string"
})
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
201Created
{
"document": {
"character_count": 1,
"content_type": "string",
"created_at": "string",
"id": "string",
"title": "string",
"word_count": 1
},
"message": "Document created successfully"
}
