Role
Define roles and assign permissions.
Get organizations roles by organization user
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$Query parameters
limitintegerOptionalDefault:
The limit of per page
10pageintegerOptionalDefault:
Current page number
1sortstringOptionalExample:
Sort
{"value":"createdAt"}textstringOptional
Text
privilegesstringOptional
Privileges
Responses
200
OK
application/json
Responseall of
and
401
Unauthorized
application/json
403
Forbidden
application/json
get
/organizations/{organizationId}/rolesGET /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
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$Body
namestringOptionalExample:
Role name
<name>descriptionstringOptionalExample:
Role description
<description>privilegesstring[]OptionalExample:
Role privileges
["all:user:write"]statusnumberOptionalExample:
Role status
<status>Responses
201
Created
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
post
/organizations/{organizationId}/rolesPOST /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": "2025-12-06T05:53:20.791Z",
"updatedAt": "2025-12-06T05:53:20.791Z"
}Get a organization role by organization user
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$roleIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$Responses
200
OK
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
get
/organizations/{organizationId}/roles/{roleId}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": "2025-12-06T05:53:20.791Z",
"updatedAt": "2025-12-06T05:53:20.791Z"
},
"privileges": [
"project:read",
"project:write"
],
"createdAt": "2025-12-06T05:53:20.791Z",
"updatedAt": "2025-12-06T05:53:20.791Z"
}Update a organization role by organization user
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$roleIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$Body
namestringOptionalExample:
Role name
<name>descriptionstringOptionalExample:
Role description
<description>privilegesstring[]OptionalExample:
Role privileges
["all:user:write"]statusnumberOptionalExample:
Role status
<status>Responses
200
OK
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
put
/organizations/{organizationId}/roles/{roleId}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": "2025-12-06T05:53:20.791Z",
"updatedAt": "2025-12-06T05:53:20.791Z"
},
"privileges": [
"project:read",
"project:write"
],
"createdAt": "2025-12-06T05:53:20.791Z",
"updatedAt": "2025-12-06T05:53:20.791Z"
}Delete a organization role by organization user
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$roleIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$Responses
204
No Content
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
delete
/organizations/{organizationId}/roles/{roleId}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?

