Creates a role.
const response = await client.roles.create(
{ role: 'admin' }
);| Name | Description |
|---|---|
rolestring, required | Name of the role. |
| Name | Description |
|---|---|
dataobject | Role object. |
{
"data": {
"id": "role_abc123",
"role": "admin"
}
}Lists all roles.
const response = await client.roles.list();| Name | Description |
|---|---|
dataobject[] | List of roles. |
{
"data": [
{
"id": "role_abc123",
"role": "admin"
}
]
}