environment field in the send body. Useful when the same Live key is used from multiple environments (same billing) and each one needs to receive its own webhooks.
Difference from Live/Test
The two coexist:
sk_test_* for local QA and custom environments for the customer’s intermediate environments.
Configuration
1
Define the environments
Dashboard → your project → Settings → Integrations → Webhook Environments. You add The keys (
name + URL pairs:staging, qa, preview-pr-42) are arbitrary, with no reserved names. Constraint: [a-zA-Z0-9_.-] up to 64 chars.2
Send the request with `environment`
- curl
- JavaScript
- Python
3
Receive the webhook with echo
The payload that reaches the Same model for inbound replies — the
staging endpoint includes an environment echo. You don’t need to parse URLs to tell them apart:email.inbound payload also includes environment.Behavior
Exclusive override, not additiveWith
environment configured, the webhook goes only to that URL. If the environment doesn’t exist in webhook_environments, RQE responds with 400 ENVIRONMENT_NOT_CONFIGURED — no silent fallback to the default webhook_url. Configuration errors are visible from the very first send.Idempotency with environment
Idempotency-Key works by (projectId, key) and does not include environment in the scope. If you retry with a different environment and the same Idempotency-Key within 24h, you get the cached result of the first request, with the original environment. To distinguish sends by environment, use a different Idempotency-Key.
When to use it
Good fit:- Same customer app with several environments (prod, staging, qa) that share billing and metrics but want separate callbacks.
- Preview deployments with ephemeral URLs (
preview-pr-N). - Multi-tenant SaaS that wants to identify traffic by sub-customer without separating RQE projects.
- Separating dev/prod metrics and activity — use Test mode (
sk_test_*). - Isolating the suppression list — suppression is per project, shared across all environments.
- Fully replicating a multi-customer setup — for that, create separate RQE projects.
Next steps
- Webhooks (reference) — full payload format, HMAC verification, retry logic.
- Test mode — differences with
sk_test_*. - Send email — full request body.