To access our API documentation click here.
API Variables
Script variables make it easy to personalise your templates when you call them through our API or Zapier. A common example of a variable would be a script that uses a person's name or company name obtained from a website form or your CRM.
How to Add Variables
The variable syntax is simple:
{{variable_name}}
You can even define a default value (for cases where the variable is not provided):
{{variable_name}}{{^variable_name}}default_value{{/variable_name}}
Example script with 2 variables (without default values):
Hello {{name}}! I thought you might be interested in {{use_case}}.
Please reply if you have any questions.
Example script with 2 variables (with default values):
Hello {{name}}{{^name}}there{{/name}}!
I thought you might be interested in {{use_case}}{{^use_case}}our product line{{/use_case}}.
Please reply if you have any questions.
How to Use the Whole Script as a Variable
If you plan to call the API with a more dynamic script, you can easily convert your entire script into a variable. Just type the variable name in the script field and that's it.
Example script with script variable name as variable:
{{script}}
Where Can You Use Text Variables?
script
title
description