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

# Create a user

> Creates a user using a POST http method. The user will receive an invitation email.

**Required properties:**
- `first_name` — User given name
- `last_name` — User family name
- `email` — User email
- `role_id` — ID of the user's role:
  - **1**: C-Level
  - **2**: Director
  - **3**: Project Manager
  - **4**: Collaborator
  - **5**: Freelancer
  - **6**: Client



## OpenAPI

````yaml /api-reference/openapi.json post /users
openapi: 3.1.0
info:
  title: COR API
  description: >-
    The COR API lets you integrate with projectcor.com applications using simple
    HTTP methods, in either XML or JSON formats, making this an ideal API for
    developing integrations with other softwares, external clients or mobile
    applications
  version: 1.0.0
servers:
  - url: https://api.projectcor.com/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /users:
    post:
      tags:
        - Users
      summary: Create a user
      description: >-
        Creates a user using a POST http method. The user will receive an
        invitation email.


        **Required properties:**

        - `first_name` — User given name

        - `last_name` — User family name

        - `email` — User email

        - `role_id` — ID of the user's role:
          - **1**: C-Level
          - **2**: Director
          - **3**: Project Manager
          - **4**: Collaborator
          - **5**: Freelancer
          - **6**: Client
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreateInput'
            example:
              first_name: John
              last_name: Doe
              email: john.doe@example.com
              role_id: 1
              user_position_id: 2
              phone: 123-456-7890
              description: Senior Developer
              birthday: '1990-01-01'
              work_in: Engineering
              hourly_rate: 50
              monthly_hours: 160
              daily_hours: 8
              salary: 4500
      responses:
        '200':
          description: User created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
components:
  schemas:
    UserCreateInput:
      type: object
      required:
        - first_name
        - last_name
        - email
        - role_id
      properties:
        first_name:
          type: string
          description: User given name
        last_name:
          type: string
          description: User family name
        email:
          type: string
          format: email
          description: User email
        role_id:
          type: integer
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
          description: >-
            User Role: 1=C-Level, 2=Director, 3=Project Manager, 4=Collaborator,
            5=Freelancer, 6=Client
        user_position_id:
          type: integer
          description: ID of the user's position
        phone:
          type: string
          description: User phone number
        description:
          type: string
          description: User description
        birthday:
          type: string
          format: date
          description: User birthday (YYYY-MM-DD)
        work_in:
          type: string
          description: Department or area
        hourly_rate:
          type: number
          description: Hourly rate
        monthly_hours:
          type: integer
          description: Monthly hours
        daily_hours:
          type: integer
          description: Daily hours
        plan_id:
          type: integer
          enum:
            - 4
            - 5
          description: 'Plan ID: 4=Project Management, 5=Capacity Planning'
        hidden:
          type: boolean
          description: Whether user is hidden
        charge_hours:
          type: boolean
          description: Whether to charge hours
        salary:
          type: integer
          description: Monthly salary amount
    User:
      allOf:
        - $ref: '#/components/schemas/UserBase'
        - type: object
          properties:
            labels:
              type: array
              items:
                $ref: '#/components/schemas/Label'
              nullable: true
    UserBase:
      type: object
      properties:
        id:
          type: integer
        first_name:
          type: string
        last_name:
          type: string
        picture:
          type: string
          description: URL to user's profile picture
        email:
          type: string
          format: email
        cuil:
          type: string
        remaining_hours:
          type: number
        user_position_id:
          type: integer
        role_id:
          type: integer
          description: >-
            1=C-Level, 2=Director, 3=Project Manager, 4=Collaborator,
            5=Freelancer, 6=Client
        daily_hours:
          type: number
        plan_id:
          type: integer
          description: 4=Project Management, 5=Capacity Planning
        plan_name:
          type: string
        hidden:
          type: boolean
        position_name:
          type: string
          nullable: true
        category_id:
          type: integer
          nullable: true
        category_name:
          type: string
          nullable: true
        gmt:
          type: string
          description: >-
            UTC offset from the user's last login location. Indicates the
            timezone configured at their last login.
          example: '-03:00'
        leaves:
          type: array
          items:
            $ref: '#/components/schemas/Leave'
    Label:
      type: object
      properties:
        id:
          type: integer
        hex:
          type: string
          description: Hex color code
        hsl:
          type: string
          nullable: true
        rgb:
          type: string
          nullable: true
        lang:
          type: string
        name:
          type: string
        color_id:
          type: integer
    Leave:
      type: object
      properties:
        id:
          type: integer
        user_id:
          type: integer
        company_id:
          type: integer
        leave_type_id:
          type: integer
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: true
        all_day:
          type: boolean
        leaveType:
          $ref: '#/components/schemas/LeaveType'
    LeaveType:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        type_code:
          type: string
        company_id:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: true
        icon_name:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````