---
title: "Set source group metadata"
method: PUT
path: "/source-groups/{source_group_id}/metadata"
tags: ["source-groups"]
---

# Set source group metadata

`PUT /source-groups/{source_group_id}/metadata`

Updates metadata for a specific source group. Merges with existing metadata by key. Send val: null to delete a key.

Required scope: \`knowledge:write\`

## Path parameters

- `source_group_id` string, required

## Request body

- SetMetadataRequest
  - `metadata` Metadata, required
    - `records` MetadataRecord[] — List of metadata records. A patch may contain up to 40 items; the merged result is capped at 20.
      - `key` string, required — Metadata key (max 20 characters)
      - `val` unknown, required
      - `type` 'string' | 'integer' | 'float' | 'date' | 'datetime' — Data type of the metadata value

## Response `200`

Successfully set metadata

- Metadata
  - `records` MetadataRecord[] — List of metadata records. A patch may contain up to 40 items; the merged result is capped at 20.
    - `key` string, required — Metadata key (max 20 characters)
    - `val` unknown, required
    - `type` 'string' | 'integer' | 'float' | 'date' | 'datetime' — Data type of the metadata value

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

## Changes

> 71 revisions in range; 18 not diffed.

- **2026-03-31** `756b9db55259` — 1 warning, 1 info
  - added the new `datetime` enum value to the `records/items/type` response property for the response status `200`
  - added the new `datetime` enum value to the request property `metadata/records/items/type`
- **2026-03-11** `0aac262d758d` — 2 breaking, 2 info
  - the response property `records/items/val` became nullable for the status `200`
  - the response property `records/items/type` became optional for the status `200`
  - the request property `metadata/records/items/val` became nullable
  - the request property `metadata/records/items/type` became optional
- **2026-03-05** `f2234c419205` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/qlonolink/apis/qaip-apis/changes/source-groups/:source_group_id/metadata/put.md)

---

[API](https://skmtc.dev/qlonolink/apis/qaip-apis.md) · [All operations](https://skmtc.dev/qlonolink/apis/qaip-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/qlonolink/qaip-apis/revisions/61dc40676905/schema)
