Alice API Documentation

Welcome to the Alice API documentation. This API allows you to programmatically access your organization's data, manage rows, and integrate AI insights into your own applications.

Authentication

All API requests must be authenticated using your Organization's API credentials. You can generate these keys in the Organization Admin Panel.

Headers

Include the following headers with every request:

Header Description Example
X-API-KEY Your public Access Key ak_a1b2c3d4...
X-API-SECRET Your private Secret Key sk_9z8y7x6w...

GET /api/external/test/

Test your authentication credentials and retrieve basic organization info.

Response Example
{
  "message": "Authentication successful",
  "organization": "Acme Corp",
  "tier": "Enterprise"
}

GET /api/v1/rows/

Retrieve a paginated list of all saved rows (insights) for your organization.

Parameters
Parameter Type Description
page integer Page number (default: 1)
q string Search query (filters provider, topic, content)
Response Example
{
  "rows": [
    {
      "id": 123,
      "anbieter": "Microsoft",
      "thema": "Licensing Update",
      "date": "2025-10-15",
      "created_by": "john.doe"
    }
  ],
  "count": 50,
  "has_next": true,
  "next_page": 2
}

GET /api/v1/rows/<id>/

Retrieve full details, including AI analysis and raw data, for a specific row.

Response Example
{
  "id": 123,
  "anbieter": "Microsoft",
  "thema": "Licensing Update",
  "full_data": { ...JSON or Markdown... },
  "enhanced_information": "## Detailed Analysis...",
  "created_at": "2025-10-15T10:30:00Z",
  "created_by": "john.doe"
}

PUT / PATCH /api/v1/rows/<id>/

Update an existing row's content.

Payload
Field Type Description
anbieter string (Optional) Update the provider name
thema string (Optional) Update the topic/subject
full_data json (Optional) Update the structured data content
Response Example
{
  "message": "Row updated",
  "id": 123
}

DELETE /api/v1/rows/<id>/

Permanently delete a specific row.

Response Example
{
  "message": "Row deleted successfully"
}

POST /api/v1/chat/

Interact with ALICE programmatically. Send prompts, optional context (existing rows), and receive an AI generated response. If the AI detects structured data in the response, it will automatically create new rows which are returned in the response.

Payload
Field Type Description
prompt string Required. The user instruction or question.
context_ids array[int] List of Row IDs to include as context for the AI.
model_type string 'standard' or 'pro' (default: 'standard')
Response Example
{
  "response": "Here is the analysis based on the provided data...",
  "new_rows": [
    {
       "id": 205, 
       "anbieter": "New Vendor", 
       "thema": "Analysis Result"
    }
  ],
  "is_question": false,
  "tokens_used": 1420
}