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

# Update Linked CRM Records

> Updates the CRM records (accounts, contacts, etc.) linked to a conversation. Replaces the current set of linked records with the provided list.



## OpenAPI

````yaml put /conversations/{id}/linked-crm-records
openapi: 3.0.1
info:
  title: Attention Service V2
  description: Attention Service API V2
  termsOfService: https://www.attention.com/terms-of-use
  contact:
    name: Attention Team
    url: https://docs.attention.com/welcome
    email: support@attention.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.8.0
servers:
  - url: https://api.attention.tech/v2
security:
  - APIKeyHeader: []
paths:
  /conversations/{id}/linked-crm-records:
    put:
      tags:
        - Conversation
        - CRM
      summary: Update Linked CRM Records
      description: >-
        Updates the CRM records (accounts, contacts, etc.) linked to a
        conversation. Replaces the current set of linked records with the
        provided list.
      operationId: updateLinkedCrmRecords
      parameters:
        - name: id
          in: path
          description: UUID of the conversation to update
          required: true
          schema:
            type: string
      requestBody:
        description: Linked CRM records to set on the conversation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLinkedCrmRecordsRequest'
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/UpdateLinkedCrmRecordsRequest'
        required: true
      responses:
        '200':
          description: Linked CRM records updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateLinkedCrmRecordsResponse'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UpdateLinkedCrmRecordsResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed - valid API key required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Conversation not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unexpected error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateLinkedCrmRecordsRequest:
      type: object
      properties:
        opportunity_id:
          type: string
          description: UUID of the opportunity to associate the CRM records with
          example: opp_xyz789
        linked_crm_records:
          type: array
          description: List of CRM records to link to the conversation
          items:
            $ref: '#/components/schemas/LinkedCrmRecordInput'
      example:
        opportunity_id: opp_xyz789
        linked_crm_records:
          - id: acc_001
            code: salesforce_account
          - id: con_002
            code: salesforce_contact
    UpdateLinkedCrmRecordsResponse:
      required:
        - success
      type: object
      properties:
        success:
          type: boolean
          description: Indicates whether the linked CRM records were updated successfully
      example:
        success: true
    Error:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the error.
        status:
          type: string
          description: >-
            The HTTP status code applicable to this problem, expressed as a
            string value.
        code:
          type: string
          description: An application-specific error code, expressed as a string value.
        title:
          type: string
          description: A short, human-readable summary of the problem.
        detail:
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        source:
          type: object
          properties:
            pointer:
              type: string
            parameter:
              type: string
        meta:
          type: object
          properties: {}
      example:
        id: not_found_error
        status: '404'
        code: '404'
        title: Not Found Error
        detail: The requested resource was not found
        source:
          pointer: /data/attributes/id
    LinkedCrmRecordInput:
      required:
        - code
        - id
      type: object
      properties:
        id:
          type: string
          description: External CRM record ID
          example: acc_001
        code:
          type: string
          description: CRM entity type code (e.g., 'salesforce_account', 'hubspot_contact')
          example: salesforce_account
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: Authorization
      in: header

````