# Request App API

## Base path and global segment

In order to use the Request app API, you need to use the correct global segment. The following are the regional API base paths. Choose the global segment for the region you are in.

* [https://na.api.immutacloud.com/marketplace](https://na.api.immutacloud.com/marketplace/) - North America
* [https://eu.api.immutacloud.com/marketplace](https://eu.api.immutacloud.com/marketplace/) - European Union
* [https://ap.api.immutacloud.com/marketplace](https://ap.api.immutacloud.com/marketplace/) - Asia Pacific

If using **Test it** in the Request app API documentation, click `https://{global-segment}.api.immutacloud.com/marketplace` in the endpoint and select your global segment from the dropdown. Once you plug in your PAT, the endpoint will run and complete the actions within your Request app.

{% hint style="danger" %}
Your Request app data only exists in the same global segment as your Govern app. If you use the wrong global segment in your API call, you will receive the following response:

```json
{
  "message": "Not authenticated.",
  "error": "Unauthorized",
  "statusCode": 401
}
```

{% endhint %}

## Authentication

Immuta uses JWTs to match users with their tenants. The JWTs contain this metadata in the claims, which is required for the request context in the Request app API.

### Generate a personal access token (PAT)

In the Request app,

1. Navigate to the [**Personal Access Tokens** page](https://app.nonprod.immutacloud.com/marketplace/personal-access-tokens).
2. Click **Generate new token**.
3. Enter a **description** and set an **expiration**. You may select **No expiration** from the dropdown.
4. Click **Generate new token**.
5. The new PAT will be displayed. Store this token somewhere secure; it is only presented once and cannot be retrieved again later.

### Authenticate with your PAT

To use your generated PAT, insert it as the Bearer token for your API calls:

```
curl -L \
  --url '{correct base path from above}/api/access-agreement' \
  --header 'Authorization: Bearer <your-PAT>'
```

Or, if using "Test it" in the Request app API documentation, include it in the bearer token in the authentication section:

<figure><img src="https://1751699907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlWBda5Pt4s8apEhzXGl7%2Fuploads%2Fgit-blob-f11979b9fd972dc73853c39139fee8dcd1f3096c%2FScreenshot%202025-02-19%20at%2011.38.58%E2%80%AFAM.png?alt=media" alt="" width="342"><figcaption><p>Authentication for testing</p></figcaption></figure>

### Delete a PAT

In the Request app,

1. Navigate to the [**Personal Access Tokens** page](https://app.nonprod.immutacloud.com/marketplace/personal-access-tokens).
2. Select the **more actions** icon for the PAT you want to delete.
3. Select **Delete token** and click **Delete** in the modal.

## Download the Request app OpenAPI YAML

Download the Request app OpenAPI spec to import it into Postman or use a client generator tool to parse the OpenAPI definition to automatically produce client-side code.
