Chat with Knowledge Graph (org-wide)
POST
/api/v1/chat
const url = 'https://api.yggy.tech/api/v1/chat';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"message":"example","history":[],"options":{"tier":"fast"}}'};
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.yggy.tech/api/v1/chat \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "message": "example", "history": [], "options": { "tier": "fast" } }'Ask questions across every project the caller can access.
Omits a write project. Graph reads use the membership claim, matching org-wide MCP tokens.
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ” Media type application/json
object
message
required
Your question about the knowledge graph
string
history
Previous conversation messages for context
Array<object>
object
role
required
Message role
string
content
required
Message content
string
options
object
tier
Model tier for response quality
string
Responses
Section titled “ Responses ”Chat response
Media type application/json
object
success
required
boolean
data
required
object
response
required
The AI’s answer to your question
string
citations
Documents referenced by graph tools
Array<object>
object
documentId
required
Document that grounded the answer
string
source
Caller-supplied source id when present
string
snippet
Evidence text when the tool returned it
string
toolCalls
Array<object>
object
name
required
string
input
result
usage
object
inputTokens
number
outputTokens
number
totalTokens
number
metadata
required
object
processingTimeMs
required
number
tierApplied
required
string
Example
{ "data": { "metadata": { "tierApplied": "fast" } }}Unauthorized
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
string
Example
{ "success": false}Project access denied
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
string
Example
{ "success": false}Internal server error
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
string
Example
{ "success": false}