Skip to navigation

Variables API

Overview

The Variables API provides read access to the Variables configured for your AI Agent. Variables store information collected during a conversation, such as an end user’s email or order number, so it can be reused across the AI Agent’s logic.

The API exposes the Variables that appear on the dashboard. Reserved and internal Variables are not returned. For some AI Agents, the API also exposes conversation Variables that the dashboard does not show, and the identifiers channel, chatter_id, end_user_id and conversation_id. It never exposes a client secret, an OAuth token or an internal Variable. Each Variable is identified by an id, which is used to reference it from other resources.

Endpoints

Two read endpoints are available:

  • List Variables (GET /v2/variables): Returns every accessible Variable for the AI Agent.
  • Get a Variable (GET /v2/variables/{id}): Returns a single Variable by its id. An unknown or malformed id, or the id of a Variable that List Variables does not return, returns a 404.

Both endpoints return each Variable as a summary containing its id and name.

Beta: Variable settings

The Variables beta is available only to AI Agents that are enrolled in it. To join the beta, contact your Ada team.

For an enrolled AI Agent, both endpoints also return two fields for each Variable:

  • version: 1 for a Variable whose settings come from its Variable type, 2 for a Variable with its own saved settings.
  • settings: the settings of the Variable, as the Variable editor on the dashboard shows them. The fields are lifetime, kind, redact, set_by and default_value. For a Variable with redact set to true, default_value is always null.

For an enrolled Agent, List Variables is also cursor-paginated:

  • limit sets the number of Variables in one page, from 1 to 100. The default is 25.
  • meta.next_page_url is the URL of the next page. Request it unchanged to get the next page. It is null on the last page.
  • An invalid cursor returns a 400.

For every AI Agent, a limit below 1 or above 100 returns a 400.

Beta fields are marked Beta. in the API reference. Changes to them during the beta are additive only. The beta replaces the earlier decision to expose only the id and name of each Variable.

Responses never include the value of a Variable. To read or set end user values, use the End Users API.

Authentication

Requests are authenticated with a Bearer API key. See Authentication for details on generating and using API keys.