Skip to content

API Reference

Base URL: https://api.echomode.io

All endpoints return JSON unless noted (e.g. POST /chat/stream uses Server-Sent Events). Authenticated endpoints require a Bearer token in the Authorization header.


Authentication

EchoMode uses JWT bearer tokens with refresh-token rotation. Obtain tokens via login or SSO, then pass the access token on every request:

Authorization: Bearer <access_token>

When the access token expires, exchange the refresh token for a new pair via POST /auth/refresh_tokens.


Error format

All error responses follow this shape:

json
{
  "detail": "Human-readable error message"
}
StatusMeaning
400Validation or domain error
401Missing or expired token
403Insufficient permissions
404Resource not found
409Conflict (duplicate email, etc.)
413Payload too large (avatar > 5 MB)
429Rate limited

Strict body validation

Some request bodies reject unexpected fields — sending any key not listed in the endpoint's table returns 422. These endpoints use strict validation:

  • POST /auth/register, POST /auth/set-password
  • POST /connectors/s3/connections, PATCH /connectors/connections/{id}, POST /connectors/connections/{id}/browse
  • POST /documents/paste, POST /documents/import-from-url, POST /documents/import-from-connector
  • POST /folders, PATCH /folders/{id}

Other endpoints silently ignore unknown fields.


Pagination

List endpoints use two pagination styles:

Keyset pagination (chats, logs): pass the next_cursor value from the response as the cursor query parameter.

Offset pagination (documents, job audit): use limit/offset query parameters.


Rate limiting

ScopeEndpointsLimit
IP-based/auth/register, /auth/login, /auth/refresh_tokensPer-IP throttle
User-basedAdmin operationsPer-user throttle

Enums & constants

These are the accepted string values for enum fields across the API. Passing an unrecognized value returns 400.

Visibility

Controls who can access a resource (agents, chats, documents, folders).

ValueScope
personalOnly the creator can access
team_levelAccessible to members of the specified teams (requires team_ids)
org_levelAccessible to all organization members
universalRead-only built-in resources (cannot be created via API)

Echo state

The alignment state machine that tracks whether conversations stay on-topic.

ValueMeaning
stableConversation is on-topic
mildDriftSlight topic drift detected
moderateDriftSignificant topic drift
severeDriftConversation has drifted far off-topic
assistantRefusalThe assistant refused to respond

Transitions flow: stablemildDriftmoderateDriftsevereDrift. On-topic messages move the state back toward stable. assistantRefusal is set independently when a refusal is detected.

Organization tier

ValueDescription
freeFree tier (default for new self-serve organizations)
proPro tier
maxMax tier

Resource type

Value
folder
agent
agent_draft
chat

Job status

Returned by the Jobs endpoints.

ValueMeaning
PENDINGQueued, not yet started
STARTEDPicked up by a worker
PROGRESSRunning (progress info available)
SUCCESSCompleted successfully
FAILUREFailed
RETRYFailed, will be retried
REVOKEDCancelled via POST /jobs/{job_id}/revoke

Connector provider

ValueLabel
google_driveGoogle Drive
onedriveOneDrive
sharepointSharePoint
dropboxDropbox
s3Amazon S3

OAuth-based providers: google_drive, dropbox, onedrive, sharepoint. Credential-based: s3.

Connection status

ValueMeaning
activeCredentials are valid
needs_reauthCredentials expired or invalid — re-authorize

Folder kind

ValueMeaning
systemSystem-managed folder (created automatically)
userUser-created folder

Folder system role

System folders have a role that determines their purpose in the folder tree.

ValueMeaning
org_rootOrganization-level shared root
team_rootTeam-level root
user_personal_orgUser's personal folder at the org level
user_personal_teamUser's personal folder within a team

Document paste source format

Used when creating documents via POST /documents/paste.

Value
text
markdown
code

Chunking method

Used in RAG configuration.

ValueDescription
tokenFixed token-count chunks with overlap
semanticSemantically-aware chunk boundaries

Retrieval mode

Used in RAG configuration.

ValueDescription
vectorVector similarity search only
word_matchKeyword / full-text search only
hybridCombines vector and keyword search (default)

Reranker type

Used in RAG configuration and Chat requests.

ValueDescription
cross_encoderNeural cross-encoder reranker
llmLLM-based reranker

Transition reason

Returned inside Echo events arrays to explain why the alignment state changed.

ValueMeaning
no changeScore stayed within current state bounds
scored below bound of stableScore dropped below the stable threshold
scored below bound of mild driftScore dropped below the mild-drift threshold
scored below bound of moderate driftScore dropped below the moderate-drift threshold
scored above bound of mild driftScore rose above the mild-drift threshold (recovering)
scored above bound of moderate driftScore rose above the moderate-drift threshold (recovering)
scored above bound of severe driftScore rose above the severe-drift threshold (recovering)
user exceeded off topic streakConsecutive off-topic rounds hit the streak threshold
user exceeded on topic streakConsecutive on-topic rounds hit the recovery threshold
assistant refusal detectedThe assistant refused to respond
assistant refusal clearedA normal response followed a prior refusal

Chunk source

Indicates how a chunk was retrieved. Returned in RAG retrieval results.

ValueMeaning
word_matchFull-text / keyword search
vectorVector similarity search
hybridCombined vector + keyword (RRF fusion)
expandedAdded via query expansion

Import file status

Returned by POST /documents/import-from-connector.

Value
queued
error

Chat export format

Used with GET /chat/{chat_id}/export.

Value
markdown
json

SSO provider

ValueNotes
googleGoogle sign-in (also accepts googleoauth)

Inference mode

Used with GET /inference/list-models.

Value
chat
embedding

Avatar content type

Accepted MIME types for avatar uploads (POST /entity/me/avatar). Max 5 MB.

ValueExtension
image/jpeg.jpg
image/png.png
image/webp.webp
image/gif.gif

Upload file type

Accepted file extensions for document uploads (POST /documents).

ExtensionNotes
.txtPlain text (must be UTF-8)
.mdMarkdown (must be UTF-8)
.pdfPDF (parsed server-side)
.docLegacy Word (parsed server-side)
.docxWord (parsed server-side)

Max upload size: 500 MB.


Modules

Endpoint documentation is grouped by API module: