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 rate limits depend on your plan. The Free plan allows 20 MCP reads and 5 MCP writes per day. Pro allows 200 reads and 50 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

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

Generate a fresh-chat brief export (Pro only)

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