---
title: "List the variables of a campaign"
method: GET
path: "/v1/campaigns/{campaignId}/variables"
tags: ["Campaigns"]
---

# List the variables of a campaign

`GET /v1/campaigns/{campaignId}/variables`

## Request

- Base URL: `https://api.folk.app`
- URL: `https://api.folk.app/v1/campaigns/{campaignId}/variables`
- Auth: HTTP bearer

Retrieve a paginated list of the `{{variables}}` a campaign's subjects and bodies can use: the fields of its people or companies, the text and numeric custom fields of its group, `{{unsubscribeLink}}` and `{{signature}}`. Write each `token` as given. A variable without a value for a recipient is removed from their message. `{{signature}}` inserts the sender's signature on a new step or message, as listed by `GET /v1/message-senders`: end a body with `<p>{{signature}}</p>` to sign it, rather than writing the signature yourself.<br/><Warning>This endpoint is currently in open beta. The API surface may change as we iterate based on feedback.</Warning>

## Path parameters

- `campaignId` string, required

## Query parameters

- `limit` integer
- `cursor` string

## Response `200`

A page of the variables the campaign can use.

- object
  - `data` object, required
    - `items` CampaignVariable[], required
      - `token` string, required: The exact text to write in a subject or body, with `\`, `|`, `}` and leading or trailing whitespace of a custom field name escaped by a backslash.
      - `key` string, required: The path of the value in the person or company, unescaped. A custom field is addressed by its group and its name.
      - `label` string, required: The name of the variable in the app.
      - `source` 'native' | 'customField' | 'unsubscribeLink' | 'signature', required: Where the value comes from. `native`: a field of the person or company. `customField`: a custom field of the campaign group. `unsubscribeLink`: only valid as the whole `href` of a link in a body, `<a href="{{unsubscribeLink}}">`, with a `custom_domain` sender. `signature`: the step's signature, only valid alone in the last paragraph of a body, `<p>{{signature}}</p>`; it inserts the sender's signature on a new step or message.
      - `type` 'text' | 'numeric' | 'date' | 'url', required: The type of the value. For a field holding several values, the variable takes the first one.
      - `group` object: The group of a `customField` variable.
        - `id` string, required: The ID of the group of the custom field.
        - `name` string, required: The name of the group of the custom field.
    - `pagination` object, required
      - `nextLink` string
  - `deprecations` string[]

## Other responses

- `400`: The request was unacceptable, often due to missing an invalid parameter.
- `401`: No valid API key provided.
- `403`: The API key doesn’t have permissions to perform the request.
- `404`: The requested resource doesn’t exist.
- `422`: The request was unacceptable, often due to missing or invalid parameters.
- `429`: Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.
- `500`: Something went wrong on our end.
- `503`: The server is overloaded or down for maintenance.

## Changes

- **2026-11-03** `c6818f3ba60d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/folk/apis/folk-external-api/changes/v1/campaigns/:campaignId/variables/get.md)

---

[API](https://skmtc.dev/folk/apis/folk-external-api.md) - [All operations](https://skmtc.dev/folk/apis/folk-external-api/llms.txt) - [OpenAPI document](https://skmtc.dev/folk/apis/folk-external-api/revisions/c6818f3ba60d?raw)
