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

# Create Role Route



## OpenAPI

````yaml /api/openapi.json post /api/roles
openapi: 3.1.0
info:
  title: Halite
  version: 0.1.0
servers: []
security: []
paths:
  /api/roles:
    post:
      tags:
        - roles
      summary: Create Role Route
      operationId: create_role_route_api_roles_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleCreatePayload'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RoleCreatePayload:
      properties:
        name:
          type: string
          maxLength: 64
          minLength: 1
          title: Name
        description:
          type: string
          maxLength: 255
          title: Description
          default: ''
      type: object
      required:
        - name
      title: RoleCreatePayload
    RoleSummary:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        is_builtin:
          type: boolean
          title: Is Builtin
        description:
          type: string
          title: Description
      type: object
      required:
        - id
        - name
        - is_builtin
        - description
      title: RoleSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````