> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bedrock.quarry-systems.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Role Permission

> Assign a permission to a role

## Request Body

<ParamField body="roleId" type="string" required>
  The role ID to assign the permission to
</ParamField>

<ParamField body="permissionId" type="string" required>
  The permission ID to assign
</ParamField>

## Response

Returns the created role-permission mapping object.

<RequestExample>
  ```bash cURL theme={null}
  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"
    }'
  ```

  ```javascript Node.js theme={null}
  const axios = require('axios');

  const { data } = await axios.post('https://api.example.com/role-permissions', {
    roleId: 'role_123',
    permissionId: 'perm_456',
  }, {
    headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
  });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "rp_789",
    "roleId": "role_123",
    "permissionId": "perm_456"
  }
  ```
</ResponseExample>
