# Connect a custom platform If your store runs on a platform you built, REVER calls an API that your developers implement for REVER. To connect it, you need: - **API URL**: the address your API is served at, without a slash at the end, for example `https://api.example.com`. - **API key**: the key your API expects from REVER. ## Prerequisites - Your developers have implemented [v2](https://github.com/itsrever/custom-integration-docs/blob/main/docs/v2/README.md) of REVER's custom integration API. See [Custom platforms](/guides/custom). - Your API is served over HTTPS. - A REVER dashboard user with write access to your group. If your API is on v1, you don't connect it from the dashboard yet: REVER keeps setting it up with you as today. ## Step 1: Find your API base URL Enter the URL with `https://`. REVER calls your API at paths under `/rever/v2`, for example `https://api.example.com/rever/v2/orders/{order_id}`. Your API URL is the part before `/rever/v2`: in this example, `https://api.example.com`. Don't end the URL in `/rever`. REVER adds `/rever/v2`, so `https://api.example.com/rever` would make REVER call `https://api.example.com/rever/rever/v2/...`. ## Step 2: Get your API key REVER sends this key in every call, in the `X-rever-api-key` header. Your API rejects calls without it, or with a different key, with `401 Unauthorized`. Your developers set this key in your API, so ask them for it. It is not a REVER API key that you use to call REVER's APIs: this one lets REVER call yours. ## Step 3: Connect it in REVER 1. In the REVER dashboard, pick your group in the selector, not one of its portals. 2. Open **Integrations**. On **eCommerce platform**, click **Manage**. 3. Click **Connect a platform** and choose **Custom integration**. 4. In the form that opens, enter your **API URL** and **API key**, then submit it. Your API now appears as a card in the list. It belongs to your group, so every portal of the group can use it. ## Step 4: Use it in your portals Each portal keeps using its current connection until you switch it. 1. Pick the portal in the selector. 2. Open **Integrations** and, on **eCommerce platform**, click **Manage**. 3. On your API's card, click **Use in this portal** and confirm. The card now shows **Used by this portal**. Repeat for each portal of the store. If the portal uses another API URL, the dashboard asks you to switch the portal to the connection's URL. Switch it only if it is the same API on a new domain. Otherwise, check the URL from Step 1 and connect again. ## Troubleshooting | What you see | What to do | | --- | --- | | Your API rejects REVER's calls with `401 Unauthorized` | Check the key with your developers, and that your API reads it from the `X-rever-api-key` header. | | Your API answers `404 Not Found` to every call | Check the API URL. It must not include a call's path or end in `/rever`. | | *This one wasn't added* after you connect | Your group already has a connection for this API. To change its key, click **Reconnect** on it. | | Your API starts rejecting the key, for example because it was rotated | Click **Reconnect** on the connection and enter the current key. |