# Update Controlled Vocabulary Update a Controlled Vocabulary. User must have permission to update a controlled vocabulary. In response, it will contain the object of metadata definition attributes like id, name, type and search fields etc. Average Response Time: 1462ms (Add Controlled Vocabulary (CV) value) Average Response Time: 716ms (Update a CV value ) Endpoint: PATCH /metadata/vocabulary/{id} Version: 1.5 Security: ApiKeyAuth, BasicAuth ## Header parameters: - `X-API-Key` (string, required) Customer-specific API key required to invoke API. - `Authorization` (string, required) Provided by Authentication Token creation operation - `Content-Type` (string, required) Enum: "application/json" ## Path parameters: - `id` (string, required) Specify a Controlled Vocabulary ID. ## Request fields (application/json): - `name` (string) New name of the Controlled Vocabulary Example: "Hooli Employees" - `add` (array) JSON Array with new values to add into the Controlled Vocabulary Example: ["Jared Dunn"] - `update` (array) Payload to update existing values by their IDs Example: [{"valueId":"2926d594-9c03-4aa1-91a8-76a0b6e67e4f","valueName":"Richard Hendricks"}] - `update.valueId` (string) - `update.valueName` (string) - `delete` (array) JSON array with the value IDs to delete from Controlled Vocabulary Example: ["e1dd92fa-ed3a-4038-b837-c7f4d6395f16"] ## Response 200 fields (application/json): - `name` (object) Returned when the Controlled Vocabulary name is changed (name operation in the request). - `name.metadataDefinitionId` (string) Controlled Vocabulary (metadata definition) ID Example: "83559f3a-93a8-4eba-a709-0bca6497450e" - `name.metadataDefinitionName` (string) Controlled Vocabulary name Example: "Hooli Employees" - `name.metadataDefinitionSearchField` (string) Mapped search field for this metadata definition Example: "hooli_employees" - `name.metadataDefinitionType` (string) Metadata definition type Example: "controlledVocabulary" - `name.customerId` (string) Customer ID Example: "1739271540099" - `name.createdBy` (string) ID of the user who created the Controlled Vocabulary Example: "dc63db1b-1e63-43bc-877e-418931b6895c" - `name.createdEpoch` (integer) Create time in milliseconds Example: 1781815426034 - `name.lastUpdatedBy` (string) ID of the user who last updated the Controlled Vocabulary Example: "dc63db1b-1e63-43bc-877e-418931b6895c" - `name.lastUpdatedEpoch` (integer) Update time in milliseconds Example: 1781815985807 - `name.metadataDocument` (object) Vocabulary metadata - `name.metadataDocument.values` (array) - `name.metadataDocument.values.valueId` (string) - `name.metadataDocument.values.valueName` (string) Example: "Red" - `name.metadataDocument.searchable` (boolean) Toggle searchability - `name.securityTemplateIds` (array) Security Template IDs associated with the Controlled Vocabulary - `add` (object) Returned when new values are added (add operation in the request). - `update` (object) Returned when existing values are updated (update operation in the request). - `delete` (object) Returned when values are deleted (delete operation in the request). ## Response 400 fields (application/json): - `message` (string) - `detail` (string) ## Response 403 fields (application/json): - `message` (string) - `detail` (string) ## Response 404 fields (application/json): - `message` (string) - `detail` (string)