Quickstart
Send your first email from code in a few minutes, without setting up a domain.
1. Get a test key
In Relevate, open the workspace menu and choose Advanced → Email test mode.
Then go to Workspace settings → API keys and make a key with Send service email. It
starts with rlvt_test_: email sent with it is simulated, never delivered.
export RELEVATE_API_KEY=rlvt_test_...
export RELEVATE_API_URL=https://api.relevate.app2. Send an email
curl "$RELEVATE_API_URL/email/emails" \
-H "Authorization: Bearer $RELEVATE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: quickstart-1" \
-d '{
"from": "Acme <hello@acme.test>",
"to": "you@example.com",
"subject": "Hello from Relevate",
"html": "<p>It works.</p>"
}'The answer is the email, with an id and a state for each recipient.
3. Check what happened
curl "$RELEVATE_API_URL/email/emails/<id>/events" \
-H "Authorization: Bearer $RELEVATE_API_KEY"In test mode the email is "delivered" within moments. Send to
bounced@test.relevate.app to see a bounce.
4. Go live
- Set up your domain.
- Leave test mode and make a live key (
rlvt_live_). - Send from an address on your verified domain.
Next: Sending, Templates from code, Webhooks.