---
title: Variable declarations
description: Explains how to declare a promotion variable, associating a defined variable with the resource attributes used during a PingOne promotion
component: pingone-api
page_id: pingone-api:platform:configuration-management/promotion-variables/variable-declarations/index
canonical_url: https://developer.pingidentity.com/pingone-api/platform/configuration-management/promotion-variables/variable-declarations/index.html
llms_txt: https://developer.pingidentity.com/pingone-api/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2026-08-11
section_ids:
  variable-declarations: Variable declarations data model
---

# Variable declarations

Before you can declare a variable (POST `{{apiPath}}/v1/environments/{{envID}}/promotionVariableDeclarations`), you need to define the variable that you intend to use. The declaration associates the variable defined with the correct attributes for the resource used for the promotion. See [Variable Definitions](../variable-definitions/index.html) for more information.

|   |                                                                                                                                                                                                                                                                                                                                                                      |
| - | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | When creating or updating promotion variable declarations, if the bound resource attribute is classified as sensitive (such as for client secrets or passwords), the associated variable definition in the target environment must also be marked as sensitive (the `isSensitive` attribute set to `true`). If it is not, the request fails with a validation error. |

## Variable declarations data model

| Property                                      | Type      | Required | Mutable   | Description                                                                                                                                                                                                                                                                               |
| --------------------------------------------- | --------- | -------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `createdAt`                                   | Date      | N/A      | Read-only | The date and time at which the resource was created (ISO 8601 format).                                                                                                                                                                                                                    |
| `resource`                                    | Object    | Required | Mutable   | Contains the UUID of the configuration resource.                                                                                                                                                                                                                                          |
| `resource.category`                           | String    | Required | Mutable   | The category of the configuration resource.                                                                                                                                                                                                                                               |
| `resource.id`                                 | String    | Required | Mutable   | The UUID of the configuration resource.                                                                                                                                                                                                                                                   |
| `resource.name`                               | String    | Required | Mutable   | The name of the configuration resource.                                                                                                                                                                                                                                                   |
| `targetEnvironmentMissingVariableDefinitions` | String\[] | Optional | Mutable   | The list of variable definitions that are missing in the target environment.                                                                                                                                                                                                              |
| `updatedAt`                                   | Date      | N/A      | Read-only | The date and time at which the resource was last updated (ISO 8601 format).                                                                                                                                                                                                               |
| `variables`                                   | Map       | Required | Mutable   | A mapping of configuration resource properties to the `name` values of defined variables. Each value must use the format `${promotionVariable: name}` where `name` is a valid variable name. Each key must be an updatable attribute for the resource category. This Map cannot be empty. |
