/api/v1, authenticates with a Bearer eak_* key, and
exchanges JSON.
A typical workflow: create a thread with a prompt, poll it by ID
until the assistant’s response finishes, and optionally list,
rename, or delete it.
Errors
Every failed request returns the same envelope:Error codes
NOT_FOUND is returned both when a resource truly doesn’t exist and when the
caller lacks permission to see it. This is intentional — it avoids leaking
the existence of threads the caller can’t access.Rate limits
Limits are applied at the organization level across every credential and endpoint. Requests over the limit return:429 as a signal to reduce request rate across the entire
organization — the limit is org-wide, not per-credential. If your
integration consistently approaches the quota, contact
support@endgame.io to review.
Create a thread
POST /api/v1/threads
Creates a new thread in the caller’s organization. The prompt is
required — it’s persisted as the first user message and triggers the
assistant’s response to generate asynchronously.
Request body
Example
GET /api/v1/threads/{id} until the returned
status.state is idle (success) or error.
Requires a user-scoped API key. Org-wide API keys and M2M tokens receive
403 FORBIDDEN.Get a thread
GET /api/v1/threads/{id}
Fetches a thread, every message on it, and a derived run status.
Path parameters
Example
status object summarizes the latest assistant message so callers
don’t have to re-derive it:
Individual message
status can be in_progress, corroborating,
completed, failed, or cancelled (always null for user messages).
List threads
GET /api/v1/threads
Lists threads visible to the caller, ordered by most recent activity
first (updatedAt when present, otherwise createdAt).
Query parameters
Example
Pagination
Walks are ordered by most recent activity first (
updatedAt when
present, otherwise createdAt, with id as a tiebreaker) — a thread
whose title was just renamed jumps to the top. Continue requesting pages
with the previous response’s nextCursor until it comes back null.
- Treat
cursorandnextCursoras opaque. The internal shape may change between releases; don’t parse or construct them yourself, and URL-encode when passing as a query parameter. - A malformed cursor returns
400 INVALID_PARAMSrather than silently falling back to page 1 — treat it as a programming bug, not a transient error. - Pages are stable across concurrent writes: a thread created mid-walk won’t cause duplicates or skips for the remainder of the walk.
- When
truncatedistrue, the walk hit the server-side window before covering every visible thread. Narrow withaccountIdto reach the rest.truncatedisfalsefor any org whose thread count fits inside the window (the common case).
Rename a thread
PATCH /api/v1/threads/{id}
Renames a thread. Only title is writable — unknown fields are
rejected with 400 INVALID_PARAMS.
Path parameters
Request body
Example
Requires a user-scoped API key; org-wide API keys and M2M tokens receive
403 FORBIDDEN. Users can only rename threads they created — attempting to rename
another user’s thread also returns 403 FORBIDDEN, even when the thread is
published.Delete a thread
DELETE /api/v1/threads/{id}
Soft-deletes a thread. The record is preserved server-side but will no
longer appear in GET /api/v1/threads or be readable via
GET /api/v1/threads/{id}.
Path parameters
Example
Requires a user-scoped API key; org-wide API keys and M2M tokens receive
403 FORBIDDEN. Users can only delete threads they created.