Unfortunately, integration via the Heidi API and Widget is no longer available in Australia and New Zealand. If you're an existing customer, reach out to your Customer Success representative. Otherwise, contact our team to find out what this means for you.
Heidi API
Documents

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 of TEMPLATE
  • template_id (string, optional): The ID of the template to use for document generation. Required when generation_method is TEMPLATE
  • voice_style (string, optional): The voice style to use for the generated document. Can be one of GOLDILOCKS, DETAILED, BRIEF, SUPER_DETAILED, MY_VOICE
  • brain (string, required, default: LEFT): The brain option to use. Can be one of LEFT, RIGHT
  • content_type (string, optional): Content type for the generated document. Can be MARKDOWN or HTML

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"
    }
  ]
}