> ## 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

> Create a new role within a scope

## Request Body

<ParamField body="name" type="string" required>
  Display name for the role
</ParamField>

<ParamField body="description" type="string">
  Description of the role's purpose
</ParamField>

<ParamField body="scopeId" type="string" required>
  The scope ID where this role will be defined
</ParamField>

## Response

Returns the created role object.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST 'https://api.example.com/roles' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{
      "name": "Editor",
      "description": "Can edit and publish content",
      "scopeId": "scope_123"
    }'
  ```

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

  const { data } = await axios.post('https://api.example.com/roles', {
    name: 'Editor',
    description: 'Can edit and publish content',
    scopeId: 'scope_123',
  }, {
    headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
  });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "role_456",
    "name": "Editor",
    "description": "Can edit and publish content",
    "scopeId": "scope_123"
  }
  ```
</ResponseExample>
