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

# Update document metadata

> Partially update a document's metadata. Send only the fields you want to change.

- **`tags`**: Array of **tag IDs** (UUIDs) to assign to the document. This replaces the document's current tag set, so you can add or remove tags by including the full list you want applied. Each ID must refer to an existing tag (use **POST** `/contents/v1/tags` to create one, or **GET** `/contents/v1/tags` to list IDs). If any ID is invalid, the API returns `400` with error code `INVALID_TAGS_ERROR`.
- **`share_with_org`**: When `true`, the document is available to all members of your organization. When `false`, only you can access it.



## OpenAPI

````yaml /api-rest/openapi/openapi_content_data.json patch /contents/v1/documents/{content_id}
openapi: 3.1.0
info:
  title: Bigdata Content API
  description: API for managing and accessing private content documents uploaded by users.
  version: 1.0.0
servers:
  - url: https://api.bigdata.com/
security:
  - ApiKeyAuth: []
paths:
  /contents/v1/documents/{content_id}:
    patch:
      tags:
        - Documents
      summary: Update document metadata
      description: >-
        Partially update a document's metadata. Send only the fields you want to
        change.


        - **`tags`**: Array of **tag IDs** (UUIDs) to assign to the document.
        This replaces the document's current tag set, so you can add or remove
        tags by including the full list you want applied. Each ID must refer to
        an existing tag (use **POST** `/contents/v1/tags` to create one, or
        **GET** `/contents/v1/tags` to list IDs). If any ID is invalid, the API
        returns `400` with error code `INVALID_TAGS_ERROR`.

        - **`share_with_org`**: When `true`, the document is available to all
        members of your organization. When `false`, only you can access it.
      parameters:
        - name: content_id
          in: path
          required: true
          description: >-
            Content ID of the document to update (32-character uppercase
            hexadecimal string).
          schema:
            type: string
            pattern: ^[A-F0-9]{32}$
            example: E0618D0E9D3A960C1731A620EDE56B5C
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentUpdatePayload'
            examples:
              updateTags:
                summary: Replace document tags
                value:
                  tags:
                    - 019e3a99-6952-7dd4-adf5-b0b341959e11
              updateSharing:
                summary: Change organization sharing
                value:
                  share_with_org: false
      responses:
        '200':
          description: Updated document metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentListItem'
        '400':
          description: Invalid request body (e.g. one or more tag IDs do not exist).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                statusCode: 400
                message: Invalid tag ids.
                errorCode: INVALID_TAGS_ERROR
                requestId: 6b7438ed-ecf7-4f1d-acd3-8c662cf96149
        '401':
          description: Unauthorized - Invalid or missing API key.
        '403':
          description: You do not have permission to update this document.
        '404':
          description: No document found with this content_id.
components:
  schemas:
    DocumentUpdatePayload:
      type: object
      description: >-
        Fields to update on a document. Include only the properties you want to
        change.
      properties:
        tags:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            Tag IDs to assign to the document. Replaces the current tag
            assignment. Every ID must exist; otherwise the API returns
            `INVALID_TAGS_ERROR`.
          example:
            - 019e3a99-6952-7dd4-adf5-b0b341959e11
        share_with_org:
          type: boolean
          description: >-
            If true, all members of your organization can access the document.
            If false, only you can access it.
          example: false
    DocumentListItem:
      type: object
      description: >-
        Metadata for a single document. Returned by List documents and Get
        document. Use the id (content_id) with Get annotated document or Get
        original document to retrieve the file content.
      properties:
        id:
          type: string
          description: >-
            Content ID: unique 32-character uppercase hexadecimal identifier for
            the document. Use this when calling Get document, Get annotated
            document, or Get original document.
          example: E0618D0E9D3A960C1731A620EDE56B5C
        file_name:
          type: string
          description: Original file name of the uploaded document.
          example: Weekly summary report.eml
        user_id:
          type: string
          description: ID of the user who uploaded the document.
          example: user_id_001
        org_id:
          type: string
          description: ID of the organization the document belongs to.
          example: org_id_001
        rp_collection_id:
          type: string
          description: >-
            ID of the collection the document belongs to. This is applicable
            only for emails and attachments.
          example: 2CBDC7DA8AE42A8A078DECC3C9FCADFB
        raw_size:
          type: integer
          description: Size of the raw document in bytes.
          example: 18974
        request_origin:
          type: string
          description: >-
            Origin of the content ingestion request: how the document entered
            the platform.
          enum:
            - email
            - investment_research
            - sharepoint
            - file_upload
        content_type:
          type: string
          description: MIME type of the document.
          example: message/rfc822
        status:
          type: string
          description: Processing status of the document.
          enum:
            - pending
            - processing
            - completed
            - failed
        shared_with_orgs:
          type: array
          description: List of organization IDs the document is shared with.
          items:
            type: string
          example:
            - org_id_001
        created_at:
          type: string
          format: date-time
          description: Timestamp when the document was created.
          example: '2026-02-03T08:43:02.729356Z'
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the document was last updated.
          example: '2026-02-03T08:43:02.729359Z'
        published_at:
          type: string
          format: date-time
          description: >-
            Timestamp when the document was published. This is the reference
            timestamp used for search and retrieval.
          example: '2026-02-03T08:43:02.729359Z'
        connector_id:
          type: string
          format: uuid
          description: ID of the connector used to upload the document.
          example: 019a9612-bfad-758c-884e-37dd8c6ad2cb
        error_code:
          type: string
          nullable: true
          description: Error code if the document processing failed.
          example: null
        delete_started_ts:
          type: string
          format: date-time
          nullable: true
          description: Timestamp when document deletion started, if applicable.
          example: null
        file_metadata:
          type: object
          nullable: true
          description: Additional metadata about the file.
          example: null
        tags:
          type: array
          description: Tags associated with the document.
          items:
            $ref: '#/components/schemas/Tag'
      required:
        - id
        - file_name
        - user_id
        - org_id
        - status
        - created_at
        - updated_at
        - published_at
    ApiError:
      type: object
      description: Standard API error response.
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          type: string
          example: Invalid tag ids.
        errorCode:
          type: string
          example: INVALID_TAGS_ERROR
        requestId:
          type: string
          format: uuid
          example: 6b7438ed-ecf7-4f1d-acd3-8c662cf96149
    Tag:
      type: object
      description: A tag associated with a document.
      properties:
        id:
          type: string
          description: Unique identifier for the tag.
          example: 019a48b4-e574-71d9-a8d9-6a5a86386847
        name:
          type: string
          description: >-
            Name of the tag (e.g. `from:user@email.com` for email;
            `broker:Broker Name` for investment research).
          example: from:user@email.com
      required:
        - id
        - name
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Your API key. Include it in every request as the X-API-KEY header.
        Create and manage keys in the Developer Platform.

````