---
title: "Crée une variable pour le tenant courant."
method: POST
path: "/api/interactive-fields/variables"
tags: ["Divers"]
---

# Crée une variable pour le tenant courant.

`POST /api/interactive-fields/variables`

## Request

- Base URL: `https://lucidnest.test`
- URL: `https://lucidnest.test/api/interactive-fields/variables`
- Auth: HTTP bearer

Si kind === 'formula' ou si `formula` est fournie : requiert le module variable_calc.

## Request body

- object
  - `name` string, required: Must not be greater than 255 characters.
  - `slug` string, nullable: Must not be greater than 255 characters.
  - `kind` 'text' | 'textarea' | 'checkbox' | 'radio' | 'number' | 'date' | 'formula', required
  - `value` string, nullable
  - `options` object, nullable
  - `formula` string, nullable: Must not be greater than 10000 characters.
  - `scope` 'singleton' | 'note', nullable
  - `note` string, nullable: Must not be greater than 255 characters.

---

[API](https://skmtc.dev/lucidnest/apis/lucidnest-api-documentation.md) · [All operations](https://skmtc.dev/lucidnest/apis/lucidnest-api-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/lucidnest/apis/lucidnest-api-documentation/revisions/38638944c947?raw)
