Live vs Test
sk_proj_*andsk_live_*work identically — both are live mode and are valid indefinitely.
Detailed Test Mode behavior
sk_test_* keys let you develop and iterate without polluting your production metrics:
- Real sends: the email reaches the inbox just like in live. This is deliberate, so you can test deliverability, visual rendering, and email client behavior.
- Consumes monthly quota: the send is real, so it counts against the plan’s monthly limit just like a live send.
- Activity with
is_test=true: every send is recorded in Activity with theis_test: trueflag. The dashboard filters out these records when the Live/Test toggle is in Live mode. - Separate webhooks: outbound events (
email.delivery,email.bounce,email.open,email.click) and inbound replies are routed to the*_devURLs. If the_devURL isn’t configured, the event isn’t delivered — there is no fallback to the livewebhook_url. - Dashboard toggle: the sidebar has a global Live/Test switch that filters Activity, Campaigns, and metrics according to the mode.
Where to find your Secret Keys
- Log in to the RQE dashboard.
- Navigate to the project where you want to get the credentials.
- In the side menu, open Integrations → API Keys.
- There you’ll find:
- Production (Live) —
sk_live_*orsk_proj_*. - Test —
sk_test_*. Can be generated/regenerated independently of the live key.
- Production (Live) —
Usage
Pass the key as a Bearer token in theAuthorization header:
Important: every API endpoint accepts both live and test keys. RQE determines the send’s mode solely by the key prefix — there is no mode parameter or special headers to force a different mode.
Invalid prefix errors
If you pass a key with an unknown prefix (e.g.sk_dev_), you receive 401 Unauthorized:
Idempotency
ThePOST /send-email (advanced API) and POST /v1/send-batch endpoints support optional idempotency via the Idempotency-Key header:
- The key is an arbitrary string of 1 to 256 characters.
- The first request’s response is cached for 24 hours, scoped to
(project_id, idempotency_key). - If another request arrives with the same key within the window, RQE returns the cached response from the first request, with the
Idempotency-Replayed: trueheader. 5xxresponses are not cached — you can retry with the same key.- Useful for network retries with no risk of double sending. Works identically in live and test.
POST /v1/send-emailandPOST /v1/send-template-emaildo not supportIdempotency-Key. If you need idempotency on individual sends, use the advanced API.
Dry Run
To validate the payload and variables without sending the email, usePOST /send-email (advanced API, recipient/sender/html fields) with dry_run: true in the body:
dry_run is not available on /v1/send-email. See dry run details.
Security
- Never expose your Secret Keys in client code (frontend, mobile apps, public repos). Use them only from the backend.
- Environment variables — store in
.env, never hardcoded:
- Rotate your keys periodically. If you suspect one has been compromised, regenerate it from the dashboard. The previous key is invalidated instantly.
- Add
.envto your.gitignoreso you don’t push credentials to the repository. - Keep live and test isolated across environments. Using the
sk_live_*key in staging pollutes metrics and consumes quota.