## List template variables

`sequence.list_template_variables()  -> SequenceListTemplateVariablesResponse`

**get** `/v1/sequences/template/variables`

Lists the variables a sequence template may use: the first and last name, the contact’s and its first account’s fields of a type a message can print, and the sender’s name and email. Use an entry’s `ref` in a send step’s subject or body. A variable needs a fallback for contacts missing the value: `{{ {attr:ad_…} }}` is written `{{ coalesce({attr:ad_…}, "fallback") }}`, and one without a fallback is refused when the draft is saved. Anything else inside `{{ }}` is refused too.

**[Required scopes](/using-the-api/scopes/):** `sequences:read`, `contacts:read` and `accounts:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

### Returns

- `class SequenceListTemplateVariablesResponse: …`

  - `data: List[Data]`

    - `field: Optional[DataField]`

      The field the variable reads; null for built-in variables.

      - `id: str`

        The `ad_` id of the field, as the field-definitions endpoints list it.

      - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 12 more]`

        Type of the field.

        - `"ADDRESS"`

        - `"CHECKBOX"`

        - `"CURRENCY"`

        - `"DATETIME"`

        - `"EMAIL"`

        - `"FULL_NAME"`

        - `"MARKDOWN"`

        - `"MULTI_SELECT"`

        - `"NUMBER"`

        - `"SINGLE_SELECT"`

        - `"SOCIAL_HANDLE"`

        - `"TELEPHONE"`

        - `"TEXT"`

        - `"URL"`

        - `"HTML"`

    - `group: Literal["contact", "account", "sender"]`

      Whose value the variable prints: the enrolled contact, its first account, or the step’s sender.

      - `"contact"`

      - `"account"`

      - `"sender"`

    - `label: str`

      Name of the variable, as the editor shows it.

    - `ref: str`

      The variable, e.g. `{{ {attr:ad_…} }}`. A variable needs a fallback for contacts missing the value: `{{ {attr:ad_…} }}` is written `{{ coalesce({attr:ad_…}, "fallback") }}`, and one without a fallback is refused when the draft is saved.

  - `object: Literal["list"]`

    - `"list"`

  - `total_count: int`

### Example

```python
from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
sequence_list_template_variables_response = client.sequence.list_template_variables()
print(sequence_list_template_variables_response.data)
```

#### Response

```json
{
  "data": [
    {
      "field": {
        "id": "id",
        "valueType": "ADDRESS"
      },
      "group": "contact",
      "label": "label",
      "ref": "ref"
    }
  ],
  "object": "list",
  "totalCount": -9007199254740991
}
```
