Get inspired at ContentCon. Learn more and register today
Get inspired at ContentCon. Learn more and register today
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.
/
  1. Home
  2. APIs
  3. Automations Management API
  4. Project Variables

Project Variables

markdownView as Markdown

Get all project variables

GEThttps://automations-api.contentstack.com/v1/projects/{project_uid}/variables?limit={limit_value}&skip={skip_value}&asc={field_uid}&desc={field_uid}&include_count={boolean_value}

The Get all project variables request returns comprehensive information of all the project variables defined in a project.

To configure the permissions for your application via OAuth, include the automationhub.variables:read scope.

Note If you do not specify a value for the optional “limit” query parameter, the API request will by default return the initial 100 items.

Sample Response
Status|200 OK
123456789101112131415161718192021222324
{
    "variables": [
        {
            "key": "Key1",
            "value": "1234567",
            "org_id": "blt******5ea6ddf287",
            "project_id": "05732fe9f7d6454791715b09a3792f52",
            "type": "text",
            "created_at": "2024-02-22T11:32:54.440Z",
            "updated_at": "2024-02-22T11:33:09.574Z",
            "id": "fe4c65e93a664948b24854277af477da"
        },
        {
            "key": "Key2",
            "value": "ENC_123456789014;2WjbDeWolmvVJVsm;vjFptQQq3+I/V27Uru97/g==;wKoBGVLgsw==",
            "org_id": "blt******5ea6ddf287",
            "project_id": "05732fe9f7d6454791715b09a3792f52",
            "type": "password",
            "created_at": "2024-02-22T11:33:03.772Z",
            "updated_at": "2024-02-22T11:33:03.772Z",
            "id": "f7bbf2d9cb894b5aa34b3d28603ae174"
        }
    ]
}

Get a single project variable

GEThttps://automations-api.contentstack.com/v1/projects/{project_uid}/variables/{variable_uid}

The Get a single project variable request fetches a specific project variable defined in a project.

To configure the permissions for your application via OAuth, include the automationhub.variables:read scope.

Sample Response
Status|200 OK
12345678910
{
    "key": "Key2",
    "value": "ENC_123456789014;2WjbDeWolmvVJVsm;vjFptQQq3+I/V27Uru97/g==;wKoBGVLgsw==",
    "org_id": "blt******5ea6ddf287",
    "project_id": "05732fe9f7d6454791715b09a3792f52",
    "type": "password",
    "created_at": "2024-02-22T11:33:03.772Z",
    "updated_at": "2024-02-22T11:33:03.772Z",
    "id": "f7bbf2d9cb894b5aa34b3d28603ae174"
}

Create a project variable

POSThttps://automations-api.contentstack.com/v1/projects/{project_uid}/variables

The Create a project variable request lets you create a project variable in a project.

To configure the permissions for your application via OAuth, include the automationhub.variables:write scope.

Sample Request
12345
{
    "key": "Key3",
    "type": "text",
    "value": "password@1234"
}
Sample Response
Status|201 Created
12345678910
{
    "key": "Key3",
    "value": "password@1234",
    "org_id": "blt******5ea6ddf287",
    "project_id": "05732fe9f7d6454791715b09a3792f52",
    "type": "text",
    "created_at": "2024-02-22T13:38:36.439Z",
    "updated_at": "2024-02-22T13:38:36.439Z",
    "id": "bd0ce37910cb4172b844308aa07e6bf7"
}

Update a project variable

PUThttps://automations-api.contentstack.com/v1/projects/{project_uid}/variables/{variable_uid}

The Update a project variable request lets you update the key, value and type of a project variable.

To configure the permissions for your application via OAuth, include the automationhub.variables:write scope.

