Authorizations
Body
UUID of your organization.
Knowledge base identifier (e.g. "product_docs", "help_center").
Unique document identifier. If a document with this ID exists, it will be updated.
Raw text content to ingest. Omit if using url or urls.
Single URL to crawl and ingest.
Array of URLs for batch crawling.
Maximum pages to crawl. Default: 500.
Maximum link depth to follow. Default: 5.
Optional key-value metadata (e.g. {"category": "pricing"}).
Response
Whether the request succeeded.
Human-readable status message.
The upserted document record.
curl -X POST https://api.ravan.ai/api/v1/rag/document \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"org_id": "1268c1f0-19f3-47db-aefb-c16a7c3ace6e",
"kb_id": "product_docs",
"doc_id": "pricing_page",
"text": "Contact our sales team for usage-based pricing details.",
"metadata": {"category": "pricing"}
}'
{
"success": true,
"message": "Document upserted successfully",
"data": {
"org_id": "1268c1f0-19f3-47db-aefb-c16a7c3ace6e",
"kb_id": "product_docs",
"doc_id": "pricing_page",
"status": "indexed"
}
}