---
title: "Retrieve User Roles"
method: GET
path: "/users/{userId}/site-roles"
tags: ["Users"]
---

# Retrieve User Roles

`GET /users/{userId}/site-roles`

Use this endpoint to retrieve all the Roles a User has.

## Response `200`

Roles were successfully retrieved.

- object — Single-item envelope mixin. `allOf` this into any show response that wraps its `data` payload in an outer object; the concrete schema (e.g. `ShowUser`) adds its own `data` property with the appropriate `$ref` and keeps its own title so the SDK surface is unchanged.
  - `data` object[], required — An array of `UserSiteRole`s.
    - `permissions` string[], required — The array of permissions associated with this user site role.
    - `role` Role, required
      - `id` string, required — The id of the role.
      - `name` string, required — The full name of the role.
      - `description` string, required — The description for the role.
      - `organisation_id` string, required — The id of the organisation this role belongs to.
    - `role_id` string, uuid, required — The ID of the site.
    - `site` SchemasSite, required — A site object.
      - `id` string, required — The ID of the site.
      - `name` string, required — The name of the site
      - `frontend_subdomain` string, required — The subdomain which this shop is accessible from on the .try.be domain.
      - `currency` string, required — The ISO-4217 currency code in lower case
      - `timezone` string, required — The timezone of the site
      - `locale` string, required — The default locale of the site
      - `country_code` string, nullable, required — The country code of the site
      - `external_id` string, nullable, required — An external identifier for the site
      - `organisation_id` string, required — The id of the organisation this site belongs to
      - `organisation_name` string, required — The name of the organisation this site belongs to
      - `is_read_only` boolean, required — Whether this site is read only. Users can only view data on read only sites.
      - `created_at` string, date-time, required — The date and time the site was created.
    - `site_id` string, uuid, required — The ID of the site.

## Other responses

- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.
- `404` — The resource couldn't be found

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
