RelayDocs

API reference

Owner API

The inbox talks to Relay through these endpoints. They need the session cookie you get by signing in, they act on the workspace you are currently in, and they’re listed here for completeness.

Not a stable public API

Owner endpoints serve Relay’s own inbox and can change between versions. There are no API keys yet; a keyed REST API and webhooks are on the roadmap.

Session#

Sign-in uses Google or an emailed link and is handled by the sign-in page (/login); use that rather than calling the auth endpoints by hand. The session lasts 14 days. Your access comes from the workspaces you belong to: a signed-in person with no workspace gets 403, and a workspace whose subscription has lapsed gets 402 on every endpoint here.

Team#

MethodPathBody / queryReturns
GET/api/admin/members—{ members, limit, canManage, you }; limit is the plan’s seat count, null for unlimited
POST/api/admin/members{ email }{ member, emailed }. Owner only; 409 when the plan’s seats are full
DELETE/api/admin/members?email={ ok }. Owner only; the owner can’t be removed

Conversations#

MethodPathBody / queryReturns
GET/api/admin/conversationsview = open | pending | resolved | bot | all, q{ conversations, counts }; newest 200
GET/api/admin/conversations?counts=1—{ counts, unread }
GET/api/admin/conversations/:id—{ conversation, messages, customer, history }
PATCH/api/admin/conversations/:id{ status?, priority?, tags? }{ conversation }
POST/api/admin/conversations/:id/messages{ body, internal?, resolve? }{ conversation, messages, email? }
GET/api/admin/stream—Server-Sent Events for every conversation change

Knowledge base and saved replies#

MethodPathBodyReturns
GET/api/admin/articles—{ articles }; drafts included
POST/api/admin/articles{ title, category?, excerpt?, body?, published? }{ article }
PATCH/api/admin/articles/:idAny article field{ article }
DELETE/api/admin/articles/:id—{ ok }
GET/api/admin/replies—{ replies }
POST/api/admin/replies{ title, body }{ reply }
PATCH/api/admin/replies/:id{ title?, body? }{ reply }
DELETE/api/admin/replies/:id—{ ok }

Feedback board#

MethodPathBody / queryReturns
GET/api/admin/feedbacksort, status, q{ posts, counts }
GET/api/admin/feedback/:id—{ post, comments }
PATCH/api/admin/feedback/:id{ title?, description?, status? }{ post }
DELETE/api/admin/feedback/:id—{ ok }; removes votes and comments too
POST/api/admin/feedback/:id/comments{ body }{ comment }; signed with the agent name

Workspace#

MethodPathBodyReturns
GET/api/admin/settings—{ settings, aiAvailable }
PATCH/api/admin/settingsAny settings field{ settings }
GET/api/admin/analytics—{ perDay, open, medianFirstResponseMins, botResolutionRate, topTags, total }
GET/api/admin/emails—{ config, log }; provider status and the 25 latest emails