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

# Create Role

> Create a custom role for the organization.

Create a custom role for the organization.


## OpenAPI

````yaml openapi/organizations/create-role.json POST /organizations/roles
openapi: 3.1.0
info:
  title: Roles API - Create
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
security:
  - sec0: []
    sec1: []
paths:
  /organizations/roles:
    post:
      summary: Create Role
      description: Create a custom role for the organization.
      operationId: create-role
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  maxLength: 255
                  example: Operator
                description:
                  type: string
                  maxLength: 1024
                  example: Custom operator
                permission_ids:
                  type: array
                  items:
                    type: string
                  default: []
                testing_permission_ids:
                  type: array
                  items:
                    type: string
                  default: []
                role_type:
                  type: string
                  enum:
                    - account
                    - organization
                  default: account
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  admin:
                    type: boolean
                  permission_ids:
                    type: array
                    items:
                      type: string
                  testing_permission_ids:
                    type: array
                    items:
                      type: string
                  role_type:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '400':
          description: Bad Request - Duplicate name or validation failure
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: PUBLIC-API-KEY
      x-default: <Your PUBLIC-API-KEY>
    sec1:
      type: apiKey
      in: header
      name: PRIVATE-SECRET-KEY
      x-default: <Your PRIVATE-SECRET-KEY>

````