# Test and live

**At the end of this page you know what Test mode allows, how to apply for Live access and exactly what to change when you switch.** Switching to Live uses the same code—you swap only your client ID, secrets and URLs.

## Test and Live at a glance

| | Test | Live |
| --- | --- | --- |
| Available | At once, when you create an app | After hlix approves the app |
| Client ID prefix | `hlix_test_` | `hlix_live_` |
| Connected agents | Up to 5 in total, across all users | No limit |
| Requests | 100 per day (resets 00:00 UTC) | No limit |
| Return and event URLs | `https`, plus `http://localhost` and `http://127.0.0.1` | `https` only; event URL must be public |
| Connect screen badge | **Test mode** | **Approved partner** |
| Listing in hlix | None | A card in Connectors |
| Connections and requests | Separate from Live; a Test token cannot read a Live request (`404`) | Separate from Test; a Live token cannot read a Test request (`404`) |

## Build in Test

- Test mode is active and free the moment you create an app.
- Any hlix user can connect agents in Test mode—you do not need to invite them to your partner workspace.
- Once 5 agents are connected across all users, the next person sees `test_mode_agent_limit` (`409`) and nothing is connected until an agent is disconnected or the app moves to Live.
- A Test access token stays valid as long as the person who granted it remains an owner or admin of that agent's Workspace, just like in Live mode.

## Apply for live access

Live access is reviewed once per app. Open **Live access** in the [partner portal](https://partner.hlix.ai) (or select **Apply for live access** on the app page) and submit the form:

**Screenshot:** The Your live setup form: Company name, Website, What will your users do with hlix, Live return URL and Live event URL, followed by a Ready to send checklist with three items done.

| Screen label | API field | Rule |
| --- | --- | --- |
| **Company name** | `company` | Up to 120 characters. |
| **Website** | `website` | An `https` address, up to 300 characters. |
| **What will your users do with hlix?** | `purpose` | Up to 1,000 characters. |
| **Live return URL** | `returnUrls` | An `https` address with no `#` fragment or credentials (up to 10 URLs via API or on the app page after approval). |
| **Live event URL** | `eventUrl` | A public `https` address. |

The portal shows the review status for each app: **In review**, **Approved** or **Not approved** (with a note from hlix when present). You can edit and resubmit after a rejection; submitting again while **In review** or **Approved** returns `409`.

**Screenshot:** The Apply for live access page after the form is sent. The status reads In review, a Test and Live comparison shows what changes, and a Sent for review panel says hlix is reviewing this app.

## Switch to Live

Approval unlocks the **Live** mode tab on your app page with a new `hlix_live_` client ID. The portal does not display the initial Live secrets automatically, so generate both before updating your production config:

1. Open the app in the [partner portal](https://partner.hlix.ai) and switch the mode selector from **Test** to **Live**. Copy the **Client ID** (`hlix_live_...`).
2. Select **Make a new one** beside **Client secret**, confirm and copy the new `hsk_` secret into your production secret manager.

**Screenshot:** The question hlix asks before it makes a new client secret: the old secret stops working at once. Buttons: Cancel and Make a new one.

3. Select **Make a new one** beside **Event secret**, confirm and copy the new `hes_` secret into your production secret manager.
4. Set your production environment variables to the Live `PARTNER_CLIENT_ID`, `PARTNER_CLIENT_SECRET`, `PARTNER_EVENT_SECRET` and `PARTNER_RETURN_URL`.
5. On the app page (Live mode), select **Send a test event** and confirm your production event endpoint returns `200 OK`.
6. Run Connect with hlix in production using the `hlix_live_` client ID and confirm the connect screen shows the **Approved partner** badge.

**Shown once:** Each new Live secret appears only once when you select **Make a new one**. Copy it into your secret manager before closing the dialog.

**Test keys keep working:** Approving Live mode does not disable Test mode. Keep your Test keys for staging and local development so test data never touches production connections.

## Go-live checklist

Verify every item before switching your production app to Live mode:

- [ ] Live client secret (`hsk_...`) and Live event secret (`hes_...`) live in your secret manager, never in source code or browser bundles.
- [ ] Your production Live event URL returns `2xx` to **Send a test event** (`test.ping`) within 10 seconds with no redirect.
- [ ] Your event handler verifies `hlix-signature` over the raw request body bytes, compares in constant time and rejects timestamps off by more than 5 minutes or non-numeric timestamps.
- [ ] Your event handler records processed `hlix-event-id` values in your database and returns `200` on duplicates.
- [ ] Sending the same `requestKey`, `connectionId` and `brief` twice creates one request (`201`, then `200`).
- [ ] Your production connect route sends the `hlix_live_` client ID and an exact registered Live return URL.
- [ ] Your UI shows the agent owner (your seller or freelancer who owns hlix agents) **To manage your agents, go to your hlix account** linked to `manageUrl`.
- [ ] Your backend handles `agent.disconnected` events (hiding the agent) and handles `404 Unknown connection.` and `409 agent_unavailable` on send.
- [ ] Your token refresh flow persists the new `refresh_token` returned on every refresh.
- [ ] You run a reconciliation job that checks open requests if your event endpoint is down for more than 24 hours.

## Next steps

[Errors and troubleshooting](/partners/errors/)
  [Partner API](/api/reference/partner/)