> For the complete documentation index, see [llms.txt](https://documentation.immuta.com/saas/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.immuta.com/saas/developer-guides/api-intro/agentic-access-api.md).

# Agentic Access V1 API

Vend ephemeral roles for your agents to access data on-behalf-of of a user.

{% hint style="info" %}
**Public preview**: This feature is available to all accounts that request to enable it for their tenant. Contact your Immuta representative to enable it.
{% endhint %}

Rather than connecting as a static service account, the agent harness first calls the Immuta agentic access V1 API to obtain an ephemeral role scoped to the end user's entitlements, and this [role is then assumed by the agent when querying the data platform](#user-content-fn-1)[^1]. This process ensures every query executed against the data platform is scoped to exactly what the end user is permitted to access.

## Base path and global segment

In order to use the agentic access 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.

* **Asia Pacific**: <https://ap.api.immutacloud.com/agents>
* **European Union**: <https://eu.api.immutacloud.com/agents>
* **North America**: <https://na.api.immutacloud.com/agents>

{% hint style="warning" %}
Your agentic access 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

See instructions for generating your agent's personal access token (PAT) on the [Manage agents page](/saas/agentic-data-access/manage-agents.md#personal-access-token).

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

```
curl -L \
  --url 'https://{globalSegment}.api.immutacloud.com/agents/roles' \
  --header 'Authorization: Bearer <agent-PAT>'
```

If using "Test it" in the [Agent API documentation](/saas/developer-guides/api-intro/agentic-access-api/agent.md), include the agent PAT 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>

## Download the agentic access OpenAPI YAML

Download the agentic access OpenAPI spec (provided in the left navigation) to import it into Postman or use a client generator tool to parse the OpenAPI definition to automatically produce client-side code.

[^1]: This part of the process differs slightly between Snowflake and Databricks. See the [Connecting the agent to the data platform page](/saas/agentic-data-access/manage-agents/connecting-the-agent-to-the-data-platform.md) for details.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.immuta.com/saas/developer-guides/api-intro/agentic-access-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
