> 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/agentic-access-v1.md).

# Agentic Access V1

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

{% hint style="info" %}
**Private preview**: This feature is available to select accounts. Contact your Immuta representative for details.
{% endhint %}

## 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/agentic-access-v1/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 to import it into Postman or use a client generator tool to parse the OpenAPI definition to automatically produce client-side code.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
