Add a website or a Q&A pair
POST
/v1/knowledge
const url = 'https://api.orvoca.com/v1/knowledge';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"type":"url","url":"example","agent_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.orvoca.com/v1/knowledge \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "type": "url", "url": "example", "agent_id": "example" }'Websites are crawled (up to 50 pages, same domain). Files go to POST /v1/knowledge/files.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Added; indexing has started
Media typeapplication/json
object
id
required
string
type
required
string
title
required
string
answer
required
string | null
url
required
string | null
agent_id
required
Null = every agent in the workspace
string | null
status
required
string
error
required
string | null
pages_done
required
Websites: pages read so far (of at most 50)
number | null
chunk_count
required
number
size_bytes
required
number | null
refreshed_at
required
string | null
created_at
required
string
Example
{ "type": "file", "status": "processing"}Invalid request
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not signed in or bad API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not allowed
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not found
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}