POST
/api/v1/projects/<PROJECT_ID>/actions

Creates a new action in the specified project. The action ID is server-generated; omitted fields use schema defaults.


Authentication

Request

  • Method: POST
  • URL: https://api.markerkit.com/v1/projects/<PROJECT_ID>/actions

Parameters

type
"modify-object""create-spot""create-poly""create-spots""create-polys"
Action type. Default: "modify-object".
name string
Action name. Default: "Untitled Action".
conditions Condition []
Trigger conditions. Default: [].
condition_operator
"and""or"
How to combine conditions. Default: "and".
object_id string
Target Object ID (for type="modify-object"). Default: "".
create_object_target_artboard_id string
Target artboard ID when creating objects. Default: "".
create_object_name string
Name for created objects. Default: "".
create_spot_x_source_type
"variable""custom"
X source type. Default: "custom".
create_spot_x_custom_value string
Custom X (when source_type="custom"). Default: "".
create_spot_x_variable_id string
Variable ID for X (when source_type="variable"). Default: "".
create_spot_y_source_type
"variable""custom"
Y source type. Default: "custom".
create_spot_y_custom_value string
Custom Y (when source_type="custom"). Default: "".
create_spot_y_variable_id string
Variable ID for Y (when source_type="variable"). Default: "".
create_poly_coords_variable_id string
Variable ID providing polygon coords. Default: "".
style_color ObjectStyle
Color style. Default: { name:"color", type:"current-value", ... }.
style_opacity ObjectStyle
Opacity style. Default current-value.
style_stroke_color ObjectStyle
Stroke color style.
style_stroke_width ObjectStyle
Stroke width style.
style_stroke_opacity ObjectStyle
Stroke opacity style.
style_hover_color ObjectStyle
Hover color style.
style_hover_opacity ObjectStyle
Hover opacity style.
style_hover_stroke_color ObjectStyle
Hover stroke color style.
style_hover_stroke_width ObjectStyle
Hover stroke width style.
style_hover_stroke_opacity ObjectStyle
Hover stroke opacity style.
style_blend_mode ObjectStyle
Blend mode style.
style_radius ObjectStyle
Radius style.
style_pin ObjectStyle
Pin style.

Response

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

Example Request

Example Response