--- title: "Admin API Permissions and Scopes" slug: "admin-api-permissions-and-scopes" description: "Admin API v2 requires both Django permissions and token scopes, enforcing least-privilege access to every resource and operation." tags: ["Access Control", "Django Permissions", "Token Scopes"] status: "new" updated: 2026-12-01T16:06:51Z published: 2026-12-01T16:06:51Z canonical: "help.narmi.com/admin-api-permissions-and-scopes" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.narmi.com/llms.txt > Use this file to discover all available pages before exploring further. # Admin API Permissions and Scopes Our Admin API v2 enforces **two layers of access control**: **permissions** and **scopes**. Both must be satisfied in order to access a resource. ## Permissions Permissions are tied to the **user's role and account** within Django. They define what actions the user is fundamentally allowed to perform on a model or resource, regardless of the token being used. - Example permissions: - `accounts.view_account` - `accounts.change_account` - `accounts.delete_account` If a user does not have the required model permission, they cannot perform the action—even if their token includes the right scope. ## Scopes (TokenHasResourceScope) Scopes are tied to the **authorization token** that the client presents when calling the API. They define the **range of actions that the token can be used for**, acting as an agreement between the client application and the API. - Example scopes: - `admin_api:accounts:read` - `admin_api:accounts:write` Even if a user has the correct Django permission, the request will be rejected unless the token also carries the required scope. **In short:** Scopes answer the question: ➡️ *"Does this token grant access to this type of operation in the API?"* ## How They Work Together Both conditions must be true for a request to succeed: 1. **User Permissions** → The user must have the appropriate Django permission (e.g., `accounts.view_account`). 2. **Token Scopes** → The token must include the matching scope (e.g. `admin_api:accounts:read`). This ensures **principle of least privilege**: - A user cannot exceed their account-level authority. - A token cannot be abused outside of its intended purpose. ## Related - [Admin API Overview](/admin-api-overview.md)