---
title: "Update reference table"
method: PATCH
path: "/api/v2/reference-tables/tables/{id}"
tags: ["Reference Tables"]
---

# Update reference table

`PATCH /api/v2/reference-tables/tables/{id}`

Update a reference table by ID. You can update the table's data, description, and tags. Note: The source type cannot be changed after table creation. For data updates: For existing tables of type `source:LOCAL_FILE`, call POST api/v2/reference-tables/uploads first to get an upload ID, then PUT chunks of CSV data to each provided URL, and finally call this PATCH endpoint with the upload_id in file_metadata. For existing tables with `source:` types of `S3`, `GCS`, or `AZURE`, provide updated access_details in file_metadata pointing to a CSV file in the same type of cloud storage.

## Path parameters

- `id` string, required

## Request body

- PatchTableRequest — Request body for updating an existing reference table.
  - `data` PatchTableRequestData — The data object containing the partial table definition updates.
    - `attributes` PatchTableRequestDataAttributes — Attributes that define the updates to the reference table's configuration and properties.
      - `description` string — Optional text describing the purpose or contents of this reference table.
      - `file_metadata` union — Metadata specifying where and how to access the reference table's data file.
        - PatchTableRequestDataAttributesFileMetadataCloudStorage — Cloud storage file metadata for patch requests. Allows partial updates of access_details and sync_enabled.
          - `access_details` PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails — Cloud storage access configuration for the reference table data file.
            - `aws_detail` PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail — Amazon Web Services S3 storage access configuration.
              - …
            - `azure_detail` PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail — Azure Blob Storage access configuration.
              - …
            - `gcp_detail` PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail — Google Cloud Platform storage access configuration.
              - …
          - `sync_enabled` boolean — Whether this table is synced automatically.
        - PatchTableRequestDataAttributesFileMetadataLocalFile — Local file metadata for patch requests using upload ID.
          - `upload_id` string, required — The upload ID.
      - `schema` PatchTableRequestDataAttributesSchema — Schema defining the updates to the structure and columns of the reference table. Schema fields cannot be deleted or renamed.
        - `fields` PatchTableRequestDataAttributesSchemaFieldsItems[], required — The schema fields.
          - `name` string, required — The field name.
          - `type` 'STRING' | 'INT32', required — The field type for reference table schema fields.
        - `primary_keys` string[], required — List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows. Primary keys cannot be changed after table creation.
      - `tags` string[] — Tags for organizing and filtering reference tables.
    - `type` 'reference_table', required — Reference table resource type.

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/versions/da68bf029e4c/schema)
