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

# Create a role

> Creates a new role that can be assigned to resources.



## OpenAPI

````yaml https://live1-service-7042312-f94c764b.us.monday.app/api/public/v1/openapi.json post /api/public/v1/role
openapi: 3.1.0
info:
  title: SuperPlanner Public API
  description: >-
    Public API for integrating with SuperPlanner. Authenticate all requests with
    `Authorization: Bearer <token>`, where the token is an API key generated in
    the SuperPlanner settings.
  version: 1.0.0
servers:
  - url: https://live1-service-7042312-f94c764b.us.monday.app
    description: United States
  - url: https://live1-service-7042312-f94c764b.eu.monday.app
    description: Europe
  - url: https://live1-service-7042312-f94c764b.au.monday.app
    description: Australia
  - url: https://live1-service-7042312-f94c764b.il.monday.app
    description: Israel
security: []
paths:
  /api/public/v1/role:
    post:
      tags:
        - Roles
      summary: Create a role
      description: Creates a new role that can be assigned to resources.
      operationId: post_role_api_public_v1_role_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRoleBody'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Role'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateRoleBody:
      properties:
        name:
          type: string
          title: Name
          description: Display name for the role, e.g. 'Frontend Developer'.
      type: object
      required:
        - name
      title: CreateRoleBody
    Role:
      properties:
        _id:
          type: string
          title: Id
          description: Unique identifier of the role.
        accountId:
          type: string
          title: Accountid
          description: Account this role belongs to.
        name:
          type: string
          title: Name
          description: Display name of the role.
        createDate:
          type: string
          format: date-time
          title: Createdate
          description: UTC timestamp when the role was created.
      type: object
      required:
        - accountId
        - name
      title: Role
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````