Skip to content

Guide: Publish a message

Goal

Publish a message that consumers can process later.

Prerequisites

Steps

1) Choose a message type and payload

Keep payloads small and explicit; prefer stable schemas.

Example:

{"type":"email.send","data":{"to":"user@example.com","template":"welcome"}}

2) Publish with an idempotency key

curl -sS -X POST "$IRON_BASE_URL/v1/messages" \
  -H "Authorization: Bearer $IRON_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: email-send-user-123" \
  -d '{"type":"email.send","data":{"to":"user@example.com","template":"welcome"}}'

Validation

  • You receive a 200 and a msg_... ID.
  • A consumer can fetch the message via polling.

Next steps


Next: Getting Started · Reference · Changelog · Support