---
title: "Environments and base URLs"
---

SaaSify runs separate production and demo environments. Build and test against demo, then point your code at production.

## Base URLs

| Environment | API base URL | Frontend | Use it for |
|---|---|---|---|
| Demo | `https://api-demo.saasify.ai` | `https://demo-z.saasify.ai` | Building and testing your integration. |
| Production | `https://api.saasify.ai` | `https://app.saasify.ai` | Live traffic against your real tenant. |

Every request goes to the same host for all operations — there is no separate `/public` or partner host. Pick the base URL for your environment and prepend it to the paths in the [API reference](/developers/api-reference) (for example, `https://api-demo.saasify.ai/api/subscriptions/list`).

:::tip[Test against demo]
Get a token from the demo environment, run your calls against `https://api-demo.saasify.ai`, and confirm the behavior before you switch the base URL to production. Credentials and data are not shared between environments, so you need a separate SaaSify user in each.
:::

:::note[A second production host]
Some tenants are served from a second production instance at `https://api-portal.saasify.ai` instead of `https://api.saasify.ai`. Use whichever host your tenant was provisioned on.
:::


## Choosing an environment in code

Keep the base URL in configuration rather than hard-coding it, so the same build runs against demo and production:

:::code-group
```bash title="cURL"
# Demo
BASE_URL="https://api-demo.saasify.ai"
# Production
# BASE_URL="https://api.saasify.ai"

curl "$BASE_URL/api/subscriptions/list" -H "Authorization: Bearer $TOKEN"
```
```python title="Python"
import os

BASE_URL = os.environ.get("SAASIFY_BASE_URL", "https://api-demo.saasify.ai")
```
```javascript title="Node"
const BASE_URL = process.env.SAASIFY_BASE_URL ?? "https://api-demo.saasify.ai";
```
```csharp title="C#"
var baseUrl = Environment.GetEnvironmentVariable("SAASIFY_BASE_URL")
              ?? "https://api-demo.saasify.ai";
var client = new HttpClient { BaseAddress = new Uri(baseUrl) };
```
:::

## Related

::::cards
:::card[Authentication]{href="/developers/authentication"}
Get a token for your environment.
:::
:::card[Quickstart]{href="/developers/quickstart"}
Make your first call.
:::
::::
