Collection Operations - Answer Questions On Collection POST /v1/api/collection/answer
Resource URL /v1/api/collection/answer Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Answer questions based on all documents in a collection.
Parameter Description Required Type Default Value identifier Identifier of the collection Yes String N/A is_document Indicates if the identifier is a document No Boolean false questions_groups List of question groups to answer Yes Array N/A session_id Session identifier Yes String N/A
curl -X 'POST' \
'https://braegen.ai/v1/api/collection/answer' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"identifier": "col456",
"is_document": false,
"questions_groups": ["What is the main focus?", "Who is involved?"],
"session_id": "session789"
}'
curl -X 'POST' \
{
"is_error" : false ,
"message" : "Questions answered successfully",
"results" : {
"answers" : [
{ "question" : "What is the main focus?", "answer": "The collection focuses on AI research."},
{ "question" : "Who is involved?", "answer": "Key researchers and institutions."}
]
}
}
HTTP Response
HTTP Code Message 200 Successful Response 422 Validation Error
Collection Operations
Collection Operations - Collection Summary GET /v1/api/collection/{collection_id}/summary
Resource URL /v1/api/collection/{collection_id}/summary Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Provide a summary based on all documents in a collection.
Parameter Description Required Type Default Value collection_id Path parameter: ID of the collection Yes String N/A
curl -X 'GET' \
'https://braegen.ai/v1/api/collection/col456/summary' \
-H 'accept: application/json'
{
"is_error" : false ,
"message" : "Summary generated successfully",
"results" : {
"summary" : "This collection covers advancements in AI technology across multiple documents."
}
}
HTTP Response
HTTP Code Message 200 Successful Response 422 Validation Error
Collection Operations
Collection Operations - Get Questions By Opportunity Type GET /v1/api/collection/questions/{opportunity_type}
Resource URL /v1/api/collection/questions/{opportunity_type} Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Get a list of questions based on the specified opportunity type.
Parameter Description Required Type Default Value opportunity_type Path parameter: Type of opportunity Yes String N/A
curl -X 'GET' \
'https://braegen.ai/v1/api/collection/questions/research' \
-H 'accept: application/json'
{
"is_error" : false ,
"message" : "Questions retrieved successfully",
"results" : {
"questions" : [
"What are the key findings?" ,
"Who are the main contributors?" ,
"What is the timeline for this opportunity?"
]
}
}
HTTP Response
HTTP Code Message 200 Successful Response 422 Validation Error
Save Question Facts POST /v1/api/collection/save_facts/{document_id}
Resource URL /v1/api/collection/save_facts/{document_id} Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Save question facts based on question IDs and answers for a specific document.
Parameter Description Required Type Default Value document_id Unique identifier of the document Yes String N/A
Parameter Description Required Type Default Value facts Object containing question IDs and answers Yes Object[String] N/A
curl -X 'POST' \
'https://braegen.ai/v1/api/collection/save_facts/doc_001' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"q1": "Revenue is $500k",
"q2": "Target client is ABC Corp"
}'
{
"is_error" : false ,
"message" : "Facts saved successfully",
"results" : {
"document_id" : "doc_001"
}
}
HTTP Response
HTTP Code Message 200 Successful Response 422 Validation Error
Collection Management
Generate Facts GET /v1/api/collection/generate_facts/{collection_id}
Resource URL /v1/api/collection/generate_facts/{collection_id} Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Answer questions based on all documents in a collection to generate facts.
Parameter Description Required Type Default Value collection_id Unique identifier of the collection Yes String N/A user User requesting the facts Yes String N/A
curl -X 'GET' \
'https://braegen.ai/v1/api/collection/generate_facts/coll_001?user=jane.smith' \
-H 'accept: application/json'
{
"is_error" : false ,
"message" : "Facts generated successfully",
"results" : {
"facts" : {
"fact_1" : "Revenue potential is high",
"fact_2" : "Client interest confirmed"
}
}
}
HTTP Response
HTTP Code Message 200 Successful Response 422 Validation Error
Collection Management
Generate Narrative GET /v1/api/collection/{collection_id}/narrative
Resource URL /v1/api/collection/{collection_id}/narrative Response Format JSON Requires Authentication Yes Rate Limited Yes HTTPS Yes
Answer questions based on all documents in a collection to generate a narrative.
Parameter Description Required Type Default Value collection_id Unique identifier of the collection Yes String N/A
curl -X 'GET' \
'https://braegen.ai/v1/api/collection/coll_001/narrative' \
-H 'accept: application/json'
{
"is_error" : false ,
"message" : "Narrative generated successfully",
"results" : {
"narrative" : "This collection outlines a business opportunity with high potential based on the analyzed documents."
}
}
HTTP Response
HTTP Code Message 200 Successful Response 422 Validation Error