Microboard.Developers
ApiDrawings

Create a drawing

POST
/developers/boards/{boardId}/drawings

Authorization

apiKey<token>

In: query

Request Body

application/jsonRequired
type
Required
string
Value in: "Drawing"
points
Required
array<object>
lineColorstring
Default: "#000000"
lineWidthnumber
Default: 1
lineOpacitynumber
Default: 1

Path Parameters

boardId
Required
string
curl -X POST "https://api.microboard.com/api/v1/developers/boards/string/drawings" \
  -H "apiKey: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "Drawing",
    "points": [
      {
        "x": 0,
        "y": 0
      },
      {
        "x": 100,
        "y": 100
      }
    ],
    "lineColor": "#000000",
    "lineWidth": 2
  }'

Drawing created successfully

{
  "id": "drawing-123",
  "itemType": "Drawing",
  "transformation": {
    "rotate": 0,
    "scaleX": 1,
    "scaleY": 1,
    "translateX": 500,
    "translateY": 500
  },
  "points": [
    {
      "x": 0,
      "y": 0
    },
    {
      "x": 100,
      "y": 100
    }
  ],
  "lineColor": "#000000",
  "lineWidth": 2,
  "lineOpacity": 1
}