API Documentation

Integrate ACT analysis into your applications via the REST API. Requires a Pro or Enterprise plan.

Authentication

Include your API key in the Authorization header:

Authorization: Bearer act_your_api_key_here

Generate API keys from Settings.

Base URL

https://your-domain.com

Analyze Text

POST /v1/analyze

Request Body

{
  "text": "The response text to analyze",
  "session_id": "optional-session-uuid",
  "session_name": "optional session name"
}

Response

{
  "turn_number": 1,
  "metrics": { "formality_score": 0.72, "... 24 metrics": "..." },
  "z_scores": { "formality_score": 0.3, "...": "..." },
  "composite_score": 0.15,
  "alert": "GREEN",
  "entry_hash": "abc123...",
  "prev_hash": null,
  "session_id": "uuid"
}

curl Example

curl -X POST https://your-domain.com/v1/analyze \
  -H "Authorization: Bearer act_your_key" \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello, how can I help you today?"}'

Python Example

import requests

resp = requests.post(
    "https://your-domain.com/v1/analyze",
    headers={"Authorization": "Bearer act_your_key"},
    json={"text": "Hello, how can I help you today?"}
)
print(resp.json())

Batch Analyze

POST /v1/analyze/batch

Request Body

{
  "texts": ["First response", "Second response", "..."],
  "session_id": "optional-session-uuid",
  "session_name": "optional session name"
}

Response

{
  "results": [ { "turn_number": 1, "metrics": {...}, "...": "..." }, "..." ],
  "session_id": "uuid"
}

List Sessions

GET /v1/sessions
curl https://your-domain.com/v1/sessions \
  -H "Authorization: Bearer act_your_key"

Get Session Detail

GET /v1/sessions/{session_id}
curl https://your-domain.com/v1/sessions/your-session-uuid \
  -H "Authorization: Bearer act_your_key"

Rate Limits

Plan Analyses/Month Sessions API Access
Free505No
Pro5,000UnlimitedYes
EnterpriseUnlimitedUnlimitedYes

Error Codes

Code Meaning
401Missing or invalid API key
403Plan does not include API access
404Resource not found
422Invalid request body
429Monthly analysis limit reached
500Internal server error