Skip to main content
patch/datasets/{dataset_id}/metadata/{metadata_id}
Request example
Response
patch/datasets/{dataset_id}/metadata/{metadata_id}

Authorization

Authorizationstringheaderrequired#

Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).

Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).

Path parameters

dataset_idstringrequired#
Knowledge base ID, from List Knowledge Bases. For a scoped key, copy the ID from the Dify URL.
metadata_idstringrequired#
ID of the metadata field to rename. See List Metadata Fields.

Body

application/json
namestringrequired#
New name for the field. Must be unique among the knowledge base's fields and at most 255 characters.

Responses

application/json
Metadata field updated successfully.
idstring#
Metadata field identifier.
namestring#
Metadata field name.
typestring#
Metadata field type.