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

# Apply a label to a conversation

> Applies one label to a conversation. Idempotent: applying a label the conversation already carries succeeds and changes nothing. Only public labels can be applied — discover their ids with `GET /v1/labels`. Responds with the full set of public labels the conversation carries after the change. A closed conversation can still be labelled. Requires the `conversation:write` scope.



## OpenAPI

````yaml /openapi.yaml put /v1/conversation/{id}/label/{labelId}
openapi: 3.1.0
info:
  title: ProVision Public API
  version: 1.0.0
  description: >-
    Use the ProVision Public API to integrate with ProVision conversations,
    clients, users, and addresses. All endpoints accept and return JSON, are
    authenticated with an `x-api-key` header, and are scoped to a single partner
    tenant.
  contact:
    email: support@onevisionresources.com
    name: OneVision Resources Support
  license:
    name: Proprietary
servers:
  - url: https://connect.provisionapp.io
    description: Production
security: []
paths:
  /v1/conversation/{id}/label/{labelId}:
    put:
      tags:
        - conversation
      summary: Apply a label to a conversation
      description: >-
        Applies one label to a conversation. Idempotent: applying a label the
        conversation already carries succeeds and changes nothing. Only public
        labels can be applied — discover their ids with `GET /v1/labels`.
        Responds with the full set of public labels the conversation carries
        after the change. A closed conversation can still be labelled. Requires
        the `conversation:write` scope.
      operationId: putConversationLabel
      parameters:
        - schema:
            $ref: '#/components/schemas/ConversationId'
          required: true
          description: Id of the conversation to label.
          name: id
          in: path
        - schema:
            $ref: '#/components/schemas/LabelId'
          required: true
          description: Id of the label to apply or remove, as returned by `GET /v1/labels`.
          name: labelId
          in: path
      responses:
        '200':
          description: The conversation's public labels after applying this one
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationLabels'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OpenApiKeyAuth: []
components:
  schemas:
    ConversationId:
      type: string
      format: uuid
      description: Conversation id.
      example: 57f2d879-20f8-4106-9abb-44fa099e0448
    LabelId:
      type: string
      format: uuid
      description: Label id, as returned by `GET /v1/labels`.
      example: 9f8e7d6c-5b4a-4938-8271-0a1b2c3d4e5f
    ConversationLabels:
      type: object
      properties:
        conversationId:
          type: string
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label'
          description: >-
            The conversation's public labels after this request. Private labels
            applied inside ProVision are not listed.
      required:
        - conversationId
        - labels
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
    Label:
      type: object
      properties:
        labelId:
          type: string
        displayName:
          type: string
        labelGroupId:
          type:
            - string
            - 'null'
          description: >-
            Id of the group this label belongs to, or null when it is ungrouped.
            Groups organize labels in the ProVision UI and do not affect
            assignment.
      required:
        - labelId
        - displayName
        - labelGroupId
      additionalProperties: false
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code
          example: NOT_FOUND
        message:
          type: string
          description: Human-readable error description
      required:
        - code
        - message
  securitySchemes:
    OpenApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Send the API key in the x-api-key header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.