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

> Creates a new user position.

If company has the feature flag to manage positions by labels enabled, Field `segmentLabel` is required. For companies without this feature enabled, `segmentLabel` is ignored.

Fied `company_id` is automatically set from the authenticated user's company.



## OpenAPI

````yaml /api-reference/openapi.json post /userPosition
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:
  /userPosition:
    post:
      tags:
        - User Positions
      summary: Create a user position
      description: >-
        Creates a new user position.


        If company has the feature flag to manage positions by labels enabled,
        Field `segmentLabel` is required. For companies without this feature
        enabled, `segmentLabel` is ignored.


        Fied `company_id` is automatically set from the authenticated user's
        company.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserPositionInput'
      responses:
        '200':
          description: User position created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPosition'
        '400':
          description: >-
            Validation error or missing segmentLabel when feature flag is
            enabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                validationError:
                  value:
                    status: 400
                    name: CORCustomError
                    code: F010
                    message: Validation error message
                missingSegmentLabel:
                  value:
                    status: 400
                    name: CORCustomError
                    code: UP001
                    message: Segment label is required
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UserPositionInput:
      type: object
      required:
        - name
        - type
      properties:
        name:
          type: string
          description: >-
            Position name. Must be unique within the company and pass validation
            rules.
        type:
          type: string
          enum:
            - C
            - P
          description: 'Type of position: ''C'' for category, ''P'' for position'
        rate:
          type: number
          description: Base rate for the position
        seniority:
          type: string
          nullable: true
          description: Seniority level of the position
        user_position_category_id:
          type: integer
          nullable: true
          description: >-
            ID of the parent category (only for positions, not categories). This
            field is required if you need to see positions in capacity planning
            and positions list
        segmentLabel:
          type: string
          nullable: true
          description: >-
            Segment label used to group positions. Required only if company has
            feature flag to manage positions by labels enabled. Ignored if
            feature flag is not enabled.
    UserPosition:
      properties:
        id:
          type: integer
        name:
          type: string
        user_position_category_id:
          type: number
        type:
          type: string
          enum:
            - C
            - P
          description: 'Type of position: ''C'' for category, ''P'' for position'
        rate:
          type: integer
        seniority:
          type: string
        company_id:
          type: integer
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````