Ask a question
POST
/v1/knowledge/search
const url = 'https://api.orvoca.com/v1/knowledge/search';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"query":"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/search \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "query": "example", "agent_id": "example" }'The “ask a question” tester: the chunks an agent would use, with their sources.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
query
required
string
agent_id
string
Example generated
{ "query": "example", "agent_id": "example"}Responses
Section titled “Responses”Best matches first
Media typeapplication/json
object
data
required
Array<object>
object
text
required
string
score
required
number
source
required
object
id
required
string
type
required
string
title
required
string
url
required
string | null
page
required
number | null
heading
required
string | null
Example
{ "data": [ { "source": { "type": "file" } } ]}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" }}