POST/api/v1/documents/ingest
Ingest a document
Fetch a URL into the workspace. Returns at once with processing_status: fetching; poll GET /api/v1/documents/{doc_id} until it clears.
REQUEST BODY · APPLICATION/JSON · REQUIRED
{
"content_type": "auto",
"source_url": "string"
}
REQUEST
curl -X POST "https://gateway.kumkuat.ai/api/v1/documents/ingest" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"content_type": "auto",
"source_url": "string"
}'
import requests
r = requests.post("https://gateway.kumkuat.ai/api/v1/documents/ingest", headers={"X-API-Key": "YOUR_KEY"}, json={
"content_type": "auto",
"source_url": "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/ingest", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"content_type": "auto",
"source_url": "string"
})
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200OK
{
"character_count": 0,
"document_id": "string",
"message": "Document ingested successfully",
"processing_status": "fetching",
"success": true,
"title": "string",
"word_count": 0
}
