Endpoints to manage visitor profiles and their persistent memory (key-value facts stored across conversations).Documentation Index
Fetch the complete documentation index at: https://docs.animam.ai/llms.txt
Use this file to discover all available pages before exploring further.
GET /tenants//visitors
List all visitor profiles for a tenant. Required scope:visitors:read
Request
Query Parameters
| Param | Type | Description |
|---|---|---|
limit | number | Results per page (default: 50, max: 200) |
offset | number | Pagination offset (default: 0) |
search | string | Search by email, displayName, or externalId |
Response
POST /tenants//visitors
Create a new visitor profile. Required scope:visitors:write
Request
Body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Conditional | Visitor email address |
displayName | string | No | Display name |
phone | string | No | Phone number |
authProvider | string | No | Auth provider identifier (e.g. email, google) |
externalId | string | Conditional | Your internal user ID |
metadata | object | No | Arbitrary JSON metadata attached to the visitor |
At least one of
email or externalId is required to create a visitor profile.Response
GET /tenants//visitors/
Retrieve a specific visitor with their conversation count and memory fact count. Required scope:visitors:read
Response
PATCH /tenants//visitors/
Update a visitor profile. Only provided fields are modified. Required scope:visitors:write
DELETE /tenants//visitors/
Delete a visitor and all associated data (conversations, memory facts). Required scope:visitors:write
Response
Memory
Each visitor can store persistent key-value facts collected during conversations via theREMEMBER_FACT tool. Memory facts are injected into future conversations to give the agent context about returning visitors.
GET /tenants//visitors//memory
List all memory facts for a visitor. Required scope:visitors:read
Response
POST /tenants//visitors//memory
Create or update a memory fact (upsert by key). Required scope:visitors:write
Body
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Fact identifier (snake_case recommended) |
value | string | Yes | Fact value (stored as string) |
Response
GET /tenants//visitors//memory/
Retrieve a specific memory fact. Required scope:visitors:read
Response
DELETE /tenants//visitors//memory/
Delete a specific memory fact. Required scope:visitors:write
Response
Visitor Resolution
When a visitor sends a message to the chat endpoint, Animam resolves their profile using the following lookup order:X-Visitor-Idheader — pass the visitor ID explicitly from your backend.visitorIdbody field — include in the JSON body of the chat request.- Session cookie / anonymous — if no identifier is provided, the visitor is treated as anonymous for that session.
REMEMBER_FACT tool works alongside this system: when the agent decides to remember something, it calls the tool during the conversation, and the fact is persisted immediately and available from the next message onwards.
Visitor Authentication
Animam supports multiple authentication modes for visitors, configured per-tenant via thevisitorAuthMode field. This controls how the agent verifies visitor identity before granting access to sensitive actions.
| Mode | visitorAuthMode value | Description |
|---|---|---|
| None | null | No authentication required (anonymous visitors allowed) |
| JWT | "jwt" | Visitor presents a signed JWT; the agent validates the signature using the tenant’s public key |
| OTP email | "otp" | Agent sends a one-time code to the visitor’s email via SEND_VERIFICATION_CODE, then verifies it via VERIFY_VISITOR_CODE |
| Both | "all" | Agent accepts either JWT or OTP |
Context webhook (HMAC)
For use cases where identity is established by your own backend, you can configure a context webhook. Your server signs a payload with a shared HMAC secret; the agent verifies it via theVERIFY_EXTERNAL_CHALLENGE synthetic tool. This enables delegated 2FA flows where Animam acts as the conversation layer but your backend remains the authority on identity.
Visitor auth mode and webhook configuration are set on the tenant object. See the Tenant endpoints for configuration details.