Documentation

Backend API

Integrate with the AISA backend API

Endpoint

POST https://your-backend.azurewebsites.net/api/intake

Authentication

All requests must include the x-api-key header:

Headers:
  x-api-key: your_api_key_here
  Content-Type: application/json

Request Format

Send a POST request with the following JSON body:

{
  "message": "User's message text",
  "conversationId": "unique_conversation_id",
  "history": [
    { "role": "user", "content": "Previous message" },
    { "role": "assistant", "content": "Previous response" }
  ]
}

Response Format

The API returns a JSON response:

{
  "aisa_output": "AI assistant's response message",
  "model_used": "aisa-model"
}

Example Request

curl -X POST https://your-backend.azurewebsites.net/api/intake \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Hello",
    "conversationId": "conv_123",
    "history": []
  }'

Error Handling

The API returns standard HTTP status codes:

  • 200 - Success
  • 401 - Unauthorized (invalid or missing API key)
  • 400 - Bad Request (invalid payload)
  • 500 - Internal Server Error

Rate Limiting

API requests are rate-limited to prevent abuse. Contact support if you need higher limits.