Create polygon annotation

Create polygon annotation

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

Create polygon 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": "transparent",
  "path": "M 50 0 L 50 0 L 0 40 L 120 140 L 280 60 L 400 150",
  "stroke_color": "#e91e63",
  "stroke_width": 4,
  "top_left_x": "25.75",
  "top_left_y": "30.10",
  "text": "",
  "text_fontsize": 0,
  "type": "polygon",
  "z_index": 1
}

Results:
Info
{
  "date_created": "2026-03-25T16:05:22.678901Z",
  "fill_color": "transparent",
  "height": "150.000",
  "path": "M 50 0 L 50 0 L 0 40 L 120 140 L 280 60 L 400 150",
  "stroke_color": "#e91e63",
  "stroke_width": 4,
  "top_left_x": "25.750",
  "top_left_y": "30.100",
  "text": "",
  "text_fontsize": 0,
  "type": "polygon",
  "was_edited": true,
  "uuid": "e3b1c9d4-7a2f-4c6e-8d9b-5f1a2c3d4e6f",
  "width": "400.000"
}