Templates
Set Template Variables
Changed onReplaces a template's full set of variables: any variable you omit is removed. Media, character and voice variables bind to a node by element_id, listed under composition in GET /v3/templates/{template_id}. A text variable with match turns that text into a {{name}} placeholder.
put/v3/templates/{template_id}/variables
Request
- Base URLhttps://api.heygen.com
- URLhttps://api.heygen.com/v3/templates/{template_id}/variables
- Auth
- API key in header x-api-key
- or HTTP bearer
Path parameters
template_idstring required
Unique template identifier
Request body
Example request
{
"expected_edit_version": "3",
"variables": {
"company": {
"match": "Acme",
"type": "text"
},
"first_name": {
"element_ids": [
"t81c0d4b"
],
"match": "John",
"type": "text"
},
"hero_image": {
"element_id": "i77e5f60",
"type": "image"
},
"narration_voice": {
"element_id": "t81c0d4b",
"type": "voice"
},
"presenter": {
"element_id": "a3f9c2e1",
"type": "character"
}
}
}Response
Successful response
Changes
- info
endpoint added
- info