---
title: "Create a project variable"
method: POST
path: "/v1/projects/{projectId}/variables"
tags: ["Project Variables"]
---

# Create a project variable

`POST /v1/projects/{projectId}/variables`

Create a new project variable

## Path parameters

- `projectId` string, uuid, required

## Request body

- CreateProjectVariableRequest
  - `behaviour` 'COPIED' | 'SHARED', required
  - `description` string
  - `name` string
  - `supportsDoubleResolution` boolean
  - `type` 'NUMBER' | 'TEXT' | 'DATETIME', required
  - `value` unknown

## Response `201`

Project variable has been created

- CreateProjectVariableResponse
  - `id` string, uuid
  - `name` string
  - `value` unknown

## Other responses

- `400` — Wrong request parameters used
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Project not found
- `409` — Conflict
- `500` — Unexpected error occurred
- `504` — Gateway timeout

---

[API](https://skmtc.net/maia/apis/maia-public-rest-api.md) · [All operations](https://skmtc.net/maia/apis/maia-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/maia/maia-public-rest-api/versions/6239825f68eb/schema)
