Relay docs
API ReferenceConversations

Add a message to a conversation

Appends a message to a conversation. The message is delivered live to connected dashboard agents through the same realtime fan-out as the rest of the product. Requires the `conversations:write` scope.

POST
/v1/public/conversations/{id}/messages

Authorization

bearerAuth
AuthorizationBearer <token>

Workspace API key, e.g. rl_live_….

In: header

Path Parameters

id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

content*string

Message body.

role?string

outgoing posts as an agent/bot reply; incoming posts on behalf of the contact (e.g. to backfill a conversation).

Default"outgoing"

Value in

  • "outgoing"
  • "incoming"
agentUserId?string

For outgoing messages, the workspace member to attribute the message to. When omitted the message is attributed to an automated agent.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/public/conversations/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages" \  -H "Content-Type: application/json" \  -d '{    "content": "string"  }'
{  "id": "7f3e9a10-5b6c-4d7e-8f90-a1b2c3d4e5f6",  "content": "Hi! How can I help today?",  "contentType": "text",  "senderType": "user",  "senderId": "user_2x9Q",  "messageType": "outgoing",  "status": "sent",  "isPrivate": false,  "sender": {    "name": "Grace Hopper",    "image": "https://cdn.relay.app/u/grace.png"  },  "attachments": [],  "createdAt": "2026-06-25T10:12:00.000Z"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}