Role
Define roles and assign permissions.
Get organizations roles by organization user
Entity ID
^[0-9a-fA-F]{24}$The limit of per page
10Current page number
1Sort
{"value":"createdAt"}Text
Privileges
OK
The total number of users
The limit of users per page
10Current page
1The total number of pages
Current page number
Has previous page
Has next page
Previous page number
Next page number
Unauthorized
Forbidden
GET /api/v1/organizations/{organizationId}/roles HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"totalDocs": 1,
"limit": 10,
"page": 1,
"totalPages": 1,
"pagingCounter": 1,
"hasPrevPage": true,
"hasNextPage": true,
"prevPage": 1,
"nextPage": 1,
"docs": []
}Create a organization role by organization user
Entity ID
^[0-9a-fA-F]{24}$Role name
<name>Role description
<description>Role privileges
["all:user:write"]Role status
<status>Created
Role id
Entity ID
^[0-9a-fA-F]{24}$Organization id
Entity ID
^[0-9a-fA-F]{24}$Role name
Role privileges
Role status
Created at date
Date
Updated at date
Date
Bad Request
Unauthorized
Forbidden
POST /api/v1/organizations/{organizationId}/roles HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 101
{
"name": "<name>",
"description": "<description>",
"privileges": [
[
"all:user:write"
]
],
"status": "<status>"
}{
"_id": "text",
"organization": "text",
"name": "text",
"privileges": [
"text"
],
"status": 1,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Get a organization role by organization user
Entity ID
^[0-9a-fA-F]{24}$Entity ID
^[0-9a-fA-F]{24}$OK
Entity ID
^[0-9a-fA-F]{24}$Role name
Role description
Role privileges, formatted as (:)
["project:read","project:write"]Date
Date
Unauthorized
Forbidden
Not Found
GET /api/v1/organizations/{organizationId}/roles/{roleId} HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"_id": "text",
"name": "text",
"description": "text",
"organization": {
"_id": "text",
"name": "text",
"slug": "text",
"description": "text",
"owner": "text",
"isExecutive": false,
"status": 0,
"privileges": [
"project:read",
"project:write"
],
"imageUrl": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"privileges": [
"project:read",
"project:write"
],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Update a organization role by organization user
Entity ID
^[0-9a-fA-F]{24}$Entity ID
^[0-9a-fA-F]{24}$Role name
<name>Role description
<description>Role privileges
["all:user:write"]Role status
<status>OK
Entity ID
^[0-9a-fA-F]{24}$Role name
Role description
Role privileges, formatted as (:)
["project:read","project:write"]Date
Date
Bad Request
Unauthorized
Forbidden
Not Found
PUT /api/v1/organizations/{organizationId}/roles/{roleId} HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 101
{
"name": "<name>",
"description": "<description>",
"privileges": [
[
"all:user:write"
]
],
"status": "<status>"
}{
"_id": "text",
"name": "text",
"description": "text",
"organization": {
"_id": "text",
"name": "text",
"slug": "text",
"description": "text",
"owner": "text",
"isExecutive": false,
"status": 0,
"privileges": [
"project:read",
"project:write"
],
"imageUrl": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"privileges": [
"project:read",
"project:write"
],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Delete a organization role by organization user
Entity ID
^[0-9a-fA-F]{24}$Entity ID
^[0-9a-fA-F]{24}$No Content
No content
Unauthorized
Forbidden
Not Found
DELETE /api/v1/organizations/{organizationId}/roles/{roleId} HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated
Was this helpful?

