Create knowledge bases/item/sources
curl --request POST \
--url https://api.callaro.ai/api/v1/knowledge-bases/{knowledge_basis_id}/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'knowledge_base_source={
"selected_urls": [
"<string>"
],
"source_type": "<string>",
"title": "<string>",
"source_uri": "<string>",
"raw_text_input": "<string>",
"discover_pages": true,
"refresh_interval_hours": 123,
"knowledge_base_id": "<string>",
"knowledge_basis_id": "<string>",
"files": "<string>",
"file": "<string>"
}'const form = new FormData();
form.append('knowledge_base_source', '{
"selected_urls": [
"<string>"
],
"source_type": "<string>",
"title": "<string>",
"source_uri": "<string>",
"raw_text_input": "<string>",
"discover_pages": true,
"refresh_interval_hours": 123,
"knowledge_base_id": "<string>",
"knowledge_basis_id": "<string>",
"files": "<string>",
"file": "<string>"
}');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.callaro.ai/api/v1/knowledge-bases/{knowledge_basis_id}/sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.callaro.ai/api/v1/knowledge-bases/{knowledge_basis_id}/sources"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"knowledge_base_source\"\r\n\r\n{\r\n \"selected_urls\": [\r\n \"<string>\"\r\n ],\r\n \"source_type\": \"<string>\",\r\n \"title\": \"<string>\",\r\n \"source_uri\": \"<string>\",\r\n \"raw_text_input\": \"<string>\",\r\n \"discover_pages\": true,\r\n \"refresh_interval_hours\": 123,\r\n \"knowledge_base_id\": \"<string>\",\r\n \"knowledge_basis_id\": \"<string>\",\r\n \"files\": \"<string>\",\r\n \"file\": \"<string>\"\r\n}\r\n-----011000010111000001101001--"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, headers=headers)
print(response.text){
"data": {
"id": "<string>",
"tenant_id": "<string>",
"knowledge_base_id": "<string>",
"source_type": "<string>",
"status": "<string>",
"ingest_stage": "<string>",
"title": "<string>",
"source_uri": "<string>",
"source_file_name": "<string>",
"source_mime_type": "<string>",
"source_byte_size": 123,
"fallback_extraction_used": "<string>",
"ai_extraction_mode": "<string>",
"fallback_extraction_provider": "<string>",
"fallback_extraction_model_name": "<string>",
"estimated_fallback_charge": "<string>",
"fallback_billing_currency": "<string>",
"fallback_input_rate_per_million_usd": "<string>",
"fallback_input_rate_per_million_inr": "<string>",
"fallback_output_rate_per_million_usd": "<string>",
"fallback_output_rate_per_million_inr": "<string>",
"fallback_input_rate_source": "<string>",
"fallback_output_rate_source": "<string>",
"actual_fallback_charge": "<string>"
},
"message": "<string>",
"meta": {},
"request_id": "<string>"
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}KnowledgeBases
Create knowledge bases/item/sources
From api/v1/knowledge_base_sources#create in voice_saas_api. Fields come from that action’s strong params / params usage.
POST
/
api
/
v1
/
knowledge-bases
/
{knowledge_basis_id}
/
sources
Create knowledge bases/item/sources
curl --request POST \
--url https://api.callaro.ai/api/v1/knowledge-bases/{knowledge_basis_id}/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'knowledge_base_source={
"selected_urls": [
"<string>"
],
"source_type": "<string>",
"title": "<string>",
"source_uri": "<string>",
"raw_text_input": "<string>",
"discover_pages": true,
"refresh_interval_hours": 123,
"knowledge_base_id": "<string>",
"knowledge_basis_id": "<string>",
"files": "<string>",
"file": "<string>"
}'const form = new FormData();
form.append('knowledge_base_source', '{
"selected_urls": [
"<string>"
],
"source_type": "<string>",
"title": "<string>",
"source_uri": "<string>",
"raw_text_input": "<string>",
"discover_pages": true,
"refresh_interval_hours": 123,
"knowledge_base_id": "<string>",
"knowledge_basis_id": "<string>",
"files": "<string>",
"file": "<string>"
}');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.callaro.ai/api/v1/knowledge-bases/{knowledge_basis_id}/sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.callaro.ai/api/v1/knowledge-bases/{knowledge_basis_id}/sources"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"knowledge_base_source\"\r\n\r\n{\r\n \"selected_urls\": [\r\n \"<string>\"\r\n ],\r\n \"source_type\": \"<string>\",\r\n \"title\": \"<string>\",\r\n \"source_uri\": \"<string>\",\r\n \"raw_text_input\": \"<string>\",\r\n \"discover_pages\": true,\r\n \"refresh_interval_hours\": 123,\r\n \"knowledge_base_id\": \"<string>\",\r\n \"knowledge_basis_id\": \"<string>\",\r\n \"files\": \"<string>\",\r\n \"file\": \"<string>\"\r\n}\r\n-----011000010111000001101001--"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, headers=headers)
print(response.text){
"data": {
"id": "<string>",
"tenant_id": "<string>",
"knowledge_base_id": "<string>",
"source_type": "<string>",
"status": "<string>",
"ingest_stage": "<string>",
"title": "<string>",
"source_uri": "<string>",
"source_file_name": "<string>",
"source_mime_type": "<string>",
"source_byte_size": 123,
"fallback_extraction_used": "<string>",
"ai_extraction_mode": "<string>",
"fallback_extraction_provider": "<string>",
"fallback_extraction_model_name": "<string>",
"estimated_fallback_charge": "<string>",
"fallback_billing_currency": "<string>",
"fallback_input_rate_per_million_usd": "<string>",
"fallback_input_rate_per_million_inr": "<string>",
"fallback_output_rate_per_million_usd": "<string>",
"fallback_output_rate_per_million_inr": "<string>",
"fallback_input_rate_source": "<string>",
"fallback_output_rate_source": "<string>",
"actual_fallback_charge": "<string>"
},
"message": "<string>",
"meta": {},
"request_id": "<string>"
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}Authorizations
bearerAuthtenantApiKey
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional tenant context selector for JWT/partner key callers.
Path Parameters
Body
multipart/form-data
Wrapped resource object or the same fields at the top level.
Show child attributes
Show child attributes
Was this page helpful?