PATCH
/api/v1/projects/<PROJECT_ID>/variables/<VARIABLE_ID>

Updates an existing variable. Only provided fields are changed; omitted fields remain the same. The variable ID cannot be modified.


Authentication

Request

  • Method: PATCH
  • URL: https://api.markerkit.com/v1/projects/<PROJECT_ID>/variables/<VARIABLE_ID>

Parameters

name string
Variable name.
type
"primitive""expression""interpolate-color""iterator""primitive-from-iterator""coords-from-data-source""coords-from-iterator""random""custom"
Variable type.
data_source_id string
Related Data Source ID.
iterator_id string
Related Iterator Variable ID.
custom_value string
Custom value (for relevant types).
expression string
Expression source (for type="expression").
data_path object
Path config used by data-driven variable types.
color_interpolation_range_start number
Start of color interpolation range.
color_interpolation_range_end number
End of color interpolation range.
color_interpolation_factor_variable_id string
Variable ID used as interpolation factor.
color_interpolation_colors string []
Palette colors.
color_interpolation_smooth boolean
Enable smooth interpolation.
random_from number
Random range start (for type="random").
random_to number
Random range end (for type="random").

Response

  • 200 OK: The updated Variable object.
  • 400 Bad Request: Validation failed. Returns a formatted error message.
  • 401 Unauthorized: API key is missing or invalid.
  • 404 Not Found: Project or variable not found, or not accessible by the user.
  • 500 Internal Server Error: Failed to update Variable.

Example Request

Example Response