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

# Update a contact document's type or notes

> Updates the documentType and/or notes on a document attached to a contact. At least one of the two fields must be provided.



## OpenAPI

````yaml /api-reference/openapi.yaml put /api/contacts/{contactId}/documents/{documentId}
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/contacts/{contactId}/documents/{documentId}:
    put:
      tags:
        - Contacts
      summary: Update a contact document's type or notes
      description: >-
        Updates the documentType and/or notes on a document attached to a
        contact. At least one of the two fields must be provided.
      operationId: put_contact_document
      parameters:
        - in: path
          name: contactId
          required: true
          schema:
            type: string
        - in: path
          name: documentId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateContactDocumentRequest'
      responses:
        '200':
          description: Document updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactDocumentMutationResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorResponse'
        '404':
          description: Contact, document, or organization not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateContactDocumentRequest:
      type: object
      properties:
        documentType:
          type: string
          description: >-
            New document type label; must match a name configured in the
            organization's `documentTypes`.
        notes:
          type: string
          nullable: true
          description: >-
            Free-form note shown alongside the document; pass `null` to clear an
            existing note.
      additionalProperties: true
      example:
        documentType: Proof of Address
        notes: Updated label after re-review
    ContactDocumentMutationResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        document:
          $ref: '#/components/schemas/ContactDocumentDto'
      required:
        - success
        - document
      additionalProperties: true
      example:
        success: true
        document:
          _id: 64f0a1b2c3d4e5f6a7b8ca40
          storageKey: >-
            org/64f0a1b2c3d4e5f6a7b8c9d3/contact/64f0a1b2c3d4e5f6a7b8c9d0/2026/id-proof.pdf
          filename: id-proof.pdf
          contentType: application/pdf
          documentType: ID Proof
    LegacyErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        data: {}
      additionalProperties: true
      example:
        error: Attachment not found
        message: Attachment not found
    ContactDocumentDto:
      type: object
      properties:
        _id:
          type: string
        storageKey:
          type: string
        filename:
          type: string
        contentType:
          type: string
        size:
          type: integer
        documentType:
          type: string
        sourceMessageId:
          type: string
          nullable: true
        uploadedAt:
          type: string
          format: date-time
          nullable: true
        uploadedBy:
          type: string
          nullable: true
        notes:
          type: string
          nullable: true
        signedUrl:
          type: string
          nullable: true
          description: Short-lived signed GET URL for the underlying R2 object.
      required:
        - storageKey
        - filename
        - contentType
        - documentType
      additionalProperties: true
      example:
        _id: 64f0a1b2c3d4e5f6a7b8ca40
        storageKey: >-
          org/64f0a1b2c3d4e5f6a7b8c9d3/contact/64f0a1b2c3d4e5f6a7b8c9d0/2026/id-proof.pdf
        filename: id-proof.pdf
        contentType: application/pdf
        size: 184320
        documentType: ID Proof
        uploadedAt: '2026-05-12T10:00:00.000Z'
        uploadedBy: 64f0a1b2c3d4e5f6a7b8c9d4
        notes: Driver license, front + back
        signedUrl: https://example-r2.signed/.../id-proof.pdf?X-Amz-Expires=600
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````