# Create global variable
You can create a global variable. It’s possible to use it as a snippet tag across many email templates, chat messages, etc.
POST
/global-variables/
Attributes | Type | Required | Description |
---|---|---|---|
author | integer | no | A unique identifier of an agent who created a global variable. A visible author. |
integer_content | integer | no | An integer value of a global variable. |
name | string | yes | A global variable name. |
text_content | string | no | A text value of a global variable. Can be used to store HTML code, string, or JSON. |
language | string | no | ISO 639-1 code of the language. |
parent | integer | no | An id of the parent global variable. |
custom_id | string | no | The unique identifier for the global variable which is provided by the client. |
# Request
- CURL
- JavaScript
- PHP
- Python
curl -X POST -H "Authorization: Token <your_64_char_api_key>"
-H "Accept: */*; version=2" -H "Content-Type: application/json" -d '{
"name": "Some global variable"
"text_content": "January Promotions"
"author": 1
}' "https://<your_app_subdomain>.user.com/api/public/global-variables/"
# Response
{
"id": 1,
"name": "Promotion Title",
"name_std": "promotion_title",
"language": null,
"integer_content": "",
"text_content": "January Promotions",
"author": 116,
"created_at":"2019-01-24T09:00:15.800900Z",
"updated_at":"2019-01-24T09:00:15.801042Z",
"author": 1,
"parent": null
},