> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zixflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Template Variables

#### Query Params

<ParamField query="phoneId" type="string" required placeholder="Enter phone ID (Not Phone Number)">
  This is the unique identifier associated with the sender's phone number given
  by WhatsApp. Find the Phone ID on the Zixflow WhatsApp Settings page next to
  the number. [Whatsapp
  Settings](https://app.zixflow.com/campaign/settings/whatsapp)
</ParamField>

<ParamField query="templateName" placeholder="Enter Template Name" type="string" required>
  Refers to the name of the template to be used for the message, e.g.,
  "welcome\_message."
</ParamField>

<ParamField query="language" placeholder="Enter Template Language" type="string" required>
  Specifies the language for the message, e.g., "en" for English.
</ParamField>

#### Response

<ResponseField name="status" type="boolean">
  Indicates whether the call was successful. true if successful, false if not.
</ResponseField>

<ResponseField name="message" type="string">
  success or error response message
</ResponseField>

<ResponseField name="data" type="array_object">
  The contents of uploaded file

  <Expandable title="data">
    <ResponseField name="label" type="string">
      It defines variable label from the template
    </ResponseField>

    <ResponseField name="keyName" type="integer">
      This defines the essential key names that must be used when specifying values for this variable in the WhatsApp API.
    </ResponseField>

    <ResponseField name="type" type="string">
      It defines type of value

      | type          | sample value     |
      | ------------- | ---------------- |
      | IMAGE\_URL    | `<image-url>`    |
      | VIDEO\_URL    | `<video-url>`    |
      | DOCUMENT\_URL | `<document-url>` |
      | TEXT          | `<text>`         |
      | OTP           | `<otp>`          |
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cUrl theme={null}
  curl --location --request GET 'https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en' \
  --header 'Authorization: Bearer {{zixflow_api_key}}'
  ```

  ```js Nodejs theme={null}
  var axios = require("axios");

  var config = {
    method: "get",
    url: "https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en",
    headers: {
      Authorization: "Bearer {{zixflow_api_key}}",
    },
  };

  axios(config)
    .then(function (response) {
      console.log(JSON.stringify(response.data));
    })
    .catch(function (error) {
      console.log(error);
    });
  ```

  ```py Python theme={null}
  import requests

  url = "https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en"

  payload={}
  headers = {
    'Authorization': 'Bearer {{zixflow_api_key}}'
  }

  response = requests.request("GET", url, headers=headers, data=payload)

  print(response.text)

  ```

  ```java JAVA theme={null}
  OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
  Request request = new Request.Builder()
    .url("https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en")
    .method("GET", null)
    .addHeader("Authorization", "Bearer {{zixflow_api_key}}")
    .build();
  Response response = client.newCall(request).execute();
  ```

  ```dart DART theme={null}
  var headers = {
    'Authorization': 'Bearer {{zixflow_api_key}}'
  };
  var request = http.Request('GET', Uri.parse('https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en'));

  request.headers.addAll(headers);

  http.StreamedResponse response = await request.send();

  if (response.statusCode == 200) {
    print(await response.stream.bytesToString());
  }
  else {
    print(response.reasonPhrase);
  }

  ```
</RequestExample>

<ResponseExample>
  ```json 200-Success theme={null}
  {
    "status": true,
    "message": "Success",
    "data": [
      {
        "label": "Header Image",
        "keyName": "image",
        "type": "IMAGE_URL"
      },
      {
        "label": "Body 1",
        "keyName": "body_1",
        "type": "TEXT"
      }
    ]
  }
  ```

  ```json 400-Bad Request theme={null}
  {
    "status": false,
    "message": "file size exceeded"
  }
  ```

  ```json 401-Unauthorised theme={null}
  {
    "status": false,
    "message": "No token provided"
  }
  ```
</ResponseExample>
