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

# Assign or unassign user label

> Updates a label for a specified user by their user ID. It assigns a new label to the user or unassigns the existing label with the specified `labelId`.

**To assign a label:** Omit the `unassign` property or set it to `false`.

**To remove a label:** Set `unassign` to `true`.



## OpenAPI

````yaml /api-reference/openapi.json put /users/{user_id}/labels
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/{user_id}/labels:
    put:
      tags:
        - Users
      summary: Assign or unassign user label
      description: >-
        Updates a label for a specified user by their user ID. It assigns a new
        label to the user or unassigns the existing label with the specified
        `labelId`.


        **To assign a label:** Omit the `unassign` property or set it to
        `false`.


        **To remove a label:** Set `unassign` to `true`.
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: integer
          description: User ID
          example: 123
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserLabelInput'
            examples:
              assign_label:
                summary: Assign a label to user
                value:
                  labelId: 3003
              unassign_label:
                summary: Remove a label from user
                value:
                  labelId: 3003
                  unassign: true
      responses:
        '200':
          description: Label updated successfully
components:
  schemas:
    UserLabelInput:
      type: object
      required:
        - labelId
      properties:
        labelId:
          type: integer
          description: Label ID to assign or unassign
        unassign:
          type: boolean
          description: >-
            Set to true to remove label from the user. Omit or set to false to
            assign the label.
          default: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````