Guide: Publish a message
Goal
Publish a message that consumers can process later.
Prerequisites
- Completed Getting Started
- API key with
messages:write
Steps
1) Choose a message type and payload
Keep payloads small and explicit; prefer stable schemas.
Example:
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
200and amsg_...ID. - A consumer can fetch the message via polling.
Next steps
- Make retries safe: Idempotent publishing
- See the full schema: REST API reference
Next: Getting Started · Reference · Changelog · Support