> This page is for Tools.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.moveworks.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.moveworks.com/_mcp/server.

# Connect Tool Studio to PurpleSuite

> Create a PurpleSuite instance, copy its instance ID and API token, and set up the Tool Studio connector used by every quickstart.

To build Tool Studio plugins on PurpleSuite's mock enterprise APIs, create a PurpleSuite instance and a Tool Studio connector that authenticates to it. Every Quickstart Guide and the plugin-building masterclass use this setup, and one instance and connector work for all of them.

## Before you begin

* You need access to Tool Studio to create a connector.
* PurpleSuite instances expire 7 days after you create them, and expired instances are deleted with all their data. You can extend an instance before it expires. See [When do PurpleSuite instances expire?](/tool-studio/purplesuite/how-purplesuite-works#when-do-purplesuite-instances-expire)

## Create a PurpleSuite instance

1. Open [PurpleSuite](https://marketplace.moveworks.com/purple-suite) and select **New Instance**.
2. In **Create instance**, enter an **Instance name**, such as your name or team.
3. Leave **Include sample data (recommended for demos)** selected. This adds sample records to the apps, which the quickstarts use.
4. Select **Create**.

![The Create instance dialog in PurpleSuite with three numbered callouts: 1, the Instance name field; 2, the Include sample data (recommended for demos) checkbox, selected; 3, the Create button.](/_fern-files/_img/9bd9cc8c12636cebbfb0e4659b87cbe897d21443f318069d387fe2738e596183.webp)

## Copy the instance credentials

1. On your instance's card, open the **⋮** menu and select **Credentials**.

   ![The menu on a PurpleSuite instance card, open, with Credentials highlighted. Other items are Open settings, Webhooks, MCP tools, A2A agents, Data, Share, Copy MCP URL and Delete.](/_fern-files/_img/8705fc774f1d8f69cff8b70818eeb0aa8329d75c7774915498d6b92971b89045.webp)

2. Copy these two values:

   * **Instance ID**: a UUID such as `6e30fcb1-8752-4a34-a4fb-959a5be215e1`.
   * **API Token (PAT)**: a key that starts with `ps_`.

   The page also shows the **MCP Server URL**, which you need only to connect an MCP client. See [How the PurpleSuite MCP server works](/tool-studio/purplesuite/how-purplesuite-works#how-the-purplesuite-mcp-server-works).

   ![PurpleSuite Instance Settings with Credentials selected and three numbered callouts: 1, Instance ID; 2, API Token (PAT), masked; 3, MCP Server URL. Each value has a copy button. The instance ID is blurred in this image.](/_fern-files/_img/8ef78cc5c9644fb2821a1261ae9f370f59e51b172b4cd0ad8db7783aecc0d540.webp)

Treat the instance ID, the API token and the MCP server URL as secrets. Anyone with the instance ID and API token can read and change your instance's data, and an MCP client with the MCP server URL can connect to it.

## Create the connector in Tool Studio

1. In **Tool Studio**, go to **Connectors** and select **Create**.

2. Enter these values:

   | Field                         | Value                                 |
   | :---------------------------- | :------------------------------------ |
   | **Connection Name**           | `firstname_lastname_moveworks_purple` |
   | **Description**               | `Moveworks Purple APIs Connector`     |
   | **Base Url**                  | `https://marketplace.moveworks.com`   |
   | **Auth Config**               | **API Key**                           |
   | **Auth Type**                 | **Header Auth**                       |
   | **API Key**                   | Your API token (starts with `ps_`)    |
   | **Header Auth Key**           | `Authorization`                       |
   | **Header Auth Value Pattern** | `Bearer %s`                           |

3. Under **Common headers (Optional)**, add a header for your instance ID. Common headers are sent on every request the connector makes. Use **Credential** so the instance ID is stored as a secret:

   | Field                  | Value            |
   | :--------------------- | :--------------- |
   | **Value Type**         | **Credential**   |
   | **Credential Pattern** | `%s`             |
   | **Credential Secret**  | Your instance ID |
   | **Key**                | `X-Instance-ID`  |

   ![The Common headers (Optional) section of a Tool Studio connector, described as applied to every request made by this connector. Header 1 has Value Type set to Credential, Credential Pattern %s, an empty Credential Secret field, and Key X-Instance-ID.](/_fern-files/_img/fc774f687554b24c47d4e6af11120441e81781abab58051a11a8209dabec6036.webp)

4. Select **Save**.

The connector now sends both `Authorization: Bearer <YOUR_PAT>` and `X-Instance-ID` on every request, so the HTTP actions that use it don't need either header. If either header is missing, PurpleSuite returns `401`. For more on API key connectors, see [API key authentication](/tool-studio/connectors/http-connectors/api-key-auth).

Some quickstarts and the plugin-building masterclass add `X-Instance-ID` to each action instead. That works too. With the common header on the connector, you can skip that step.

## Confirm it works

Test the connector with an HTTP action that reads CRM accounts. The action gets both headers from the connector, so the request you import has none.

1. In **Tool Studio**, create a new HTTP action.

2. Select the **Import** icon next to **TEST**, paste this request, and select **Import**.

   ```shell
   curl -X GET "https://marketplace.moveworks.com/api/purple-suite/crm/accounts?limit=5"
   ```

3. On the **Connector** tab, select **Inherit from existing connector**, then choose the connector you created, such as `firstname_lastname_moveworks_purple`.

4. Select **TEST**. A working setup returns a JSON response with CRM account data in a `data` list.

Leave the API token and instance ID out of requests you import into PurpleSuite actions. The connector supplies both, so when you move to a new instance you update them in one place.

## Troubleshoot the connection

* **`401` response:** check that the connector's API key is your current API token and that its `X-Instance-ID` common header has your current instance ID. A `401` with the message "Instance token has expired" means the instance has expired.
* **`404` response:** the instance ID doesn't match an instance, often because an expired instance has been deleted.
* **`429` response:** too many requests used a wrong API token, and the instance is locked for 15 minutes. Fix the token, then try again after the lockout.

After an instance expires, create a new one, then update the API key and the `X-Instance-ID` common header in the connector.

## Next steps

* [Build your first plugin](/tool-studio/quickstart-guide/quickstart-build-your-first-plugin): build a plugin that retrieves PTO balance data.
* [PurpleSuite apps and API references](/tool-studio/purplesuite/purplesuite-apps): find the app and endpoints your plugin needs.
* [How PurpleSuite works](/tool-studio/purplesuite/how-purplesuite-works): credentials, expiry, shared users, MCP and paints.