> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetRolesInfo

# Package: accounts

# Namespace: RolesManagementService

# Method link: https://dev.wix.com/docs/api-reference/account-level/user-management/accounts/users/get-roles-info.md

## Introduction

Retrieves all available roles in the requesting account, including predefined and custom roles.
> **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.

---

## REST API

### Schema

```
 Method: getRolesInfo
 Description: Retrieves all available roles in the requesting account, including predefined and custom roles. > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.
 URL: https://www.wixapis.com/roles-management/roles
 Method: GET
 Method parameters:
   param name: filter | type: RolesInfoFilter    
        - name: roleLevel | type: RoleLevel | description: Role level to return. Default: ALL.  
             - enum: ALL, SITE_LEVEL, ACCOUNT_LEVEL
        - name: editorTypes | type: array<EditorType> | description: Filter for editor-specific roles. Default: ALL.  
             - enum: UNINITIALIZED, EDITORX, BLOCKS, STUDIO
   query param name: locale | type: locale | description: Language of predefined roles names and descriptions to return, in ISO 639 format. Default: `en`.  
 Return type: GetRolesInfoResponse
  - name: predefinedRoles | type: array<RoleInfo> | description: Predefined roles.  
     - name: id | type: string | description: Role GUID.  
     - name: title | type: string | description: Role title, translated according to the request locale. If translation fails, the original title is returned.  
     - name: description | type: string | description: Role description, translated according to the request locale. If translation fails, the original description is returned.  
     - name: restrictFromLevel | type: RoleLevelRestriction | description: Whether this role is restricted from accessing a specific resource type. Default: `NoRestriction`.  
         - enum: NoRestriction, Site, Account
  - name: customRoles | type: array<RoleInfo> | description: Custom roles.  


```

### Examples

### Get Roles Info
```curl
# Basic request (no filters)
curl -X GET \
  'https://www.wixapis.com/roles-management/roles' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: <AUTH>'

# With query parameters for filtering
curl -X GET \
  'https://www.wixapis.com/roles-management/roles?locale=en&filter.role_level=ALL' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: <AUTH>'

# Response:
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.userManagement.users.getRolesInfo(options)
 Description: Retrieves all available roles in the requesting account, including predefined and custom roles. > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.
 Method parameters:
   param name: options | type: GetRolesInfoOptions  none  
        - name: locale | type: string | description: Language of predefined roles names and descriptions to return, in ISO 639 format. Default: `en`.  
        - name: filter | type: RolesInfoFilter | description: Roles to return.  
           - name: roleLevel | type: RoleLevel | description: Role level to return. Default: ALL.  
                 - enum: ALL, SITE_LEVEL, ACCOUNT_LEVEL
           - name: editorTypes | type: array<EditorType> | description: Filter for editor-specific roles. Default: ALL.  
                 - enum: UNINITIALIZED, EDITORX, BLOCKS, STUDIO
 Return type: PROMISE<GetRolesInfoResponse>
  - name: predefinedRoles | type: array<RoleInfo> | description: Predefined roles.  
     - name: _id | type: string | description: Role GUID.  
     - name: title | type: string | description: Role title, translated according to the request locale. If translation fails, the original title is returned.  
     - name: description | type: string | description: Role description, translated according to the request locale. If translation fails, the original description is returned.  
     - name: restrictFromLevel | type: RoleLevelRestriction | description: Whether this role is restricted from accessing a specific resource type. Default: `NoRestriction`.  
         - enum: NoRestriction, Site, Account
  - name: customRoles | type: array<RoleInfo> | description: Custom roles.  


```

### Examples

### Get available account roles with an API key
```javascript
import { createClient, ApiKeyStrategy } from "@wix/sdk";
import { users } from "@wix/user-management";
const wixClient = createClient({
 modules: { users },
 auth: ApiKeyStrategy({
    apiKey: "MY-API-KEY",
  }),
});

async function getRolesInfo(options) {
  const response = await users.getRolesInfo(options);
}

```

### getRolesInfo (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { users } from '@wix/user-management';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { users },
  // Include the auth strategy and host as relevant
});


async function getRolesInfo(options) {
  const response = await myWixClient.users.getRolesInfo(options);
};
```

---