Delete a metadata template

Delete a metadata template

Deleting a metadata template can be achieved by calling the DELETE /metadata_templates/enterprise/:templateKey/schema API.

curl -i -X DELETE "" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
MetadataTemplate.deleteMetadataTemplate(api, "enterprise", "templateName");
client.metadata_template('enterprise', 'employeeRecord').delete()
client.metadata.deleteTemplate('enterprise', 'testtemplate', callback);
    scope: "enterprise",
    templateKey: "personnelRecord"
) { (result: Result<Void, BoxSDKError>) in
    guard case .success = result {
        print("Error deleting metadata template")

    print("Metadata template deleted")

This API returns a 204 No Content API response with no response body when the template has been successfully deleted. This API also removes all the template instances from any files and folders.

Only templates created within the enterprise scope can be deleted.

Admin permissions required

Deleting metadata templates is restricted to users with admin permission. This means that only admins, or co-admins who have been granted rights to Create and edit metadata templates for your company by the admin can use the web app or the API to manage templates.