POST/api/v1/projects/<PROJECT_ID>/artboards/<ARTBOARD_ID>/objects
Creates a new object on the specified artboard. The object ID is server-generated; omitted fields use schema defaults.
Authentication
Request
- Method: POST
- URL:
/api/v1/projects/<PROJECT_ID>/artboards/<ARTBOARD_ID>/objects
Parameters
name
string Object name. Default: "Untitled Object".
type
"spot""poly"Geometry type.
click_action
"none""follow-link""change-artboard"Click behavior. Default: "none".
open_link_in_new_tab
boolean Open links in a new tab. Default: false.
click_action_url
string Target URL for follow-link. Default: "".
click_action_artboard_id
string Artboard ID for change-artboard. Default: "".
x
number X coordinate (use for type="spot"). Default: 0.
y
number Y coordinate (use for type="spot"). Default: 0.
coords
{ x:number, y:number } []Vertices (use for type="poly"). Default: [].
radius
number Spot radius. Default: 20.
pin
boolean Show pin marker. Default: true.
color
string Fill color. Default: "#3b82f6".
opacity
number Fill opacity. Default: 1.
stroke_color
string Stroke color. Default: "#000000".
stroke_width
number Stroke width. Default: 0.
stroke_opacity
number Stroke opacity. Default: 1.
hover_color
string Hover fill color. Default: "#000000".
hover_opacity
number Hover fill opacity. Default: 0.5.
hover_stroke_color
string Hover stroke color. Default: "#000000".
hover_stroke_width
number Hover stroke width. Default: 0.
hover_stroke_opacity
number Hover stroke opacity. Default: 1.
blend_mode
"inherit""normal""add""multiply""screen""darken""lighten""erase""color-dodge""color-burn""linear-burn""linear-dodge""linear-light""hard-light""soft-light""pin-light""difference""exclusion""overlay""saturation""color""luminosity""normal-npm""add-npm""screen-npm""none""subtract""divide""vivid-light""hard-mix""negation""min""max"Blend mode. Default: "normal".
Response
200 OK: The created Object.400 Bad Request: Validation failed. Returns a formatted error message.401 Unauthorized: API key is missing or invalid.404 Not Found: Project or artboard not found, or not accessible by the user.500 Internal Server Error: Failed to create Object.