---
title: "Get published email template parameters"
canonical: "https://bird.com/docs/api/reference/get-email-template-parameters"
---

# Get published email template parameters

`GET /v1/email/templates/{template_ref}/parameters`

Get the parameters and variables used by the template's published content in one language. The result describes the template and holds no saved values. Parameters are the names a broadcast supplies in `template.parameters`, and variables are the `bird.` references Bird fills in. The result identifies list values, which broadcast parameters cannot supply. It also includes a fingerprint that identifies the published content without exposing contact values. You cannot select an older template version. Requires email_marketing read permission in addition to email_management read. Parameter sites cover template subject, HTML and text; envelope overrides are checked by broadcast validation.

## Code samples

**TypeScript**

```ts
const discovery = await bird.email.templates.parameters(
  "emt_01krdgeqcxet5s7t44vh8rt9mg",
);
console.log(discovery.parameters, discovery.variables);
```

Examples: [TypeScript](/docs/api/reference/get-email-template-parameters.ts.md) · [Python](/docs/api/reference/get-email-template-parameters.py.md) · [Go](/docs/api/reference/get-email-template-parameters.go.md) · [PHP](/docs/api/reference/get-email-template-parameters.php.md) · [CLI](/docs/api/reference/get-email-template-parameters.cli.md) · [MCP](/docs/api/reference/get-email-template-parameters.mcp.md) · [cURL](/docs/api/reference/get-email-template-parameters.curl.md)

## Example response `200`

```json
{
  "template_id": "emt_01krdgeqcxet5s7t44vh8rt9mg",
  "observed_version_id": "emv_01krdgeqcxet5s7t44vh8rt9mg",
  "requested_language": "pt-BR",
  "effective_language": "pt-BR",
  "parameters": [
    {
      "name": "offer",
      "type": "text",
      "value_domain": "scalar",
      "use_constraints": [
        {
          "kind": "value",
          "site": "html"
        }
      ]
    }
  ],
  "variables": [
    {
      "path": "bird.contact.first_name",
      "source": "contact",
      "use_constraints": [
        {
          "kind": "value",
          "site": "html"
        }
      ]
    }
  ]
}
```

## Path parameters

- `template_ref` (string): Workspace template ID, workspace template slug, or built-in template slug.

## Query parameters

- `language` (string): Language of the template's published content. Omission uses the template's default language.

## Response body

- `template_id` (string, required): The template that was read.
- `observed_version_id` (string, required): The published template version that was read.
- `requested_language` (string): The language requested with `language`. Absent when none was requested and the published version's default language is used.
- `effective_language` (string, required): The language whose content was read.
- `requirements_fingerprint` (string, required): An opaque value that changes when this content or the parameters and variables it uses change, including for built-in templates whose version ID stays the same. Compare it with an earlier value to tell whether they are still the same. Do not parse it.
- `parameters` (array of object, required): The parameters the broadcast supplies, sorted by name.
- `parameters.name` (string, required): The parameter name to use as a key in `template.parameters`.
- `parameters.type` (string, required)

  The value type the template declares for a parameter. A broadcast can still supply any scalar value; see `value_domain`.

  - `text`: any value. A parameter the template uses without declaring it is reported as a required `text` parameter.
  - `code`: 4 to 8 digits.
  - `ttl`: a whole number from 1 to 999.
  - `count`: a whole number from 1 to 999.
  - `ref`: up to 16 uppercase letters, digits or hyphens.
  - `date`: an ISO 8601 date (YYYY-MM-DD).
  - `date_time`: an ISO 8601 date and time, with an optional offset.
  - `amount`: a decimal amount in major units, with up to 4 decimal places.
  - `currency`: an ISO 4217 currency code of 3 uppercase letters.

  Possible values (may grow over time): `text`, `code`, `ttl`, `count`, `ref`, `date`, `date_time`, `amount`, `currency`
- `parameters.value_domain` (string, required)

  The shape of value a broadcast may supply for a parameter, independent of the declared `type`.

  - `scalar`: a string, number, boolean or null, used as given.

  Possible values (may grow over time): `scalar`
- `parameters.required` (boolean, required): Whether the template declares the parameter required.
- `parameters.sensitive` (boolean): Whether the template marks the parameter sensitive. A broadcast cannot supply a sensitive parameter that its content uses.
- `parameters.use_constraints` (array of object, required): Each place the content uses the parameter.
- `parameters.use_constraints.kind` (string, required)

  How the template uses a parameter or variable at one place in its content.

  - `value`: the template outputs or compares the value.
  - `iterable`: the template loops over the value.

  Possible values (may grow over time): `value`, `iterable`
- `parameters.use_constraints.site` (string, required)

  The part of the published content where a parameter or variable is used.

  - `subject`: the subject line.
  - `html`: the HTML body, including its inbox preview text.
  - `text`: the plain-text body.

  Possible values (may grow over time): `subject`, `html`, `text`
- `parameters.use_constraints.path` (string): The parameter or variable path the template reads at this place, such as `offer` or `bird.contact.first_name`.
- `parameters.use_constraints.operation` (string): How the template uses the parameter or variable here, passed through from the template. `output` means it writes the value; other values name the Liquid tag that reads it, such as `if`, `case`, `for` or `assign`.
- `variables` (array of object, required): The `bird.` variables Bird fills in, sorted by path.
- `variables.path` (string, required): The variable as the template writes it, such as `bird.contact.first_name`.
- `variables.source` (string, required)

  Where Bird takes the value of a `bird.` variable from.

  - `contact`: a property of the recipient contact, read from `bird.contact.`.
  - `bird`: another value Bird fills in when it sends, such as `bird.unsubscribe_url`.

  Possible values (may grow over time): `contact`, `bird`
- `variables.source_type` (string): The type of the contact property, from this workspace's current contact property definitions, such as `string`. Absent when the variable is not a defined contact property.
- `variables.use_constraints` (array of object): Each place the content uses the variable.
- `variables.use_constraints.kind` (string, required)

  How the template uses a parameter or variable at one place in its content.

  - `value`: the template outputs or compares the value.
  - `iterable`: the template loops over the value.

  Possible values (may grow over time): `value`, `iterable`
- `variables.use_constraints.site` (string, required)

  The part of the published content where a parameter or variable is used.

  - `subject`: the subject line.
  - `html`: the HTML body, including its inbox preview text.
  - `text`: the plain-text body.

  Possible values (may grow over time): `subject`, `html`, `text`
- `variables.use_constraints.path` (string): The parameter or variable path the template reads at this place, such as `offer` or `bird.contact.first_name`.
- `variables.use_constraints.operation` (string): How the template uses the parameter or variable here, passed through from the template. `output` means it writes the value; other values name the Liquid tag that reads it, such as `if`, `case`, `for` or `assign`.

## Related resources

- [Should I use a Bird SDK or call the API directly?](/explained/platform/should-i-use-an-sdk-or-call-the-api-directly) (answer)
- [Build your first integration](/learn/paths/integration) (course)
- [Send your first email](/docs/get-started/send-your-first-email) (docs)

[Get an implementation brief](/learn/workspace?topic=api-basics)
