Documents
Create a Document
Method: POST
Path: /sessions/{session_id}/documents
Description: Create an empty document for the session.
Request
POST /sessions/1234567890/documents
Authorization: Bearer <your_token>
Content-Type: application/json
{
"document_tab_type": "DOCUMENT",
"generation_method": "TEMPLATE",
"template_id": "66455a5f0b0a1c8d018c6896",
"voice_style": "GOLDILOCKS",
"brain": "LEFT",
"content_type": "MARKDOWN"
}Request Fields:
generation_method(string, required): The method for generating the document. Can be one ofTEMPLATEtemplate_id(string, optional): The ID of the template to use for document generation. Required whengeneration_methodisTEMPLATEvoice_style(string, optional): The voice style to use for the generated document. Can be one ofGOLDILOCKS,DETAILED,BRIEF,SUPER_DETAILED,MY_VOICEbrain(string, required, default:LEFT): The brain option to use. Can be one ofLEFT,RIGHTcontent_type(string, optional): Content type for the generated document. Can beMARKDOWNorHTML
Response
{
"id": "string",
"session_id": "string",
"name": "string",
"template_id": "string",
"brain": "string",
"voice_style": "string",
"content_type": "string",
"content": "string"
}Get List of Documents
Method: GET
Path: /sessions/{session_id}/documents
Description: Retrieve a list of all documents associated with a specific session.
Request
GET /sessions/1234567890/documents
Authorization: Bearer <your_token>Response
{
"documents": [
{
"id": "string",
"session_id": "string",
"index": 0,
"name": "string",
"template_id": "string",
"content": "string",
"generation_type": "TEMPLATE",
"brain": "LEFT"
}
]
}