Skip to main content
Routa has a single endpoint for every environment:
The environment does not change the URL. It is defined by the project the API key belongs to, and the key prefix tells you which one it is. To switch environments, switch the key. Do not change the URL.

What changes in a test project

A test project runs exactly the same code paths as a live project: same validation, same message lifecycle, same events, same errors. The differences are in:
  • What it can connect. A test project only connects sandbox credentials from the provider.
  • Billing. Messages from test projects are neither counted nor blocked by your plan allowance.
  • Local webhooks. http:// endpoints on localhost are accepted only in test projects. In a live project, the URL must be HTTPS and cannot point to private or loopback addresses.
Never use an rt_live_ key in automated tests. A message sent by a live project reaches the real recipient and counts against your allowance.

How to tell which environment you are in

The key prefix shows the environment. To confirm the project, call GET /v1/whoami:

Pointing to another host

To point the SDK at another instance, such as a local or staging installation, set baseURL: