# Update Brand Glossary

Updates an existing brand glossary with specified changes. 

<Callout icon="📘" theme="info">
  **Note:**

  * All request fields are **optional**. Only the fields that need to be modified should be included in the request body.
  * Updating a field overwrites its existing values. To retain previous entries, include them again in the update request.
  * The response returns the complete Brand Glossary object, including both updated and unchanged fields.
  * Scroll down to the **Responses** section below and expand the status code(s) to view the detailed response schema.
  * Refer to the **RESPONSE** section on the right and choose an example to see how the API response appears for each status code.
</Callout>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "heygen-api",
    "version": "4.0.8"
  },
  "servers": [
    {
      "url": "https://api.heygen.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header",
        "x-default": "<your-api-key>"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/brand_voice/{brand_voice_id}": {
      "post": {
        "summary": "Update Brand Voice",
        "description": "Updates an existing brand voice with specified changes. Only the fields that need to be modified should be included in the request body.",
        "operationId": "update-brand-voice",
        "parameters": [
          {
            "name": "brand_voice_id",
            "in": "path",
            "description": "Unique identifier of the brand glossary to update. Can be retrieved from <a href= \"https://docs.heygen.com/reference/list-brand-voices\" target=\"_blank\"> List Brand Voices </a> endpoint. ",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New name for the brand glossary. "
                  },
                  "blacklist": {
                    "type": "array",
                    "description": "List of words or phrases that should not be translated or modified. Typically includes brand names, proper nouns, or other protected terms (e.g., \"HeyGen\", \"John Smith\"). ",
                    "items": {
                      "type": "string"
                    }
                  },
                  "whitelist": {
                    "type": "array",
                    "description": "List of word pairs where each pair defines a source word and its enforced translation or form (e.g., [\"Machine Learning\", \"ML\"], [\"Artificial Intelligence\", \"AI\"])",
                    "items": {
                      "type": "string"
                    }
                  },
                  "tones": {
                    "type": "array",
                    "description": "List of tone keywords to influence how the voice speaks or how the translations are rendered (e.g., \"professional\", \"friendly\"). ",
                    "items": {
                      "type": "string"
                    }
                  },
                  "vocabulary": {
                    "type": "array",
                    "description": "List of word pairs that define custom pronunciations or phonetic spellings. Each pair includes the original word and its pronunciation. (e.g., [\"HeyGen\", \"Hey-jen\"], [\"GIF\", \"JIF\"])",
                    "items": {
                      "type": "string"
                    }
                  },
                  "tone": {
                    "type": "string",
                    "description": "Overall style, attribute, or manner of speech for the glossary. Guides how text is spoken or translated."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Brand glossary updated successfully - Expand to view the detailed response schema.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"error\": null,\n    \"data\": {\n        \"list\": [\n            {\n                \"name\": \"Updated Brand Glossary\",\n                \"blacklist\": [\n                    \"Google\",\n                    \"Heygen\", \n                ],\n                \"whitelist\": [\n                    [\n                        \"ML\",\n                        \"Machine Learning\"\n                    ],\n                    [\n                        \"Artificial Intelligence\",\n                        \"AI\"\n                    ]\n                ],\n                \"tones\": [],\n                \"vocabulary\": [\n                    [\n                        \"Wednesday\",\n                        \"WENZ-day\"\n                    ],\n                    [\n                        \"GIF\",\n                        \"JIF\"\n                    ]\n                ],\n                \"tone\": null,\n                \"id\": \"l2tf4af96b5e4f4eae42e0d7d90109bd\"\n            }\n        ],\n        \"total\": 2,\n        \"token\": \"beJpZCI6ICJiNWHmNGFmOTZiNWU0ZjRlv5T8imUwZDhkOTAzMDliZCIsICJjcmVhdGVkX3RzIjogIjIwMpotKL9AtMTYgMTY6MDU6MjkifL==\"\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Displays error message when the request fails; null if the request is successful."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Updated name for the brand glossary (if provided). "
                        },
                        "blacklist": {
                          "type": "array",
                          "description": "Updated list of words or phrases that should not be translated or modified (if provided). ",
                          "items": {
                            "type": "string"
                          }
                        },
                        "whitelist": {
                          "type": "array",
                          "description": "Updated list of word pairs where each pair defines a source word and its enforced translation or form (if provided).",
                          "items": {
                            "type": "string"
                          }
                        },
                        "tones": {
                          "type": "array",
                          "description": "Updated list of tone keywords to influence how the voice speaks or how the translations are rendered (if provided).",
                          "items": {
                            "type": "string"
                          }
                        },
                        "vocabulary": {
                          "type": "array",
                          "description": "List of word pairs that define custom pronunciations or phonetic spellings. Each pair includes the original word and its pronunciation (if provided).",
                          "items": {
                            "type": "string"
                          }
                        },
                        "tone": {
                          "type": "string",
                          "description": "Updated style, attribute, or manner of speech for the glossary (if provided). "
                        },
                        "id": {
                          "type": "string",
                          "description": "Unique identifier of the brand glossary."
                        }
                      },
                      "description": "Contains the updated brand glossary. "
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "<ul><li>Invalid parameters:<ul><li><code>whitelist</code> is invalid.</li><li><code>vocabulary</code> is invalid.</li></ul></li></ul>",
            "content": {
              "application/json": {
                "examples": {
                  "Whitelist is Invalid": {
                    "value": "// This error occurs when the whitelist parameter includes more than two items in a tupple. \n// To provide the correct value, refer to the example format in the Body Params section. \n\n{\n  \"data\": null,\n  \"error\": {\n    \"code\": \"invalid_parameter\",\n    \"message\": \"whitelist.0 is invalid: Tuple should have at most 2 items after validation, not 3\"\n  }\n}",
                    "summary": "Whitelist is Invalid"
                  },
                  "Vocabulary is Invalid": {
                    "summary": "Vocabulary is Invalid",
                    "value": "// This error occurs when the whitelist parameter includes more than two items in a tupple. \n// To provide the correct value, refer to the example format in the Body Params section. \n\n{\n  \"data\": null,\n  \"error\": {\n    \"code\": \"invalid_parameter\",\n    \"message\": \"vocabulary.0 is invalid: Tuple should have at most 2 items after validation, not 4\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```