> ## Documentation Index
> Fetch the complete documentation index at: https://docs.startree.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# RBAC Manager API

> Reference for the StarTree RBAC Manager API: policies, roles, role assignments, service tokens, and access simulation.

The RBAC Manager API is the programmatic way to do everything the Security Manager UI does: define policies, group them into roles, assign roles to users, groups, domains, and service tokens, and check what a subject is allowed to do.

The base URL is `https://rbac-manager.<env>.startree.cloud/api/v1/rbac-manager`, where `<env>` is your environment. Every call needs an `Authorization: Bearer <token>` header. See [Generating an API Token](/corecapabilities/security/manage-api-tokens#generating-an-api-token).

Resources are addressed by StarTree Resource Name (SRN), for example `srn2:policy#my-policy` or `srn2:role#table-reader`. In a URL path, encode the `#` as `%23`.

<CardGroup cols={2}>
  <Card title="Using the RBAC API" icon="gear-code" href="/corecapabilities/security/using-rbac-api">
    Step-by-step walkthrough: create a policy, create a role, attach the policy, assign the role.
  </Card>

  <Card title="Custom policies" icon="square-sliders-vertical" href="/corecapabilities/security/custom-policies">
    Policy document format, SRN syntax, and example policies for common roles.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.