POST
/datasets/tagsCreate a knowledge base tag
Creates a tag for organizing knowledge bases. Supply a unique name between 1 and 50 characters to create the tag.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
The name of the knowledge base tag to create.
namestringrequired
Tag name. Must be unique within the workspace.
200Returns the created tag object, including its identifier, display name, type, and binding count.
binding_countstringoptional
Number of knowledge bases bound to this tag.
idstringoptional
Tag identifier.
namestringoptional
Tag display name.
typestringoptional
Tag type. Always `knowledge` for knowledge base tags.
400Returned when a knowledge tag with the requested name already exists.
One documented failure
invalid_paramTag name already exists
invalid_param
403Returned when the API key is scoped to specific knowledge bases and does not have access to all knowledge bases.
One documented failure
forbiddenThe API key is not authorized to access this knowledge base.
forbidden (key scope)
Error handling
A 400 is returned when name duplicates an existing knowledge tag. A 403 is returned when the API key is scoped to specific knowledge bases and does not have access to all knowledge bases. name is required and must be between 1 and 50 characters.