Skip to main content
POST
Update input variable
Use this endpoint to update or soft-delete a User Defined input variable.

Endpoint

POST /input-variable/update Content-Type: application/json Authentication: Required (workspace auth)

Request Body

Update fields

Soft-delete a variable

Response

When status: 2 is sent:

Behavior

  • Only User Defined variables can be updated — System variables always fail with System variables cannot be modified.
  • variable_key is accepted in the request but is immutable and never applied — renaming a key would break every audience and agent that references it.
  • Passing status: 2 soft-deletes the variable (STATUS is set to 2; it no longer appears in List Input Variables). Deleting is blocked while the variable is referenced by any agent or audience.
  • Editing type and/or description is allowed even while the variable is in use. The change is propagated into every agent flow that references the variable by key — the matching metadata_input entry’s type/data_type and description are updated in place. Audiences store variable keys only (no type/description), so they need no propagation.
  • Only the fields you send are applied; omitted fields are left unchanged.

Error Cases

Example cURL

Headers

token
string
required

API token for authentication

Body

application/json
variable_id
integer
required

ID of the input variable to update

variable_key
string

Accepted but ignored - the variable key is immutable and is never changed

type
enum<string>

New data type

Available options:
string,
number,
date,
email,
phone,
name,
amount,
address,
pincode,
no_type
description
string

New description

status
enum<integer>

0=inactive, 1=active, 2=deleted (soft-deletes the variable)

Available options:
0,
1,
2

Response

Input variable updated or deleted successfully

message
string
data
object