Skip to main content
POST
http://localhost:3000
/
role-permissions
curl -X POST 'https://api.example.com/role-permissions' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "roleId": "role_123",
    "permissionId": "perm_456"
  }'
{
  "id": "rp_789",
  "roleId": "role_123",
  "permissionId": "perm_456"
}

Request Body

roleId
string
required
The role ID to assign the permission to
permissionId
string
required
The permission ID to assign

Response

Returns the created role-permission mapping object.
curl -X POST 'https://api.example.com/role-permissions' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "roleId": "role_123",
    "permissionId": "perm_456"
  }'
{
  "id": "rp_789",
  "roleId": "role_123",
  "permissionId": "perm_456"
}