Get a role by ID
GET
/v1/roles/{roleId}
const url = 'https://api.varman.io/v1/roles/rol_abc123';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.varman.io/v1/roles/rol_abc123 \ --header 'X-API-Key: <X-API-Key>'Get a role by ID in Varman. Create custom roles and resolve permission sets for organization-level access control.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”roleId
required
string
Example
rol_abc123Role ID
Responses
Section titled “Responses”Role details
Media typeapplication/json
object
id
string
name
string
permissions
object
isBuiltIn
boolean
createdAt
string format: date-time
updatedAt
string format: date-time
Example generated
{ "id": "example", "name": "example", "permissions": {}, "isBuiltIn": true, "createdAt": "2026-04-15T12:00:00Z", "updatedAt": "2026-04-15T12:00:00Z"}Unauthorized
Role not found