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

# Assign user to conversation

> Assigns a user (support agent) to a specific conversation



## OpenAPI

````yaml /en/openapi.json put /v1/conversations/{id}/assign-user
openapi: 3.0.0
info:
  title: Nuvia API - Company
  description: API documentation for companies
  version: '1.0'
  contact: {}
servers:
  - url: https://api.nuvia.ai
security: []
tags:
  - name: messages
    x-group: Mensagens
  - name: contacts
    x-group: Contatos
  - name: campaigns
    x-group: Campanhas
  - name: tables
    x-group: Tabelas e Listas
  - name: agents
    x-group: Agentes
  - name: conversations
    x-group: Conversas
  - name: inboxes
    x-group: Caixas de Entrada
  - name: knowledge
    x-group: Base de Conhecimento
  - name: Webhooks
    x-group: Webhooks
  - name: campaign-enrollments
    x-group: Inscrições em Campanha
  - name: custom-fields
    x-group: Campos Customizados
paths:
  /v1/conversations/{id}/assign-user:
    put:
      tags:
        - conversations
      summary: Assign user to conversation
      description: Assigns a user (support agent) to a specific conversation
      operationId: ConversationController_assignUserToConversation
      parameters:
        - name: x-company-id
          in: header
          description: >-
            Target company identifier. Required only for global API keys
            (type=global). Ignored for company API keys and human users.
          required: false
          schema:
            type: string
        - name: id
          required: true
          in: path
          description: Conversation ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateConversationUserDto'
      responses:
        '200':
          description: User assigned successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationResponseDto'
        '400':
          description: Invalid data
        '401':
          description: Invalid or expired token
        '403':
          description: You do not have permission to access this resource
        '404':
          description: Resource not found
      security:
        - JWT-auth: []
components:
  schemas:
    UpdateConversationUserDto:
      type: object
      properties:
        userId:
          type: string
          description: ID of the user (attendant) to assign
        isToolCall:
          default: false
          description: Whether it's a tool call
          type: boolean
        preserveWhoAnswering:
          default: false
          description: >-
            If true, keeps the current who_answering (does not force HUMAN).
            Used in HubSpot owner synchronization.
          type: boolean
        triggeredBy:
          description: >-
            Assignment origin. Purely an observability field, propagated only to
            logs.
          type: string
          enum:
            - ai_tool_assign_user
            - ai_tool_assign_team
            - ai_tool_distribute_owner
            - ai_tool_assign_linked_user
            - webhook_hubspot_owner_sync
            - campaign_step_config
            - campaign_list_owner_reconcile
            - ui_user
            - ui_admin
            - user_offboard_reassign
            - manual_template_send
            - internal
        rejectInactiveUser:
          description: >-
            If true, assigning to a user who is not ACTIVE returns an error
            instead of ignoring the assignment. Enabled only on the operator
            route, where someone is available to read the message; every
            automatic path (tool, CRM webhook, campaign) uses the default false.
          type: boolean
        webhookEventId:
          description: >-
            eventId of the HubSpot webhook when the assignment is triggered via
            WebhookOwnerSyncService. Propagated only for logs.
          type: string
      required:
        - userId
    ConversationResponseDto:
      type: object
      properties:
        _id:
          type: string
          description: Conversation ID
        additional_attributes:
          description: Additional conversation attributes
        agent_last_activity_at:
          description: Date of the agent's last activity
        contact_last_activity_at:
          description: Date of the contact's last activity
        allow_send_messages_at:
          description: Date allowed to send messages
        last_activity_at:
          description: Date of the last activity
        priority:
          description: Conversation priority
          type: number
          enum:
            - 4
            - 3
            - 2
            - 1
        status:
          type: string
          enum:
            - OPEN
            - RESOLVED
          description: Conversation status
        who_answering:
          type: string
          enum:
            - AGENT
            - HUMAN
            - UNASSIGNED
          description: Who is responding (AGENT/HUMAN)
        contact:
          description: Conversation's contact
        inbox:
          description: Conversation's inbox
        agent:
          description: Agent assigned to the conversation
        current_step:
          description: Current step of the agent's flow
        company:
          description: Conversation's company
        user:
          description: User assigned to the conversation
        requires_attention:
          description: Attention required
          type: object
          properties:
            type:
              type: string
              enum:
                - HUMAN_HANDOFF
                - AI_SUPPORT_REQUEST
                - IDLE_CONVERSATION
                - CONTACT_MESSAGE
              description: Tipo de atenção necessária
            requested_at:
              description: Data da solicitação de atenção
          required:
            - type
            - requested_at
        referral:
          description: Conversation referral data
        createdAt:
          description: Conversation creation date
        updatedAt:
          description: Conversation update date
        resolved_count:
          description: Number of resolved conversations for the contact (only when grouped)
          type: number
      required:
        - last_activity_at
        - status
        - who_answering
        - contact
        - inbox
        - company
  securitySchemes:
    JWT-auth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Token JWT de autenticação

````