Sample Request
12345
{
    "key": "Key3",
    "type": "text",
    "value": "abcd@1234"
}
Sample Response
Status|200 OK
12345678910
{
    "key": "Key3",
    "value": "abcd@1234",
    "org_id": "blt******5ea6ddf287",
    "project_id": "05732fe9f7d6454791715b09a3792f52",
    "type": "text",
    "created_at": "2024-02-22T13:38:36.439Z",
    "updated_at": "2024-02-22T13:42:23.560Z",
    "id": "bd0ce37910cb4172b844308aa07e6bf7"
}

Delete a project variable

DELETEhttps://automations-api.contentstack.com/v1/projects/{project_uid}/variables/{variable_uid}

The Delete a project variable request lets you delete a specific project variable from a project.

To configure the permissions for your application via OAuth, include the automationhub.variables:write scope.

Sample Response
Status|200 OK
123
{
    "message": "Project variable deleted successfully."
}
Hide Parameters

URL Parameters

project_uidrequiredstring

Example:

05732fe9f7d6454791715b09a3792f52

Query Parameters

limitoptionalstring
The “limit” parameter will return a specific number of project variables (in between 0-100) in your response based on the value you provide. If there are 100 project variables and you want to fetch only 30 project variables, set the limit as 30.

Example:

30
skipoptionalstring
The “skip” parameter will skip a specific number of project variables and return the remaining ones in your response based on the value you provide. If there are 12 project variables and you want to exclude the first 2 project variables, set this to 2 to fetch the remaining 10 project variables.

Example:

2
ascoptionalstring
The “asc” parameter allows you to sort the list of project variables in the ascending order with respect to the value of a specific field. The project variables can be sorted by created_at and updated_at values.

Example:

created_at
descoptionalstring
The “desc” parameter allows you to sort the list of project variables in the descending order with respect to the value of a specific field. The project variables can be sorted by created_at and updated_at values.

Example:

created_at
include_countoptionalstring
Set this to “true” to include the total number (count) of project variables in an organization.

Example:

true

Headers

authtokenrequiredstring

Enter your authtoken. Refer Authentication for more details.

Example:

your_authtoken
organization_uidrequiredstring

Enter your Organization UID.

Example:

your_organization_uid
Hide Parameters

URL Parameters

project_uidrequiredstring

Enter the Project UID.

Example:

05732fe9f7d6454791715b09a3792f52
variable_uidrequiredstring

Enter the UID of the project variable.

Example:

f7bbf2d9cb894b5aa34b3d28603ae174

Headers

authtokenrequiredstring

Enter your authtoken. Refer Authentication for more details.

Example:

your_authtoken
organization_uidrequiredstring

Enter the Organization UID.

Example:

your_organization_uid
Hide Parameters

URL Parameters

project_uidrequiredstring

Enter the Project UID.

Example:

05732fe9f7d6454791715b09a3792f52

Headers

authtokenrequiredstring

Enter your authtoken. Refer Authentication for more details.

Example:

your_authtoken
organization_uidrequiredstring

Enter the Organization UID.

Example:

your_organization_uid
Content-Typerequiredstring

Enter "application/json" to pass a request body.

Example:

application/json
Hide Parameters

URL Parameters

project_uidrequiredstring

Enter the Project UID.

Example:

05732fe9f7d6454791715b09a3792f52
variable_uidrequiredstring

Enter the UID of the project variable.

Example:

bd0ce37910cb4172b844308aa07e6bf7

Headers

authtokenrequiredstring

Enter your authtoken. Refer Authentication for more details.

Example:

your_authtoken
organization_uidrequiredstring

Enter the Organization UID.

Example:

your_organization_uid
Content-Typerequiredstring

Enter "application/json" to pass a request body.

Example:

application/json
Hide Parameters

URL Parameters

project_uidrequiredstring

Enter the Project UID.

Example:

05732fe9f7d6454791715b09a3792f52
variable_uidrequiredstring

Enter the UID of the project variable.

Example:

bd0ce37910cb4172b844308aa07e6bf7

Headers

authtokenrequiredstring

Enter your authtoken. Refer Authentication for more details.

Example:

your_authtoken
organization_uidrequiredstring

Enter the Organization UID.

Example:

your_organization_uid