---
title: "Check whether the user does have the given role"
method: POST
path: "/api/Roles/checkuserrole"
tags: ["Roles"]
---

# Check whether the user does have the given role

`POST /api/Roles/checkuserrole`

## Request

- Base URL: `https://apidocs.cflowapps.com` (the document declares no server; this is the origin it was published from)
- URL: `https://apidocs.cflowapps.com/api/Roles/checkuserrole`
- Auth: API key in header `X-Api-Key` and API key in header `X-User-Key`
- TypeScript: <https://skmtc.dev/cflowapps/apis/cflow-public-api/docs/api/Roles/checkuserrole/post.ts> (a function with typed inputs; its response is checked against the schema)

Sample request:
            
    POST 
    {
        "Username":"john",
        "Role":"Admin"
    }

## Request body

- RoleDetails
  - `username` string, required: Username of the user
  - `role` string, required: Role of the user

## Response `200`

Yes/No

- StatusResDto[]
  - `status` string, nullable

## Other responses

- `400`: Not able to process request.
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Role/User does not exist.
- `500`: Internal Server Error

---

[API](https://skmtc.dev/cflowapps/apis/cflow-public-api.md) - [All operations](https://skmtc.dev/cflowapps/apis/cflow-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cflowapps/apis/cflow-public-api/revisions/af0dadd0ad10?raw)
