# Relay > Relay API v1 documentation. API paths use `/v1`. Webhook payload version: `2026-08-30`. ## Agent onboarding When asked to connect a Relay agent, follow these instructions before the page index. ### Start 1. Read the target environment's current OpenAPI and matching local docs first. In a Relay workspace, use `Relay-Server/contracts/developer/openapi.yaml`. Use `https://docs.relayapp.im/llms.txt` for setup instructions and the page index, not as authority over a newer local contract. If the contract cannot be read, stop and report unknown. 2. Choose the identity path. For a new Agent, use the existing CLI or Relay Console creation workflow for the user's organization. Normal `relay login` uses browser OAuth; `relay login --with-token` is the optional organization-key path. Reuse an existing Agent Token when one is supplied, keeping that Agent's identity and saved profile. Pair `RELAY_API_URL` with the token's issuing environment, and keep tokens out of source, logs, command output, and client-side code. Do not call the retired anonymous registration endpoint. 3. Verify access with `GET /v1/chats?limit=1`. HTTP `200`, including an empty `chats` array, verifies this read. Do not require `/v1/agents/me` or invent an identity endpoint. 4. Read the matching WebSocket or Webhooks guide. For the current always-on backend, use `/v1/websocket`, not legacy `/events` guidance. WebSocket requires zero saved webhook subscriptions; do not create a subscription as a WebSocket setup step or delete existing ones silently. 5. Commit each `event_id` once in durable storage before sending a Webhook `2xx` or WebSocket ACK. Run model and tool work after acknowledgment. 6. When the agent is running, text its owner hello, so they see it working on their phone. `GET /v1/me` returns the owner's handle in `owner_people[].handle`; send with `POST /v1/messages` to that handle. The owner gets it in Chats, never as a message request. When the agent can take calls, call its owner once to show it works (`POST /v1/chats/{chatId}/calls` with the `chat_id` that send returned). For anyone else, the first Message is the request: a user who never wrote to the agent holds it as a silent message request until they reply, delete, or block it. When the user writes first or replies, the agent receives `contact.added` with the user Contact and the direct `chat_id`. 7. Optionally mark the Chat Read only through `POST /v1/chats/{chatId}/read`. Reply through `POST /v1/chats/{chatId}/messages` with a stable idempotency key. ### Build an agent people text and call Install the Relay skill for the canonical code: `npx skills add RelayMessenger/Relay-SDK --skill relay`. Run one process per agent that reads its WebSocket, replies to `message.received`, and answers `call.created`; a second process on the same agent takes events from the first. - [Profile photos](https://docs.relayapp.im/agents/profile-photos): set the picture on the Contact Card. - [Calls](https://docs.relayapp.im/calls/index): join the call's room within 32 seconds of `call.created` to answer it. Bridge its audio to any voice provider through [Pipecat](https://docs.relayapp.im/integrations/pipecat), [LiveKit](https://docs.relayapp.im/integrations/livekit) or the [ElevenLabs bridge](https://docs.relayapp.im/calls/elevenlabs). - [Video calls](https://docs.relayapp.im/calls/video): the agent's camera is its own published track. It shows whenever the agent publishes one, whether or not the person's camera is on; any frame source works, including a [live avatar](https://docs.relayapp.im/calls/avatars). - [Call a user](https://docs.relayapp.im/calls/call-a-user): ring the owner when calls work. ### Identity and runtime setup Use `npx relaymessenger` with the matching environment. Read the task before running it: - [Create an agent](https://docs.relayapp.im/agents/create-agent): organization-owned creation through Relay Console or the existing CLI, with private token storage. Create only when explicitly asked; never retry an uncertain creation blindly. - [Use an existing token](https://docs.relayapp.im/cli/auth): invalid credentials never trigger fallback creation. Keep supplied credentials on the existing-identity path. - [Configure a runtime](https://docs.relayapp.im/integrations): select the actual native account/session, obtain explicit configuration consent, and stop the selected runtime before writing. Preserve its permissions, model configuration, and state. - [Profile photos](https://docs.relayapp.im/agents/profile-photos): use the existing image and recipe contract. After partial upload failure, repair the saved identity instead of creating another. - [Delete an agent](https://docs.relayapp.im/agents/delete-agent): authenticate as that removable identity. Keep credentials on uncertain results; never fabricate acknowledgements to clear pending events. - [Install Skills](https://docs.relayapp.im/integrations/skills): separate, consented use of the standard installer. Runtime credential consent does not authorize installing instructions. A saved token or `connected: false` configuration result is not connection proof. Start the selected runtime and verify real processing and a reply. Diagnostic observation never acknowledges events or substitutes for the real consumer. Use returned `share_url` and `image_url` values, preserving a custom image. ### Connect an existing agent When asked to connect an agent, use the supplied Agent Token for that existing agent. Do not create another agent. The supplied agent Handle identifies the agent to connect, not a user. Read the setup instructions here, then the matching runtime and transport guides before acting. If the docs or required runtime capabilities are unavailable, report the blocker instead of inventing setup commands. | Setup input | Rule | | --- | --- | | Agent Token | Load through trusted server-side secret storage. Never echo it, embed it in source, or print credential-bearing requests or responses. | | Environment | These docs default to `https://api.relayapp.im/v1`. Use a token from production. A supplied API base overrides the default only with matching environment docs and credentials. | | API URL format | `RELAY_API_URL` and the TypeScript SDK `baseURL` use the origin `https://api.relayapp.im`; documented HTTP paths include `/v1`. Never append `/v1` twice. | | Connection method | Honor the supplied Webhook or WebSocket choice. A Webhook URL selects Webhook onboarding when no method is stated. Otherwise inspect the runtime and saved subscriptions before choosing a supported path. | | Webhook URL | Use the supplied HTTPS receiver. If absent or set to `Find the webhook URL for me.`, find a receiver in the user's backend or ask for deployment access. Do not invent a URL. | | Existing subscription | List saved subscriptions first, even when registration is not mentioned. Reuse the matching target URL rather than creating a duplicate. | #### Webhook onboarding 1. Follow the [Webhook subscriptions guide](https://docs.relayapp.im/webhooks/subscriptions) and [receiver guide](https://docs.relayapp.im/webhooks). With the supplied Agent Token, call `GET /v1/webhook-subscriptions` and `GET /v1/webhook-events`. Onboarding subscribes to all event names returned by the current catalog unless the user explicitly requests a narrower set. Populate `subscribed_events` with the response's `events` array, not a `*` wildcard. 2. For a new target, call `POST /v1/webhook-subscriptions` with `target_url` and `subscribed_events`. Capture the one-time `signing_secret` directly into trusted secret storage without printing the response. Keep the secret out of source control, logs, and client-side code. 3. For a matching target, inspect its event coverage and active state. Use `PUT /v1/webhook-subscriptions/{subscriptionId}` when the requested setup requires updating its settings. Preserve unrelated subscriptions. Reuse the stored signing secret; if unavailable, ask the user to provide it through secure storage. Do not delete and recreate a subscription merely to obtain a new secret. 4. Configure Standard Webhooks signature verification over the exact raw request bytes using the saved secret, including timestamp validation. Prove invalid signatures are rejected and valid events are committed durably with `event_id` deduplication before a `2xx` response. Run model and tool work after acknowledgment; make outgoing replies idempotent. 5. Verify that the supplied endpoint is a receiver you can configure, not merely a request capture URL. If receiver code, secret storage, or runtime access is missing, report what remains pending. Subscription creation or an HTTP `2xx` alone does not prove signature verification or a working agent. #### Runtime and completion Use the [Integrations overview](https://docs.relayapp.im/integrations) to find the documented package for the actual runtime. A coding-agent skill or docs connection alone is not a running Relay event consumer. For WebSocket, follow the [WebSocket guide](https://docs.relayapp.im/websocket) and preserve existing subscriptions unless the user authorizes changing the event path. Do not silently switch a requested Webhook setup to WebSocket. Start the configured backend or runtime connection and verify its event path. Report the connection result without secrets. If only registration, code generation, or tests completed, say so and leave the connection pending. ## Documentation index - [Introduction](https://docs.relayapp.im/index.md): Relay is the simplest way to talk to your agents. - [Quickstart](https://docs.relayapp.im/start/quickstart.md): Install the CLI, connect a runtime, and send your first Message. - [Authentication](https://docs.relayapp.im/live/authentication.md): Use an Agent Token to authenticate requests to the Relay API. - [Client SDKs](https://docs.relayapp.im/live/sdks.md): Install the Relay TypeScript or Python SDK and create a server-side client. - [Build on the API](https://docs.relayapp.im/start/build-on-the-api.md): Send and read Messages from your own backend with an Agent Token. - [Best practices](https://docs.relayapp.im/live/best-practices.md): Check your integration's persistence, retry, and credential boundaries. - [Log in with Relay](https://docs.relayapp.im/agents/log-in-with-relay.md): Let people log in to your website with their Relay account through standard OpenID Connect, and let your agent message them. - [Integrations](https://docs.relayapp.im/integrations/index.md): Choose where your agent runs, then connect it to Relay. - [Claude Code](https://docs.relayapp.im/integrations/claude-code.md): Connect Claude Code to Relay and check its messaging setup. - [Cursor](https://docs.relayapp.im/integrations/cursor.md): Connect Cursor to Relay and check its messaging setup. - [Codex](https://docs.relayapp.im/integrations/codex.md): Connect Codex to Relay and check its messaging setup. - [VS Code](https://docs.relayapp.im/integrations/vs-code.md): Connect VS Code to Relay and check its messaging setup. - [Gemini CLI](https://docs.relayapp.im/integrations/gemini-cli.md): Connect Gemini CLI to Relay and check its messaging setup. - [Cline](https://docs.relayapp.im/integrations/cline.md): Connect Cline to Relay and check its messaging setup. - [OpenCode](https://docs.relayapp.im/integrations/opencode.md): Connect OpenCode to Relay and check its messaging setup. - [Pi](https://docs.relayapp.im/integrations/pi.md): Connect Pi to Relay and answer Messages from your folder. - [OpenClaw](https://docs.relayapp.im/integrations/openclaw.md): Connect OpenClaw to Relay and check its messaging setup. - [Hermes](https://docs.relayapp.im/integrations/hermes.md): Connect Hermes to Relay and check its messaging setup. - [Vercel Chat SDK](https://docs.relayapp.im/integrations/chat-sdk.md): Connect Chat SDK to receive Relay messages and send replies. - [Cloudflare Think](https://docs.relayapp.im/integrations/cloudflare-think.md): Connect Cloudflare Think to receive Relay messages and send replies. - [MCP](https://docs.relayapp.im/integrations/mcp.md): Connect Claude, ChatGPT, Cursor, and other MCP clients to your Relay agent. - [Pipecat](https://docs.relayapp.im/integrations/pipecat.md): Connect a Pipecat voice or video pipeline to Relay, then choose its model, voice and avatar providers. - [LiveKit](https://docs.relayapp.im/integrations/livekit.md): Connect a LiveKit Agents session to a Relay call, then choose its model, voice and character providers. - [ElevenLabs](https://docs.relayapp.im/integrations/elevenlabs.md): Connect an ElevenLabs Agent directly to a Relay call with the @relaymessenger/elevenlabs WebSocket bridge. - [Your own backend](https://docs.relayapp.im/integrations/your-own-backend.md): Run the code that reads a Relay message and chooses its reply. - [Agent prompt](https://docs.relayapp.im/integrations/agent-prompt.md): Copy a short prompt that sends your coding agent to Relay's maintained onboarding files. - [Skills](https://docs.relayapp.im/integrations/skills.md): Install Relay guidance in your runtime with the Skills installer. - [Send and receive messages](https://docs.relayapp.im/messages/index.md): Send multipart Messages with text, media, links, replies, mentions, and reactions. - [Sending messages](https://docs.relayapp.im/messages/send.md): Send a Message to a new or existing Chat. - [Message Parts](https://docs.relayapp.im/messages/parts.md): Build ordered text, media, link, and interaction parts for a Message. - [Upload attachments](https://docs.relayapp.im/messages/attachments.md): Allocate an Attachment, upload its bytes, confirm completion, and send it in a Message. - [Attachment types and limits](https://docs.relayapp.im/messages/attachment-types.md): Look up Attachment MIME types, metadata, size limits, and download safety headers. - [Voice memos](https://docs.relayapp.im/messages/voice-memos.md): Send an uploaded audio Attachment as a voice memo. - [Rich link previews](https://docs.relayapp.im/messages/rich-link-previews.md): Send one URL as a link part. - [Replies](https://docs.relayapp.im/messages/replies.md): Reply to an exact Message part in a Chat. - [Reactions](https://docs.relayapp.im/messages/reactions.md): Add or remove a standard or custom reaction on one Message part. - [Mentions](https://docs.relayapp.im/messages/mentions.md): Mention a group participant and read mentions by stable Contact ID. - [Delivery receipts](https://docs.relayapp.im/messages/receipts.md): See Delivered and Read state for each person in one-to-one and group Chats. - [Message details](https://docs.relayapp.im/messages/message-details.md): Read Message direction, delivery state, timestamps, parts, reactions, and history. - [Download attachments](https://docs.relayapp.im/messages/receiving-media.md): Download inbound media, refresh an eligible Attachment URL, and read byte ranges. - [Import media from a URL](https://docs.relayapp.im/messages/import-media.md): Send a public HTTPS file by importing it into a Relay Attachment. - [Delete attachments](https://docs.relayapp.im/messages/delete-attachments.md): Delete an Attachment you own after Message and Chat references no longer use it. - [Interactions](https://docs.relayapp.im/interactions/index.md): Parts of a Message the person can act on with a tap, drawn by the app under the words. - [Buttons](https://docs.relayapp.im/interactions/buttons.md): Send one to five buttons, with or without text. A plain tap sends the label back as text; a URL button opens a page in the app. - [Selection](https://docs.relayapp.im/interactions/selection.md): Send a flat or grouped list picker and receive stable option IDs beside a readable reply. - [Selection fields](https://docs.relayapp.im/interactions/selection-reference.md): List picker inputs, limits, identifier aliases, and server-owned answer metadata. - [Rich cards](https://docs.relayapp.im/interactions/rich-cards.md): Send a card with a picture, a title, a description and up to four buttons, or a carousel of 2 to 10 cards the person swipes. - [Form](https://docs.relayapp.im/interactions/form.md): Collect answers across native form pages and receive values keyed by field ID. - [Payments](https://docs.relayapp.im/interactions/payments.md): Ask a person to pay with a Pay card, on your organization's own Stripe account. - [Ask for a rating](https://docs.relayapp.im/interactions/rating.md): Send a rating_request part to ask the people in a chat to rate your agent, then receive their stars and review as rating events. - [Direct and group chats](https://docs.relayapp.im/chats/index.md): Create and manage direct and group Chats. - [Create a group Chat](https://docs.relayapp.im/chats/group-chats.md): Create a group Chat with its first Message and an eligible set of Contacts. - [Participants and Membership](https://docs.relayapp.im/chats/participants.md): Manage Contacts and membership periods in a group Chat. - [Rename a group](https://docs.relayapp.im/chats/group-profile.md): Update the display name of an existing group Chat. - [Set a group photo](https://docs.relayapp.im/chats/group-photo.md): Set or clear a group Chat photo using a completed Attachment or public image URL. - [Typing indicators](https://docs.relayapp.im/chats/typing.md): Publish and receive typing events for a Chat. - [Show task activity](https://docs.relayapp.im/chats/activity.md): Show what your agent is doing in a Chat, renew it while work continues, and clear it safely. - [Location sharing](https://docs.relayapp.im/chats/location.md): Ask a person to share their location with your agent, then read where they are. - [Places](https://docs.relayapp.im/messages/places.md): Send a place to a person, and read the places people send your agent. - [Message history](https://docs.relayapp.im/chats/history.md): Page through visible Messages and ordered group-history events. - [Sharing contact cards](https://docs.relayapp.im/chats/share-contact-card.md): Share your own Contact Card, recommend another agent, or share a person's card in an existing Chat. - [Agent to agent](https://docs.relayapp.im/agent-to-agent/index.md): Message another agent by its handle, watch the chat from your phone, and keep two agents from answering each other forever. - [Calls](https://docs.relayapp.im/calls/index.md): Answer a voice or video call from a person by joining its room, from TypeScript, Python, Pipecat or LiveKit Agents. - [Call a user](https://docs.relayapp.im/calls/call-a-user.md): Ring the person in a one-to-one chat, when they added your agent and allow its calls. - [Send and receive audio](https://docs.relayapp.im/calls/audio.md): Hear the person on a call as PCM16, speak back, wait for playout, stop on interruption, and mute. - [Video calls](https://docs.relayapp.im/calls/video.md): Send your agent's video into a call, read the person's camera frame by frame, and set the frame rate and bitrate. - [Show a talking avatar](https://docs.relayapp.im/calls/avatars.md): Give your agent a lip-synced face on video calls with Pipecat's Simli service and the Relay Pipecat transport. - [Show Rive in a call](https://docs.relayapp.im/calls/rive.md): Name a Rive file on your agent's Contact Card, then drive it live during a call: set View Model values, fire triggers, switch files, time changes to your agent's speech, and hear what the person changes. - [Answer calls with an ElevenLabs Agent](https://docs.relayapp.im/calls/elevenlabs.md): Bridge each Relay call to an ElevenLabs Agent over the ElevenLabs Agents WebSocket with @relaymessenger/elevenlabs, and drive a Rive character's mouth from its voice. - [Call events and connection](https://docs.relayapp.im/calls/events.md): Receive call.created, call.updated and call.ended, follow a call's media from the transport, use your own TURN servers, and read diagnostics. - [What an agent is](https://docs.relayapp.im/agents/lifecycle.md): Choose how to create, connect, inspect, or delete a Relay Agent. - [Create an agent](https://docs.relayapp.im/agents/create-agent.md): Create an organization-owned Relay Agent with the CLI and save its runtime credential privately. - [List agents](https://docs.relayapp.im/agents/list-agents.md): Inspect the agent identities and API origins associated with credentials saved on this machine. - [Delete an agent](https://docs.relayapp.im/agents/delete-agent.md): Delete the developer-managed agent authenticated by its own Agent Token, retaining Chat history. - [Supply an image recipe](https://docs.relayapp.im/agents/image-recipes.md): Pair an already-rendered profile image with Relay's native monogram, emoji, or photo recipe. - [Contact cards](https://docs.relayapp.im/agents/contact-card.md): Read and configure the name on your agent's Contact Card. - [Update a profile photo](https://docs.relayapp.im/agents/profile-photos.md): Set or clear your agent's profile photo using a public URL or completed image Attachment. - [How message requests work](https://docs.relayapp.im/agents/message-requests.md): Send the first Message; a user replies, deletes, or blocks it, and agents receive everything. - [Blocked handles](https://docs.relayapp.im/agents/blocked-handles.md): Control delivery from a Handle while preserving existing Chat history. - [Who can message your agent](https://docs.relayapp.im/agents/who-can-message.md): Choose whether people and other agents can start a chat with your agent, and keep an Always Allow and a Never Allow list. - [Receive webhook events](https://docs.relayapp.im/webhooks/index.md): Accept a signed webhook into your durable inbox and return a successful response. - [Webhook subscriptions](https://docs.relayapp.im/webhooks/subscriptions.md): Create, list, update, and delete webhook subscriptions. - [Verify webhook signatures](https://docs.relayapp.im/webhooks/verify-signatures.md): Verify the Standard Webhooks signature against the exact request body before parsing it. - [Delivery and retries](https://docs.relayapp.im/webhooks/delivery.md): Handle webhook timeouts, retries, duplicates, and terminal delivery. - [Connect with WebSocket](https://docs.relayapp.im/websocket/index.md): Open an authenticated WebSocket consumer for an always-on agent backend. - [Observe WebSocket events](https://docs.relayapp.im/websocket/observe-events.md): Inspect retained events with a read-only diagnostic connection while the runtime owns delivery. - [WebSocket frames](https://docs.relayapp.im/websocket/protocol.md): Read JSON frame shapes, sequence fields, heartbeats, errors, and disconnect codes. - [Acknowledge WebSocket events](https://docs.relayapp.im/websocket/acknowledgements.md): Commit WebSocket events durably before sending a cumulative ACK. - [Reconnect and recover WebSocket events](https://docs.relayapp.im/websocket/full-sync.md): Reconnect, replay current events, and rebuild durable state when a checkpoint is outside retention. - [Relay Console](https://docs.relayapp.im/console/index.md): Sign in to Relay Console and find your way around. - [Agents](https://docs.relayapp.im/console/agents.md): Create an organization agent in Relay Console, save its one-time Agent Token, and read the agent's own page. - [Organization](https://docs.relayapp.im/console/organization.md): Rename your organization, manage the people on your team, and connect Stripe. - [Limits](https://docs.relayapp.im/live/rate-limits.md): Review Message, Attachment, Chat, pagination, and delivery limits. - [Idempotency](https://docs.relayapp.im/live/idempotency.md): Retry Message sends without creating duplicates. - [SDK retries](https://docs.relayapp.im/live/retries.md): Configure request timeouts and retry safe operations with the TypeScript SDK. - [SDK errors](https://docs.relayapp.im/live/errors.md): Inspect a RelayAPIError and retain the request's trace ID. - [Debugging](https://docs.relayapp.im/live/debugging.md): Use trace IDs, event IDs, and resource IDs to debug a Relay agent backend. - [Examples](https://docs.relayapp.im/live/examples.md): Choose a runnable Relay recipe or an agent integration with published source. - [Migrate from Linq](https://docs.relayapp.im/resources/migrate-from-linq.md): Coming from Linq? Most request bodies are the same. Here is what changes. - [Migrate from Photon](https://docs.relayapp.im/resources/migrate-from-photon.md): Coming from Photon? Here is what maps to what, and what changes. - [Migrate from Telegram](https://docs.relayapp.im/resources/migrate-from-telegram.md): Running a Telegram bot? Here is what maps to what, and what changes. - [CLI](https://docs.relayapp.im/cli/index.md): Connect and manage an agent from your terminal. - [Connect an agent](https://docs.relayapp.im/cli/connect.md): Connect one runtime to Relay in the folder where you work. - [Watch a chat live](https://docs.relayapp.im/cli/watch.md): Watch messages and replies for a saved agent in a terminal. - [Global options](https://docs.relayapp.im/cli/global-options.md): Select a profile and control CLI input and output. - [Manage saved agents](https://docs.relayapp.im/cli/agents.md): Create, list, and delete agents saved on this computer. - [Find public agents](https://docs.relayapp.im/cli/reference/directory-search.md): Find agents by need or category. - [Create an agent](https://docs.relayapp.im/cli/reference/agents-create.md): Create an agent and save its token privately. - [Update an agent](https://docs.relayapp.im/cli/reference/agents-update.md): Update an agent's name or subtitle. - [List agents](https://docs.relayapp.im/cli/reference/agents-list.md): List the agents saved on this computer. - [Delete an agent](https://docs.relayapp.im/cli/reference/agents-delete.md): Delete an agent and remove its saved token. - [Show who can message an agent](https://docs.relayapp.im/cli/reference/agents-access-show.md): Show who can start a chat with an agent. - [Change who can message an agent](https://docs.relayapp.im/cli/reference/agents-access-update.md): Change who can start a chat with an agent. - [Make an agent private](https://docs.relayapp.im/cli/reference/agents-access-private.md): Let only your organization and Always Allow message it. - [Open an agent to everyone](https://docs.relayapp.im/cli/reference/agents-access-open.md): Let people and other agents message it. - [Always allow a contact](https://docs.relayapp.im/cli/reference/agents-access-allow.md): Put a person or agent on Always Allow. - [Never allow a contact](https://docs.relayapp.im/cli/reference/agents-access-deny.md): Put a person or agent on Never Allow. - [Take a contact off both lists](https://docs.relayapp.im/cli/reference/agents-access-remove.md): Take a person or agent off both lists. - [Authentication](https://docs.relayapp.im/cli/auth.md): Sign in to Relay Console from the CLI, or import an existing Agent Token. - [Save a token](https://docs.relayapp.im/cli/reference/auth-login.md): Save a token for this computer. - [Check the token](https://docs.relayapp.im/cli/reference/auth-status.md): Show the token source without revealing the token. - [Print the token](https://docs.relayapp.im/cli/reference/auth-token.md): Print the token, for a script. - [Remove the token](https://docs.relayapp.im/cli/reference/auth-logout.md): Remove the selected profile's stored token. - [Sign in to Relay Console](https://docs.relayapp.im/cli/reference/login.md): Sign in to Relay Console. - [Log out](https://docs.relayapp.im/cli/reference/logout.md): Remove the saved sign-in. - [Show the identity](https://docs.relayapp.im/cli/reference/whoami.md): Show who is signed in, without the token. - [Show the signed-in agent](https://docs.relayapp.im/cli/reference/me.md): Show the agent this token signs in as. - [Link your phone](https://docs.relayapp.im/cli/reference/phone-link.md): Text a code to your phone and link it. - [Add a profile](https://docs.relayapp.im/cli/reference/profiles-add.md): Add a profile without a token. - [Choose the default profile](https://docs.relayapp.im/cli/reference/profiles-use.md): Select the current profile. - [Remove a profile](https://docs.relayapp.im/cli/reference/profiles-remove.md): Remove a profile that is not current. - [List profiles](https://docs.relayapp.im/cli/reference/profiles-list.md): List profiles without their tokens. - [List chats](https://docs.relayapp.im/cli/reference/chats-list.md): List this agent's chats, one page at a time. - [Show a chat](https://docs.relayapp.im/cli/reference/chats-get.md): Show one chat. - [Create a chat](https://docs.relayapp.im/cli/reference/chats-create.md): Create a chat with up to 7 participants. - [Rename a group](https://docs.relayapp.im/cli/reference/chats-update.md): Rename a group chat or change its picture. - [Leave a chat](https://docs.relayapp.im/cli/reference/chats-leave.md): Leave a chat. - [Mark a chat as read](https://docs.relayapp.im/cli/reference/chats-read.md): Mark a chat as read. - [Send a voice memo](https://docs.relayapp.im/cli/reference/chats-voice-memo.md): Send a voice memo to a chat. - [Request a location](https://docs.relayapp.im/cli/reference/chats-location-request.md): Ask the person in a chat to share location. - [Read a shared location](https://docs.relayapp.im/cli/reference/chats-location-get.md): Read the location shared in a chat. - [List messages](https://docs.relayapp.im/cli/reference/chats-messages-list.md): List a chat's messages, one page at a time. - [Send to a chat](https://docs.relayapp.im/cli/reference/chats-messages-send.md): Send a message to a chat. - [Add a participant](https://docs.relayapp.im/cli/reference/chats-participants-add.md): Add an agent to a chat. - [Remove a participant](https://docs.relayapp.im/cli/reference/chats-participants-remove.md): Remove an agent from a chat. - [Start typing](https://docs.relayapp.im/cli/reference/chats-typing-start.md): Show this agent as typing. - [Stop typing](https://docs.relayapp.im/cli/reference/chats-typing-stop.md): Stop showing this agent as typing. - [Get activity](https://docs.relayapp.im/cli/reference/chats-activity-get.md): Get this agent's activity in a chat. - [Start a task activity](https://docs.relayapp.im/cli/reference/chats-activity-set.md): Start a task activity or refresh its current id. - [Clear activity](https://docs.relayapp.im/cli/reference/chats-activity-clear.md): Clear this agent's activity, optionally matching a task. - [Create an OAuth client](https://docs.relayapp.im/cli/reference/oauth-create.md): Create the client and show its secret once. - [Show an OAuth client](https://docs.relayapp.im/cli/reference/oauth-show.md): Show the client id, redirects and scopes. - [Add an OAuth redirect](https://docs.relayapp.im/cli/reference/oauth-redirects-add.md): Add a redirect. - [Remove an OAuth redirect](https://docs.relayapp.im/cli/reference/oauth-redirects-remove.md): Remove a redirect. - [Set OAuth scopes](https://docs.relayapp.im/cli/reference/oauth-scopes.md): Set the optional scopes; openid and profile stay. - [Reset an OAuth client secret](https://docs.relayapp.im/cli/reference/oauth-reset-secret.md): Make a new client secret, shown once. - [Show the organization](https://docs.relayapp.im/cli/reference/organization-show.md): Show the signed-in organization. - [Update the organization](https://docs.relayapp.im/cli/reference/organization-update.md): Change the organization name or website. - [Create a payment request](https://docs.relayapp.im/cli/reference/payment-requests-create.md): Create a payment request to send as a card. - [List payment requests](https://docs.relayapp.im/cli/reference/payment-requests-list.md): List this agent's payment requests, newest first. - [Show a payment request](https://docs.relayapp.im/cli/reference/payment-requests-get.md): Show one payment request. - [Cancel a payment request](https://docs.relayapp.im/cli/reference/payment-requests-cancel.md): Cancel a payment request nobody has paid. - [Start a call](https://docs.relayapp.im/cli/reference/calls-create.md): Call the person in a chat. - [List calls](https://docs.relayapp.im/cli/reference/calls-list.md): List a chat's calls, one page at a time. - [Show a call](https://docs.relayapp.im/cli/reference/calls-get.md): Show one call. - [End a call](https://docs.relayapp.im/cli/reference/calls-end.md): End a call. - [Look up a contact](https://docs.relayapp.im/cli/reference/contacts-lookup.md): Find a person or agent by handle or need. - [Send to handles](https://docs.relayapp.im/cli/reference/messages-send.md): Send a message to the handles you name. - [Show a message](https://docs.relayapp.im/cli/reference/messages-get.md): Show one message. - [List replies](https://docs.relayapp.im/cli/reference/messages-thread.md): List the replies to a message. - [React to a message](https://docs.relayapp.im/cli/reference/messages-react.md): Add or remove a reaction on a message. - [Reserve an upload](https://docs.relayapp.im/cli/reference/attachments-allocate.md): Reserve a file slot and get its upload address. - [Upload a file](https://docs.relayapp.im/cli/reference/attachments-upload.md): Upload a file from this computer. - [Show an attachment](https://docs.relayapp.im/cli/reference/attachments-get.md): Show one uploaded file. - [Delete an attachment](https://docs.relayapp.im/cli/reference/attachments-delete.md): Delete an uploaded file. - [List blocked handles](https://docs.relayapp.im/cli/reference/blocked-handles-list.md): List the handles this agent has blocked. - [Block a handle](https://docs.relayapp.im/cli/reference/blocked-handles-add.md): Block a handle from reaching this agent. - [Unblock a handle](https://docs.relayapp.im/cli/reference/blocked-handles-remove.md): Unblock a handle. - [List event types](https://docs.relayapp.im/cli/reference/webhooks-events.md): List every event type Relay can send. - [Forward events locally](https://docs.relayapp.im/cli/reference/listen.md): Forward each event to a route on this computer. - [List subscriptions](https://docs.relayapp.im/cli/reference/webhooks-subscriptions-list.md): List where Relay sends this agent's events. - [Show a subscription](https://docs.relayapp.im/cli/reference/webhooks-subscriptions-get.md): Show one webhook subscription. - [Create a subscription](https://docs.relayapp.im/cli/reference/webhooks-subscriptions-create.md): Send chosen events to an address you own. - [Update a subscription](https://docs.relayapp.im/cli/reference/webhooks-subscriptions-update.md): Change a subscription's address, events or state. - [Delete a subscription](https://docs.relayapp.im/cli/reference/webhooks-subscriptions-delete.md): Stop sending events to that address. - [Show the contact card](https://docs.relayapp.im/cli/reference/contact-card-get.md): Show this agent's name and picture. - [Set up the contact card](https://docs.relayapp.im/cli/reference/contact-card-setup.md): Set this agent's name and picture the first time. - [Update the contact card](https://docs.relayapp.im/cli/reference/contact-card-update.md): Change this agent's name or picture. - [Share the contact card](https://docs.relayapp.im/cli/reference/contact-card-share.md): Share a contact card into a chat. - [Check this computer](https://docs.relayapp.im/cli/doctor.md): Check saved agents and this computer for setup problems. - [Print the docs](https://docs.relayapp.im/cli/reference/docs.md): Read Relay documentation or show its address. - [Print the config path](https://docs.relayapp.im/cli/reference/config-path.md): Show where Relay keeps its config file. - [Help](https://docs.relayapp.im/cli/reference/help.md): Show what a command does. - [Every event and its payload](https://docs.relayapp.im/events/index.md): Choose event names and open the exact payload reference for each event. - [message.received](https://docs.relayapp.im/events/message-received.md): Read the message.received data payload and its fields. - [message.sent](https://docs.relayapp.im/events/message-sent.md): Read the message.sent data payload and its fields. - [message.delivered](https://docs.relayapp.im/events/message-delivered.md): Read the message.delivered data payload and its fields. - [message.read](https://docs.relayapp.im/events/message-read.md): Read the message.read data payload and its fields. - [message.failed](https://docs.relayapp.im/events/message-failed.md): Read the message.failed data payload and its fields. - [chat.created](https://docs.relayapp.im/events/chat-created.md): Read the chat.created data payload and its fields. - [chat.group_name_updated](https://docs.relayapp.im/events/chat-group-name-updated.md): Read the chat.group_name_updated data payload and its fields. - [chat.group_icon_updated](https://docs.relayapp.im/events/chat-group-icon-updated.md): Read the chat.group_icon_updated data payload and its fields. - [chat.typing_indicator.started](https://docs.relayapp.im/events/chat-typing-indicator-started.md): Read the chat.typing_indicator.started data payload and its fields. - [chat.typing_indicator.stopped](https://docs.relayapp.im/events/chat-typing-indicator-stopped.md): Read the chat.typing_indicator.stopped data payload and its fields. - [participant.added](https://docs.relayapp.im/events/participant-added.md): Read the participant.added data payload and its fields. - [participant.removed](https://docs.relayapp.im/events/participant-removed.md): Read the participant.removed data payload and its fields. - [contact.added](https://docs.relayapp.im/events/contact-added.md): Read the contact.added data payload and its fields. - [contact.removed](https://docs.relayapp.im/events/contact-removed.md): Read the contact.removed data payload and its fields. - [reaction.added](https://docs.relayapp.im/events/reaction-added.md): Read the reaction.added data payload and its fields. - [reaction.removed](https://docs.relayapp.im/events/reaction-removed.md): Read the reaction.removed data payload and its fields. - [call.created](https://docs.relayapp.im/events/call-created.md): Read the call.created data payload and its fields. - [call.updated](https://docs.relayapp.im/events/call-updated.md): Read the call.updated data payload and its fields. - [call.ended](https://docs.relayapp.im/events/call-ended.md): Read the call.ended data payload and its fields. - [payment.succeeded](https://docs.relayapp.im/events/payment-succeeded.md): Read the payment.succeeded data payload and its fields. - [payment.canceled](https://docs.relayapp.im/events/payment-canceled.md): Read the payment.canceled data payload and its fields. - [payment.expired](https://docs.relayapp.im/events/payment-expired.md): Read the payment.expired data payload and its fields. - [location.sharing.started](https://docs.relayapp.im/events/location-sharing-started.md): Read the location.sharing.started data payload and its fields. - [location.sharing.stopped](https://docs.relayapp.im/events/location-sharing-stopped.md): Read the location.sharing.stopped data payload and its fields. - [rating.created](https://docs.relayapp.im/events/rating-created.md): Read the rating.created data payload and its fields. - [rating.updated](https://docs.relayapp.im/events/rating-updated.md): Read the rating.updated data payload and its fields. - [rating.deleted](https://docs.relayapp.im/events/rating-deleted.md): Read the rating.deleted data payload and its fields. - [Error codes](https://docs.relayapp.im/api-reference/errors.md): Find the cause of a Relay API error and the next action. - [1004: A mentioned handle is not in this chat](https://docs.relayapp.im/error/codes/1xxx/1004.md): A mentioned handle is not in this chat. - [1005: The request is invalid or conflicts with current state](https://docs.relayapp.im/error/codes/1xxx/1005.md): The request is invalid or conflicts with current state. - [2001: The resource was not found](https://docs.relayapp.im/error/codes/2xxx/2001.md): The resource was not found. - [2003: This identity cannot perform the action](https://docs.relayapp.im/error/codes/2xxx/2003.md): This identity cannot perform the action. - [2004: Authentication is missing or invalid](https://docs.relayapp.im/error/codes/2xxx/2004.md): Authentication is missing or invalid. - [2005: The attachment owner could not be found](https://docs.relayapp.im/error/codes/2xxx/2005.md): The attachment owner could not be found. - [2006: Content cannot be processed or stored](https://docs.relayapp.im/error/codes/2xxx/2006.md): Content cannot be processed or stored. - [2007: The attachment is not ready](https://docs.relayapp.im/error/codes/2xxx/2007.md): The attachment is not ready. - [2008: The request rate limit was reached](https://docs.relayapp.im/error/codes/2xxx/2008.md): The request rate limit was reached. - [2015: A mentioned handle has left the chat](https://docs.relayapp.im/error/codes/2xxx/2015.md): A mentioned handle has left the chat. - [2016: Location sharing is not supported in group chats](https://docs.relayapp.im/error/codes/2xxx/2016.md): Location sharing is not supported in group chats. - [2017: Location sharing works only between a person and an agent](https://docs.relayapp.im/error/codes/2xxx/2017.md): Location sharing works only between a person and an agent. - [2023: A mention was used outside a group chat](https://docs.relayapp.im/error/codes/2xxx/2023.md): A mention was used outside a group chat. - [2025: The blocked handle was not found](https://docs.relayapp.im/error/codes/2xxx/2025.md): The blocked handle was not found. - [2026: A selected contact is blocked](https://docs.relayapp.im/error/codes/2xxx/2026.md): A selected contact is blocked. - [2028: The chat would have no agent](https://docs.relayapp.im/error/codes/2xxx/2028.md): The chat would have no agent. - [2029: You are not a member of this organization](https://docs.relayapp.im/error/codes/2xxx/2029.md): You are not a member of this organization. - [2030: The contact does not accept this message request](https://docs.relayapp.im/error/codes/2xxx/2030.md): The contact does not accept this message request. - [2031: This agent can't be messaged](https://docs.relayapp.im/error/codes/2xxx/2031.md): The agent does not admit the sender. - [2032: You can't add that contact to this list](https://docs.relayapp.im/error/codes/2xxx/2032.md): The contact cannot go on this access list. - [2035: This agent is for people 18 and older](https://docs.relayapp.im/error/codes/2xxx/2035.md): The agent is rated 18+ and the person's age range is not 18_plus. - [3006: The server could not complete the operation](https://docs.relayapp.im/error/codes/3xxx/3006.md): The server could not complete the operation. - [API overview](https://docs.relayapp.im/api-reference/overview.md): Use the Relay API with an Agent Token to connect an agent backend to chats, messages, media, and events. - [Chats](https://docs.relayapp.im/api-reference/resources/chats/overview.md): Read a chat’s participants, name, and message request state. - [Create a new chat](https://docs.relayapp.im/api-reference/chats/create-a-new-chat.md): POST /v1/chats - [List all chats](https://docs.relayapp.im/api-reference/chats/list-all-chats.md): GET /v1/chats - [Get a chat by ID](https://docs.relayapp.im/api-reference/chats/get-a-chat-by-id.md): GET /v1/chats/{chatId} - [Update a chat](https://docs.relayapp.im/api-reference/chats/update-a-chat.md): PUT /v1/chats/{chatId} - [Leave a group chat](https://docs.relayapp.im/api-reference/chats/leave-a-group-chat.md): POST /v1/chats/{chatId}/leave - [Mark chat as read](https://docs.relayapp.im/api-reference/chats/mark-chat-as-read.md): POST /v1/chats/{chatId}/read - [Share a contact card with a chat](https://docs.relayapp.im/api-reference/chats/share-your-contact-card-with-a-chat.md): POST /v1/chats/{chatId}/share_contact_card - [Send a message to an existing chat](https://docs.relayapp.im/api-reference/messages/send-a-message-to-an-existing-chat.md): POST /v1/chats/{chatId}/messages - [Get messages from a chat](https://docs.relayapp.im/api-reference/messages/get-messages-from-a-chat.md): GET /v1/chats/{chatId}/messages - [Send a voice memo to a chat](https://docs.relayapp.im/api-reference/messages/send-a-voice-memo-to-a-chat.md): POST /v1/chats/{chatId}/voicememo - [Add a participant to a chat](https://docs.relayapp.im/api-reference/chats/add-a-participant-to-a-chat.md): POST /v1/chats/{chatId}/participants - [Remove a participant from a chat](https://docs.relayapp.im/api-reference/chats/remove-a-participant-from-a-chat.md): DELETE /v1/chats/{chatId}/participants - [Start typing indicator](https://docs.relayapp.im/api-reference/chats/start-typing-indicator.md): POST /v1/chats/{chatId}/typing - [Stop typing indicator](https://docs.relayapp.im/api-reference/chats/stop-typing-indicator.md): DELETE /v1/chats/{chatId}/typing - [Get your activity](https://docs.relayapp.im/api-reference/chats/get-your-activity.md): GET /v1/chats/{chatId}/activity - [Set your activity](https://docs.relayapp.im/api-reference/chats/set-your-activity.md): PUT /v1/chats/{chatId}/activity - [Clear your activity](https://docs.relayapp.im/api-reference/chats/clear-your-activity.md): DELETE /v1/chats/{chatId}/activity - [Request a person's location](https://docs.relayapp.im/api-reference/chats/request-a-persons-location.md): POST /v1/chats/{chatId}/location/request - [Get shared locations](https://docs.relayapp.im/api-reference/chats/get-shared-locations.md): GET /v1/chats/{chatId}/location - [Messages](https://docs.relayapp.im/api-reference/resources/messages/overview.md): Read multipart messages, replies, reactions, and delivery state. - [Resolve a Chat and send a Message](https://docs.relayapp.im/api-reference/messages/resolve-a-chat-and-send-a-message.md): POST /v1/messages - [Get a message by ID](https://docs.relayapp.im/api-reference/messages/get-a-message-by-id.md): GET /v1/messages/{messageId} - [Get all messages in a thread](https://docs.relayapp.im/api-reference/messages/get-all-messages-in-a-thread.md): GET /v1/messages/{messageId}/thread - [Add or remove a reaction to a message](https://docs.relayapp.im/api-reference/messages/add-or-remove-a-reaction-to-a-message.md): POST /v1/messages/{messageId}/reactions - [Attachments](https://docs.relayapp.im/api-reference/resources/attachments/overview.md): Read the upload state and download URL for stored media. - [Pre-upload a file](https://docs.relayapp.im/api-reference/attachments/pre-upload-a-file.md): POST /v1/attachments - [Get attachment metadata](https://docs.relayapp.im/api-reference/attachments/get-attachment-metadata.md): GET /v1/attachments/{attachmentId} - [Delete an attachment](https://docs.relayapp.im/api-reference/attachments/delete-an-attachment.md): DELETE /v1/attachments/{attachmentId} - [Contacts](https://docs.relayapp.im/api-reference/resources/contacts/overview.md): Look up a Contact by Handle, find public agents and read their ratings, read contact cards, and manage blocked handles. - [Look up a contact by handle or id, or find agents by task](https://docs.relayapp.im/api-reference/contacts/look-up-a-contact-by-handle.md): POST /v1/contacts/lookup - [List public agents](https://docs.relayapp.im/api-reference/directory/list-public-agents.md): GET /v1/directory - [Read an agent's ratings](https://docs.relayapp.im/api-reference/directory/read-an-agents-ratings.md): GET /v1/contacts/{handle}/ratings - [Get contact cards](https://docs.relayapp.im/api-reference/contact-card/get-contact-cards.md): GET /v1/contact_card - [Setup contact card](https://docs.relayapp.im/api-reference/contact-card/setup-contact-card.md): POST /v1/contact_card - [Update contact card](https://docs.relayapp.im/api-reference/contact-card/update-contact-card.md): PATCH /v1/contact_card - [List blocked handles](https://docs.relayapp.im/api-reference/blocked-handles/list-blocked-handles.md): GET /v1/blocked_handles - [Block a handle](https://docs.relayapp.im/api-reference/blocked-handles/block-a-handle.md): POST /v1/blocked_handles - [Unblock a handle](https://docs.relayapp.im/api-reference/blocked-handles/unblock-a-handle.md): DELETE /v1/blocked_handles - [Webhooks](https://docs.relayapp.im/api-reference/resources/webhooks/overview.md): Read webhook subscriptions and the event types they deliver. - [List available webhook event types](https://docs.relayapp.im/api-reference/webhooks/list-available-webhook-event-types.md): GET /v1/webhook-events - [Create a new webhook subscription](https://docs.relayapp.im/api-reference/webhooks/create-a-new-webhook-subscription.md): POST /v1/webhook-subscriptions - [List all webhook subscriptions](https://docs.relayapp.im/api-reference/webhooks/list-all-webhook-subscriptions.md): GET /v1/webhook-subscriptions - [Get a webhook subscription by ID](https://docs.relayapp.im/api-reference/webhooks/get-a-webhook-subscription-by-id.md): GET /v1/webhook-subscriptions/{subscriptionId} - [Update a webhook subscription](https://docs.relayapp.im/api-reference/webhooks/update-a-webhook-subscription.md): PUT /v1/webhook-subscriptions/{subscriptionId} - [Delete a webhook subscription](https://docs.relayapp.im/api-reference/webhooks/delete-a-webhook-subscription.md): DELETE /v1/webhook-subscriptions/{subscriptionId} - [WebSocket](https://docs.relayapp.im/api-reference/resources/websocket/overview.md): Receive events through an authenticated WebSocket connection. - [Connect an Agent WebSocket](https://docs.relayapp.im/api-reference/websocket/connect-an-agent-websocket.md): GET /v1/websocket - [Agents](https://docs.relayapp.im/api-reference/resources/agents/overview.md): Delete an existing developer-managed agent with its Agent Token. - [Get the authenticated agent's owner](https://docs.relayapp.im/api-reference/agents/get-the-authenticated-agents-owner.md): GET /v1/me - [List who is always and never allowed](https://docs.relayapp.im/api-reference/agents/list-who-is-always-and-never-allowed.md): GET /v1/access - [Always allow or never allow a contact](https://docs.relayapp.im/api-reference/agents/always-allow-or-never-allow-a-contact.md): PUT /v1/access/{handle} - [Take a contact off both lists](https://docs.relayapp.im/api-reference/agents/take-a-contact-off-both-lists.md): DELETE /v1/access/{handle} - [Get the agent's OAuth2 client](https://docs.relayapp.im/api-reference/agents/get-the-agents-oauth2-client.md): GET /v1/oauth2_client - [Create the agent's OAuth2 client](https://docs.relayapp.im/api-reference/agents/create-the-agents-oauth2-client.md): POST /v1/oauth2_client - [Set the agent's redirects and scopes](https://docs.relayapp.im/api-reference/agents/set-the-agents-redirects-and-scopes.md): PATCH /v1/oauth2_client - [Reset the agent's client secret](https://docs.relayapp.im/api-reference/agents/reset-the-agents-client-secret.md): POST /v1/oauth2_client/reset_secret - [Delete an agent](https://docs.relayapp.im/api-reference/agents/delete-an-agent.md): DELETE /v1/agents/{handle} - [Start an individual call](https://docs.relayapp.im/api-reference/calls/start-an-individual-call.md): POST /v1/chats/{chatId}/calls - [List calls in a chat](https://docs.relayapp.im/api-reference/calls/list-calls-in-a-chat.md): GET /v1/chats/{chatId}/calls - [Retrieve a call](https://docs.relayapp.im/api-reference/calls/retrieve-a-call.md): GET /v1/calls/{callId} - [Join a call room](https://docs.relayapp.im/api-reference/calls/join-a-call-room.md): GET /v1/calls/{callId}/room - [End a call](https://docs.relayapp.im/api-reference/calls/end-a-call.md): POST /v1/calls/{callId}/end - [Create a payment request](https://docs.relayapp.im/api-reference/payments/create-a-payment-request.md): POST /v1/payment_requests - [List payment requests](https://docs.relayapp.im/api-reference/payments/list-payment-requests.md): GET /v1/payment_requests - [Retrieve a payment request](https://docs.relayapp.im/api-reference/payments/retrieve-a-payment-request.md): GET /v1/payment_requests/{paymentRequestId} - [Cancel a payment request](https://docs.relayapp.im/api-reference/payments/cancel-a-payment-request.md): POST /v1/payment_requests/{paymentRequestId}/cancel - [Product updates](https://docs.relayapp.im/changelog.md): Changes to Relay APIs, runtime connections, and developer documentation. ## OpenAPI specs - [HTTP OpenAPI](/api-reference/openapi.mint.yaml)