---
updatedAt: 2026-04-21T08:57:19.000Z
agentTools:
  projectIndex: https://docs.mesh.complyadvantage.com/llms.txt
---

# Get list of roles

Returns a list of roles. You need the View roles in organization permission to use the account_identifier parameter.


You need the "View roles in account" permission to use this endpoint.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "identity_BuiltInRoleResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/identity_RoleResponse"
          },
          {
            "properties": {
              "description": {
                "description": "Description of the role.",
                "example": "View Cases",
                "type": "string"
              },
              "identifier": {
                "description": "The unique identifier of the role.",
                "example": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "name": {
                "description": "Name of the role.",
                "example": "Supervisor",
                "type": "string"
              },
              "users_assigned_count": {
                "description": "Number of users assigned.",
                "example": 1,
                "format": "int32",
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "required": [
          "description",
          "identifier",
          "name",
          "users_assigned_count"
        ],
        "type": "object"
      },
      "identity_CustomRoleResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/identity_RoleResponse"
          },
          {
            "properties": {
              "account_identifier": {
                "description": "The account identifier of the role.",
                "example": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "archived_at": {
                "description": "Date and time the role was archived, or null if active.",
                "example": "2023-01-01T10:10:10.000Z",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "created_at": {
                "description": "Date and time the role was last created.",
                "example": "2023-01-01T10:10:10.000Z",
                "format": "date-time",
                "type": "string"
              },
              "created_by": {
                "default": "00000000-0000-0000-0000-000000000000",
                "description": "Created by identifier",
                "format": "uuid",
                "type": "string"
              },
              "description": {
                "description": "Description of the role.",
                "example": "View Cases",
                "type": "string"
              },
              "identifier": {
                "description": "The unique identifier of the role.",
                "example": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "name": {
                "description": "Name of the role.",
                "example": "Supervisor",
                "type": "string"
              },
              "updated_at": {
                "description": "Date and time the role was last updated.",
                "example": "2023-01-01T10:10:10.000Z",
                "format": "date-time",
                "type": "string"
              },
              "updated_by": {
                "default": "00000000-0000-0000-0000-000000000000",
                "description": "Updated by identifier",
                "format": "uuid",
                "type": "string"
              },
              "users_assigned_count": {
                "description": "Number of users assigned.",
                "example": 1,
                "format": "int32",
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "required": [
          "account_identifier",
          "created_at",
          "created_by",
          "description",
          "identifier",
          "name",
          "updated_at",
          "updated_by",
          "users_assigned_count"
        ],
        "type": "object"
      },
      "identity_PaginatedResponseRoleResponse": {
        "properties": {
          "first": {
            "description": "The URL path to the first page.",
            "example": "/v1/resource?page_number=1",
            "type": "string"
          },
          "next": {
            "description": "The URL path to the next page.",
            "example": "/v1/resource?page_number=4",
            "nullable": true,
            "type": "string"
          },
          "prev": {
            "description": "The URL path to the previous page.",
            "example": "/v1/resource?page_number=2",
            "nullable": true,
            "type": "string"
          },
          "roles": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/identity_BuiltInRoleResponse"
                },
                {
                  "$ref": "#/components/schemas/identity_CustomRoleResponse"
                }
              ]
            },
            "type": "array"
          },
          "self": {
            "description": "The URL path to the current page.",
            "example": "/v1/resource?page_number=3",
            "type": "string"
          },
          "total_count": {
            "description": "Total number of items.",
            "example": 60,
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "first",
          "roles",
          "self"
        ],
        "type": "object"
      },
      "identity_RoleResponse": {
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "description": "HTTP Bearer Token Authentication",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "title": "Mesh API",
    "version": "v2.0"
  },
  "openapi": "3.0.3",
  "paths": {
    "/v2/iam/roles": {
      "get": {
        "description": "Returns a list of roles. You need the View roles in organization permission to use the account_identifier parameter.\n\n\nYou need the \"View roles in account\" permission to use this endpoint.",
        "operationId": "identity_v2_iam_roles_getRoles",
        "parameters": [
          {
            "description": "Filter roles by name.",
            "example": "Admin",
            "in": "query",
            "name": "name_contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter only roles that have all of at least one set of permissions.",
            "example": [
              "1",
              "2"
            ],
            "in": "query",
            "name": "permissions",
            "required": false,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "The identifier of the account whose roles you'd like to retrieve.",
            "example": "00000000-0000-0000-0000-000000000000",
            "in": "query",
            "name": "account_identifier",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "When true, returns active and archived roles. Defaults to false (active only).",
            "example": false,
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "description": "One-based page index (1..N)",
            "example": 1,
            "in": "query",
            "name": "page_number",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "The size of the page to be returned",
            "example": 20,
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 50,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sorting criteria in the format of: `[-]property` (`-` descending modifier).\n\n* Default sort order is ascending (without `-`).\n\n* Multiple sort criteria are supported.",
            "example": [
              "name"
            ],
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "default": [
                "name"
              ],
              "items": {
                "enum": [
                  "name",
                  "created_at",
                  "updated_at"
                ],
                "type": "string"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/identity_PaginatedResponseRoleResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get list of roles",
        "tags": [
          "IAM"
        ]
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "servers": [
    {
      "description": "ComplyAdvantage Mesh API",
      "url": "https://api.mesh.complyadvantage.com"
    }
  ],
  "tags": [
    {
      "name": "IAM"
    }
  ]
}
```