Create rectangle annotation

Create rectangle annotation

In this article, you will learn how to create rectangle annotation.

Create rectangle annotation

Request Type: POST
Header: Authorization: ApiKey <my_api_token>
URL: https://app.banyanboard.com/api/annotation_groups/<my_annotation_group_uuid>/annotations/

Payload:
Info
{
  "fill_color": "#aaffcc55",
  "path": "M 0 0 h 200 v 80 h -200 z",
  "rotation_angle": 0,
  "stroke_color": "#ff5722",
  "stroke_width": 3,
  "top_left_x": "210.50",
  "top_left_y": "300.25",
  "text": "",
  "text_fontsize": 0,
  "type": "rectangle",
  "z_index": 1
}

Results:
Info
{
  "date_created": "2026-03-22T14:18:10.456789Z",
  "fill_color": "#aaffcc55",
  "height": "80.000",
  "path": "M 0 0 h 200 v 80 h -200 z",
  "stroke_color": "#ff5722",
  "stroke_width": 3,
  "top_left_x": "210.500",
  "top_left_y": "300.250",
  "text": "",
  "text_fontsize": 0,
  "type": "rectangle",
  "was_edited": true,
  "uuid": "b7c9d2e4-1a3f-4b5c-9d8e-6f2a1b3c4d5e",
  "width": "200.000"
}