API Reference
Variables
Get and set cloud variables for the current app session.
Get Variable
| Field | Description | |
|---|---|---|
| session_id | Required | Active session ID from a successful Init call. |
| var_key | Required | Key identifier of the cloud variable to retrieve. |
Example Request
{
"session_id": "dc1ce...a3a75",
"var_key": "my_variable"
}
Set Variable
| Field | Description | |
|---|---|---|
| session_id | Required | Active session ID from a successful Init call. |
| var_key | Required | Key identifier of the variable to update or create. |
| var_value | Required | String value to write to the variable. |
Example Request
{
"session_id": "dc1ce...a3a75",
"var_key": "my_variable",
"var_value": "hello"
}
Responses
Variable retrieved or updated successfully.
{
"success": true,
"message": "Variable retrieved successfully",
"variable": {
"var_key": "my_variable",
"var_value": "hello",
"updated_at": "2026-04-13T12:00:00.000Z"
}
}
MISSING_FIELDS — Required fields were not sent.
{
"success": false,
"code": "MISSING_FIELDS",
"message": "Required fields are missing"
}
Session check failed. Codes: INVALID_SESSION, SESSION_EXPIRED.
{
"success": false,
"code": "SESSION_EXPIRED",
"message": "Session has expired"
}
VARIABLE_NOT_FOUND — No variable with this key exists in app settings.
{
"success": false,
"code": "VARIABLE_NOT_FOUND",
"message": "Variable not found"
}
INTERNAL — Unexpected server-side error.
{
"success": false,
"code": "INTERNAL",
"message": "An internal server error occurred"
}