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

# Update Chunk By Tracking Id

> Update a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.



## OpenAPI

````yaml put /api/chunk/tracking_id/update
openapi: 3.0.3
info:
  title: Trieve API
  description: >-
    Trieve OpenAPI Specification. This document describes all of the operations
    available through the Trieve API.
  contact:
    name: Trieve Team
    url: https://trieve.ai
    email: developers@trieve.ai
  license:
    name: BSL
    url: https://github.com/devflowinc/trieve/blob/main/LICENSE.txt
  version: 0.13.0
servers:
  - url: https://api.trieve.ai
    description: Production server
  - url: http://localhost:8090
    description: Local development server
security: []
tags:
  - name: Invitation
    description: Invitation endpoint. Exists to invite users to an organization.
  - name: Auth
    description: Authentication endpoint. Serves to register and authenticate users.
  - name: User
    description: User endpoint. Enables you to modify user roles and information.
  - name: Organization
    description: >-
      Organization endpoint. Enables you to modify organization roles and
      information.
  - name: Dataset
    description: >-
      Dataset endpoint. Datasets belong to organizations and hold configuration
      information for both client and server. Datasets contain chunks and chunk
      groups.
  - name: Chunk
    description: >-
      Chunk endpoint. Think of chunks as individual searchable units of
      information. The majority of your integration will likely be with the
      Chunk endpoint.
  - name: Chunk Group
    description: >-
      Chunk groups endpoint. Think of a chunk_group as a bookmark folder within
      the dataset.
  - name: Crawl
    description: Crawl endpoint. Used to create and manage crawls for datasets.
  - name: File
    description: >-
      File endpoint. When files are uploaded, they are stored in S3 and broken
      up into chunks with text extraction from Apache Tika. You can upload files
      of pretty much any type up to 1GB in size. See chunking algorithm details
      at `docs.trieve.ai` for more information on how chunking works. Improved
      default chunking is on our roadmap.
  - name: Events
    description: >-
      Notifications endpoint. Files are uploaded asynchronously and events are
      sent to the user when the upload is complete.
  - name: Topic
    description: >-
      Topic chat endpoint. Think of topics as the storage system for gen-ai chat
      memory. Gen AI messages belong to topics.
  - name: Message
    description: >-
      Message chat endpoint. Messages are units belonging to a topic in the
      context of a chat with a LLM. There are system, user, and assistant
      messages.
  - name: Stripe
    description: >-
      Stripe endpoint. Used for the managed SaaS version of this app. Eventually
      this will become a micro-service. Reach out to the team using contact info
      found at `docs.trieve.ai` for more information.
  - name: Health
    description: Health check endpoint. Used to check if the server is up and running.
  - name: Metrics
    description: Metrics endpoint. Used to get information for monitoring
  - name: Analytics
    description: Analytics endpoint. Used to get information for search and RAG analytics
  - name: Experiment
    description: Experiment endpoint. Used to create and manage experiments
paths:
  /api/chunk/tracking_id/update:
    put:
      tags:
        - Chunk
      summary: Update Chunk By Tracking Id
      description: >-
        Update a chunk by tracking_id. This is useful for when you are
        coordinating with an external system and want to use the tracking_id to
        identify the chunk. Auth'ed user or api key must have an admin or owner
        role for the specified dataset's organization.
      operationId: update_chunk_by_tracking_id
      parameters:
        - name: TR-Dataset
          in: header
          description: >-
            The dataset id or tracking_id to use for the request. We assume you
            intend to use an id if the value is a valid uuid.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: JSON request payload to update a chunk by tracking_id (chunks)
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateChunkByTrackingIdData'
        required: true
      responses:
        '204':
          description: Confirmation that the chunk has been updated as per your request
        '400':
          description: Service error relating to to updating chunk
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody'
      deprecated: true
      security:
        - ApiKey:
            - admin
components:
  schemas:
    UpdateChunkByTrackingIdData:
      type: object
      required:
        - tracking_id
      properties:
        chunk_html:
          type: string
          description: >-
            HTML content of the chunk you want to update. This can also be
            plaintext. The innerText of the HTML will be used to create the
            embedding vector. The point of using HTML is for convienience, as
            some users have applications where users submit HTML content. If no
            chunk_html is provided, the existing chunk_html will be used.
          nullable: true
        convert_html_to_text:
          type: boolean
          description: >-
            Convert HTML to raw text before processing to avoid adding noise to
            the vector embeddings. By default this is true. If you are using
            HTML content that you want to be included in the vector embeddings,
            set this to false.
          nullable: true
        group_ids:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            Group ids are the ids of the groups that the chunk should be placed
            into. This is useful for when you want to update a chunk and add it
            to a group or multiple groups in one request.
          nullable: true
        group_tracking_ids:
          type: array
          items:
            type: string
          description: >-
            Group tracking_ids are the tracking_ids of the groups that the chunk
            should be placed into. This is useful for when you want to update a
            chunk and add it to a group or multiple groups in one request.
          nullable: true
        link:
          type: string
          description: >-
            Link of the chunk you want to update. This can also be any string.
            Frequently, this is a link to the source of the chunk. The link
            value will not affect the embedding creation. If no link is
            provided, the existing link will be used.
          nullable: true
        metadata:
          description: >-
            The metadata is a JSON object which can be used to filter chunks.
            This is useful for when you want to filter chunks by arbitrary
            metadata. Unlike with tag filtering, there is a performance hit for
            filtering on metadata. If no metadata is provided, the existing
            metadata will be used.
          nullable: true
        time_stamp:
          type: string
          description: >-
            Time_stamp should be an ISO 8601 combined date and time without
            timezone. It is used for time window filtering and recency-biasing
            search results. If no time_stamp is provided, the existing
            time_stamp will be used.
          nullable: true
        tracking_id:
          type: string
          description: >-
            Tracking_id of the chunk you want to update. This is required to
            match an existing chunk.
        weight:
          type: number
          format: double
          description: >-
            Weight is a float which can be used to bias search results. This is
            useful for when you want to bias search results for a chunk. The
            magnitude only matters relative to other chunks in the chunk's
            dataset dataset. If no weight is provided, the existing weight will
            be used.
          nullable: true
    ErrorResponseBody:
      type: object
      required:
        - message
      properties:
        message:
          type: string
      example:
        message: Bad Request
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

````