---
title: Variable Declarations
description: 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 for more information.
component: pingone-api-ea
page_id: pingone-api-ea:platform:early-access/configuration-management/promotion-variables/variable-declarations
canonical_url: https://developer.pingidentity.com/pingone-api-ea/platform/early-access/configuration-management/promotion-variables/variable-declarations.html
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.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).                                                                                                                                                                                              |
| `resourceId` | String | Required | Mutable   | The UUID of the configuration resource.                                                                                                                                                                                                                             |
| `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. For example, for an applications resource, you might map the `refreshTokenDuration` property to a variable definition having a `name` value of `refreshTokenDurationVar`. |
