Skip to content

Quickstart

This guide walks you through sending your first email with the RelayPost REST API.

  • A RelayPost account — sign up free
  • A domain you control (for production sending)

After signing up, you’ll be prompted to create an organization. This is your workspace — all API keys, domains, and emails are scoped to it.

Go to Settings → API Keys and create a new key. Copy it immediately — it’s only shown once.

Your key looks like: rp_live_aBcDeFgHiJkLmNoPqRsT...

Terminal window
curl -X POST https://relaypost.dev/api/v1/emails/send \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"from": { "email": "[email protected]", "name": "Your App" },
"to": [{ "email": "[email protected]" }],
"subject": "Hello from RelayPost",
"html": "<h1>It works!</h1><p>Your email delivery is set up.</p>"
}'

A successful send returns:

{
"data": {
"message_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "queued",
"queued_at": "2025-01-15T10:30:00.000Z"
}
}