Hello,
You would be able to get a user’s role by using the Filter workspace users call
METHOD: POST
URL: https://api.clockify.me/api/v1/workspaces/{workspaceId}/users/info
Headers:
X-Api-Key - your api key
Content/Type - application/json
Body:
{
"email": "input users email here",
"includeRoles": true
}
You can also use “name” key instead of “email”.
The roles will be displayed in the payload:
"roles": [
{
"formatterRoleName": "Admin",
"role": "WORKSPACE_ADMIN",
Hope this helps. Cheers!