---
title: 'Get roles of users for a website'
description: 'Retrieves roles of users for a specific website. If userId is provided, retrieves the role of that specific user for the website.'
openapi: GET /api/website_user_roles
---

> **For AI agents:** the complete documentation index is at [llms.txt](https://docs.snagsolutions.io/llms.txt). Append `.md` to any page URL for its markdown version.

`GET /api/website_user_roles` — query parameters: `websiteId`, `userId`

`GET https://admin.snagsolutions.io/api/website_user_roles`

Retrieves roles of users for a specific website. If userId is provided, retrieves the role of that specific user for the website.

## Authentication

- `apiKeyAuth` — apiKey in header: `X-API-KEY`

## Query parameters

- `websiteId` (string, required) — UUID of the website
- `userId` (string) — UUID of the user

## Response 200

200
  - response (object) — Schema for getWebsiteUserRoles response
    - `data` (array, required)
      - `items` (object)
        - `id` (string, uuid, required) — UUID of the website user role

## Response 400

400
  - response (object) — Schema for bad request response
    - `message` (string, required) — Error message

## Response 403

403
  - response (object) — Schema for forbidden response
    - `message` (string, required) — Error message

## Response 500

500
  - response (object) — Schema for internal server error response
    - `success` (boolean, required) — Indicates operation success
    - `message` (string, required) — Error message
    - `debugInfo` (string) — Optional debug information


---

📦 **OpenAPI specs:** Every OpenAPI specification referenced by this documentation is available as a single download — https://docs.snagsolutions.io/api-specs.zip
