Skip to Content
GuidesMessages

Messages

Greenlight stores MESSAGE channel chat history in Postgres for operator audit. This is separate from prompts (approval cards with buttons and signed answer callbacks).

Deliver outbound chat with POST /v1/messages/send — the /send verb is for MESSAGE channel text only. Create channels with POST /v1/channels/new and prompts with POST /v1/prompts/new.

What is stored

DirectionWhenFields of note
inboundA human sends text on a MESSAGE channelfrom_user, text, channel_id
outboundPOST /v1/messages/send or Admin UI send succeedsapi_key_id, text

Inbound rows are created even if forwarding to the channel callback_url fails, unless do not store inbound is enabled in Settings. Outbound rows are created only after the platform accepts the send, unless do not store outbound is enabled.

Persistence does not replace your agent webhook — inbound chat still forwards as unsigned message.created events. See Callbacks.

Send outbound

Agent API

POST /v1/messages/send
{ "channel_id": "ops-slack", "text": "Thanks — deploying now." }

Response includes message_id when the message was stored (omitted when outbound zero retention is enabled).

Admin UI

  1. Messages → Send message
  2. Pick a MESSAGE channel
  3. Enter text and submit

You can also send from a channel detail page (Send message).

Review history

Messages in the Admin UI lists inbound and outbound rows with filters for direction (All / Inbound / Outbound). Click a row for full detail.

Use GET /v1/messages and GET /v1/messages/{id} — see API reference.

Agent API: GET /v1/messages, GET /v1/messages/{id}, and POST /v1/messages/send — see Agent API.

Data retention

Operators configure retention under Settings → Data retention in two layers:

Scheduled deletion

Hard-delete stored rows older than N days (runs every minute):

TargetDefault
PromptsOff, 30 days when enabled
Inbound messagesOn, 30 days when enabled
Outbound messagesOn, 30 days when enabled

Zero retention (do not store)

When enabled, messages of that direction are never written to history (chat and callbacks still work):

TargetDefault
InboundOff
OutboundOff

POST /v1/messages/send omits message_id in the response when outbound storage is disabled.

This is independent of per-prompt ttl_sec (soft EXPIRED state).

vs prompts

Messages (MESSAGE)Prompts (PROMPT)
Outbound verbsendnew
Outbound APIPOST /v1/messages/sendPOST /v1/prompts/new
Interactive optionsNoYes
Answer callbackN/A (use channel webhook)Per-prompt, signed
Admin list/messages/prompts