API Reference

Relay exposes a REST API for programmatic access. All endpoints require authentication via a session cookie (web) or Bearer token (MCP).

Authentication

For API/MCP access, create a token in Settings and pass it as a Bearer token:

Authorization: Bearer relay_your_token_here

Rate limits

API action limits depend on your plan. Free includes 15 reads and 5 writes per day. Starter includes 100 reads and 50 writes per day. Pro includes 300 reads and 150 writes per day. Rate limit info is returned in response headers.

Projects

GET/api/projects

List all projects for the authenticated user

POST/api/projects

Create a new project

GET/api/projects/:id

Get project details

PATCH/api/projects/:id

Update project name/description

DELETE/api/projects/:id

Archive a project

Memory

GET/api/projects/:id/memory

List memory items for a project

POST/api/projects/:id/memory

Add a memory item (decision, note, task, etc.)

PATCH/api/projects/:id/memory/:memoryId

Update a memory item

DELETE/api/projects/:id/memory/:memoryId

Delete a memory item

POST/api/projects/:id/memory/batch

Batch add/update memory items

POST/api/projects/:id/memory/search

Search project memory

Sources

GET/api/projects/:id/sources

List imported source files for a project

POST/api/projects/:id/sources

Upload and ingest a source file

GET/api/projects/:id/sources/:sourceId

Get source metadata, preview chunks, and fact candidates

DELETE/api/projects/:id/sources/:sourceId

Archive an imported source

PATCH/api/projects/:id/sources/:sourceId/candidates/:candidateId

Promote or reject an extracted fact candidate

Context & Briefs

POST/api/projects/:id/context/compose

Generate a context brief for a target profile

GET/api/projects/:id/context/history

List generated context packets

POST/api/projects/:id/bootstrap

Generate a full bootstrap brief

GET/api/projects/:id/bootstrap/latest

Get the latest cached bootstrap brief

POST/api/projects/:id/handoff

Compose paid fresh-chat context

Work Sessions

POST/api/projects/:id/work-sessions/open

Open a new work session

POST/api/projects/:id/work-sessions/checkpoint

Save a checkpoint to the active session

POST/api/projects/:id/work-sessions/close

Close the active work session

Auth

POST/api/extension/tokens

Create an API token for MCP/extension

DELETE/api/extension/tokens/:id

Revoke an API token