{
  "openapi": "3.1.0",
  "info": {
    "title": "Doshka API",
    "version": "1.0.0",
    "summary": "Online whiteboard Doshka: boards, board contents, sticky notes, diagrams, webhooks.",
    "description": "Create boards, read their elements, add sticky notes, draw diagrams (shapes, text, connected arrows), edit and delete elements, and receive webhook events from your own software. Changes appear instantly for people who have the board open. Key-based: create a key in Doshka (home page → API keys) and send it as `Authorization: Bearer dk_…`. Limit: 120 requests per minute per key. Docs: https://doshka-online.by/en/developers",
    "contact": {
      "url": "https://doshka-online.by/en/developers"
    }
  },
  "externalDocs": {
    "url": "https://doshka-online.by/en/developers",
    "description": "Developer documentation"
  },
  "servers": [
    {
      "url": "https://doshka-online.by"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Boards"
    },
    {
      "name": "Elements"
    },
    {
      "name": "Webhooks"
    },
    {
      "name": "Embedding"
    }
  ],
  "paths": {
    "/api/v1/me": {
      "get": {
        "operationId": "getMe",
        "summary": "The key owner",
        "tags": [
          "Boards"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/v1/boards": {
      "get": {
        "operationId": "listBoards",
        "summary": "Boards available to the key owner",
        "tags": [
          "Boards"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "boards"
                  ],
                  "properties": {
                    "boards": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BoardSummary"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      },
      "post": {
        "operationId": "createBoard",
        "summary": "Create a board",
        "tags": [
          "Boards"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "orgId": {
                    "type": "string",
                    "description": "Organisation the board belongs to; the key owner must be its member"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "title"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/v1/boards/{boardId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/BoardId"
        }
      ],
      "get": {
        "operationId": "getBoard",
        "summary": "A board and its elements",
        "tags": [
          "Boards"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Board"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      },
      "patch": {
        "operationId": "renameBoard",
        "summary": "Rename a board",
        "tags": [
          "Boards"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "title"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/v1/boards/{boardId}/elements": {
      "parameters": [
        {
          "$ref": "#/components/parameters/BoardId"
        }
      ],
      "post": {
        "operationId": "addElements",
        "summary": "Draw shapes, text and arrows (up to 200 per request)",
        "tags": [
          "Elements"
        ],
        "description": "Arrows connect shapes: `from`/`to` is the id of an element already on the board or the `ref` of a shape in the same request; when someone drags a shape in the browser, its arrows follow. If any arrow points to a missing element, nothing is written (400). Without x and y the shapes line up in rows below the board content, or as a flowchart with layout. Changes made through the API do not trigger webhooks.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "elements"
                ],
                "properties": {
                  "layout": {
                    "type": "string",
                    "enum": [
                      "right",
                      "down"
                    ],
                    "description": "Lay out shapes without x and y as a flowchart: in layers along the arrows, left to right or top to bottom, below the board content. Without it they line up in rows."
                  },
                  "elements": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 200,
                    "items": {
                      "$ref": "#/components/schemas/ElementInput"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "created"
                  ],
                  "properties": {
                    "created": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "type"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "ref": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/v1/boards/{boardId}/elements/{elementId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/BoardId"
        },
        {
          "name": "elementId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,40}$"
          }
        }
      ],
      "patch": {
        "operationId": "updateElement",
        "summary": "Change an element",
        "tags": [
          "Elements"
        ],
        "description": "Send only what changes. `text` of a shape changes its label (an empty string removes it). Moving or resizing a shape moves its label and the ends of connected arrows.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ElementPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "type",
                    "version"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      },
      "delete": {
        "operationId": "deleteElement",
        "summary": "Delete an element",
        "tags": [
          "Elements"
        ],
        "description": "Deletes the element together with its label; connected arrows stay but are detached.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/v1/boards/{boardId}/stickers": {
      "parameters": [
        {
          "$ref": "#/components/parameters/BoardId"
        }
      ],
      "post": {
        "operationId": "addStickers",
        "summary": "Add sticky notes (up to 100 per request)",
        "tags": [
          "Boards"
        ],
        "description": "Without x and y the notes line up in rows of 5 below everything already on the board. People who have the board open see them instantly. Changes made through the API do not trigger webhooks.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "stickers"
                ],
                "properties": {
                  "stickers": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "items": {
                      "$ref": "#/components/schemas/StickerInput"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "created"
                  ],
                  "properties": {
                    "created": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Ids of the created notes"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "operationId": "listWebhooks",
        "summary": "Your webhooks",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "webhooks"
                  ],
                  "properties": {
                    "webhooks": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Webhook"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      },
      "post": {
        "operationId": "createWebhook",
        "summary": "Subscribe to board changes",
        "tags": [
          "Webhooks"
        ],
        "description": "The address must be https on port 443, outside internal networks, without redirects. Up to 20 webhooks per account; after 20 failed deliveries in a row the subscription is switched off.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "boardId",
                  "url"
                ],
                "properties": {
                  "boardId": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "board.changed",
                        "sticker.created",
                        "sticker.updated",
                        "sticker.deleted",
                        "comment.added"
                      ]
                    },
                    "default": [
                      "board.changed"
                    ],
                    "description": "Which events to send"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. The secret is shown only once.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Webhook"
                    },
                    {
                      "type": "object",
                      "required": [
                        "secret"
                      ],
                      "properties": {
                        "secret": {
                          "type": "string",
                          "description": "whsec_… — key for X-Doshka-Signature"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "callbacks": {
          "boardChanged": {
            "{$request.body#/url}": {
              "post": {
                "summary": "board.changed",
                "description": "Changes within 5 seconds are grouped into one message. Header X-Doshka-Signature: sha256=<HMAC-SHA256 of the raw body with the subscription secret>; X-Doshka-Event: board.changed.",
                "requestBody": {
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/BoardChangedEvent"
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "description": "Any 2xx answer within 5 seconds counts as delivered"
                  }
                }
              }
            }
          },
          "stickerEvents": {
            "{$request.body#/url}": {
              "post": {
                "summary": "sticker.created / sticker.updated / sticker.deleted",
                "description": "One message per event type within 5 seconds, up to 100 items. A note created and edited in that window arrives as one sticker.created with the latest text; created and deleted in that window is not sent at all. X-Doshka-Event carries the event name.",
                "requestBody": {
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/StickerEvent"
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "description": "Any 2xx answer within 5 seconds counts as delivered"
                  }
                }
              }
            }
          },
          "commentAdded": {
            "{$request.body#/url}": {
              "post": {
                "summary": "comment.added",
                "description": "New comments and replies; elementId is set when the comment is attached to an element.",
                "requestBody": {
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/CommentEvent"
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "description": "Any 2xx answer within 5 seconds counts as delivered"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/{webhookId}": {
      "parameters": [
        {
          "name": "webhookId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "operationId": "deleteWebhook",
        "summary": "Unsubscribe",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/oembed": {
      "get": {
        "operationId": "oembed",
        "summary": "oEmbed for a board link",
        "tags": [
          "Embedding"
        ],
        "security": [],
        "description": "Accepts a view-only board link (/v/<board>/<key>), an embed address (/embed/…) or an invite link (/#/i/…). Always embeds view-only.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          },
          {
            "name": "maxwidth",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 200
            }
          },
          {
            "name": "maxheight",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 200
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "oEmbed rich response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OEmbed"
                }
              }
            }
          },
          "401": {
            "description": "Link access is off or the board has a password",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not a Doshka board link, or the key does not match",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Only format=json is supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "dk_…",
        "description": "Create a key in Doshka: home page → API keys → Create key. The key is shown once."
      }
    },
    "parameters": {
      "BoardId": {
        "name": "boardId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,80}$"
        }
      }
    },
    "responses": {
      "E400": {
        "description": "Invalid request body",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E401": {
        "description": "Missing or invalid API key",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E404": {
        "description": "The board or webhook does not exist, or you have no access",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E409": {
        "description": "The element is locked on the board (code: locked)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E429": {
        "description": "More than 120 requests per minute",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Error text (in Russian)"
          },
          "code": {
            "type": "string",
            "enum": [
              "missing",
              "locked",
              "geometry",
              "color",
              "link",
              "text"
            ],
            "description": "Element update/delete errors only"
          }
        }
      },
      "User": {
        "type": "object",
        "required": [
          "id",
          "email",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "BoardSummary": {
        "type": "object",
        "required": [
          "id",
          "title",
          "orgId",
          "created"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "orgId": {
            "type": [
              "string",
              "null"
            ]
          },
          "created": {
            "type": "integer",
            "description": "Unix time in milliseconds"
          }
        }
      },
      "Element": {
        "type": "object",
        "required": [
          "id",
          "type",
          "x",
          "y",
          "width",
          "height"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "rectangle, ellipse, diamond, arrow, line, text, freedraw, image, embeddable, frame…"
          },
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          },
          "width": {
            "type": "number"
          },
          "height": {
            "type": "number"
          },
          "text": {
            "type": "string",
            "description": "For type text"
          },
          "label": {
            "type": "string",
            "description": "Text inside a shape, sticky note or on an arrow"
          },
          "containerId": {
            "type": "string",
            "description": "For a text inside a shape or sticky note: the shape id"
          },
          "sticker": {
            "type": "string",
            "enum": [
              "yellow",
              "green",
              "blue",
              "pink",
              "orange",
              "violet",
              "red",
              "teal",
              "lime",
              "cyan",
              "gray",
              "white"
            ],
            "description": "Set when the element is a sticky note"
          },
          "link": {
            "type": "string"
          },
          "locked": {
            "type": "boolean"
          },
          "from": {
            "type": "string",
            "description": "Arrows: id of the start element"
          },
          "to": {
            "type": "string",
            "description": "Arrows: id of the end element"
          }
        }
      },
      "ElementInput": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "sticker",
              "rectangle",
              "ellipse",
              "diamond",
              "text",
              "arrow"
            ]
          },
          "ref": {
            "type": "string",
            "description": "Your label for this element: use it in from/to of arrows and find the id in the answer"
          },
          "text": {
            "type": "string",
            "description": "Label of a shape or arrow, sticky note text, or the text itself"
          },
          "color": {
            "type": "string",
            "enum": [
              "yellow",
              "green",
              "blue",
              "pink",
              "orange",
              "violet",
              "red",
              "teal",
              "lime",
              "cyan",
              "gray",
              "white"
            ]
          },
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          },
          "width": {
            "type": "number"
          },
          "height": {
            "type": "number"
          },
          "link": {
            "type": "string",
            "description": "https:// only"
          },
          "fontSize": {
            "type": "number",
            "minimum": 8,
            "maximum": 120,
            "description": "type text only"
          },
          "from": {
            "type": "string",
            "description": "Arrows: element id on the board or ref from this request"
          },
          "to": {
            "type": "string",
            "description": "Arrows: element id on the board or ref from this request"
          }
        },
        "examples": [
          {
            "type": "rectangle",
            "ref": "start",
            "text": "Order",
            "color": "blue"
          },
          {
            "type": "arrow",
            "from": "start",
            "to": "done",
            "text": "paid"
          }
        ]
      },
      "ElementPatch": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "enum": [
              "yellow",
              "green",
              "blue",
              "pink",
              "orange",
              "violet",
              "red",
              "teal",
              "lime",
              "cyan",
              "gray",
              "white"
            ]
          },
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          },
          "width": {
            "type": "number"
          },
          "height": {
            "type": "number"
          },
          "link": {
            "type": [
              "string",
              "null"
            ],
            "description": "https:// only; empty or null removes the link"
          }
        }
      },
      "Board": {
        "type": "object",
        "required": [
          "id",
          "title",
          "elements"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "elements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Element"
            }
          }
        }
      },
      "StickerInput": {
        "type": "object",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "enum": [
              "yellow",
              "green",
              "blue",
              "pink",
              "orange",
              "violet",
              "red",
              "teal",
              "lime",
              "cyan",
              "gray",
              "white"
            ],
            "default": "yellow"
          },
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          }
        },
        "examples": [
          {
            "text": "PROJ-12 Login page",
            "color": "pink"
          }
        ]
      },
      "Webhook": {
        "type": "object",
        "required": [
          "id",
          "boardId",
          "url",
          "created",
          "active"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "boardId": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "board.changed",
                "sticker.created",
                "sticker.updated",
                "sticker.deleted",
                "comment.added"
              ]
            }
          },
          "created": {
            "type": "integer"
          },
          "active": {
            "type": "boolean"
          },
          "lastStatus": {
            "type": [
              "integer",
              "null"
            ]
          },
          "lastAt": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "BoardChangedEvent": {
        "type": "object",
        "required": [
          "event",
          "boardId",
          "title",
          "at",
          "changes",
          "by"
        ],
        "properties": {
          "event": {
            "const": "board.changed"
          },
          "boardId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "changes": {
            "type": "object",
            "properties": {
              "added": {
                "type": "integer"
              },
              "edited": {
                "type": "integer"
              },
              "deleted": {
                "type": "integer"
              },
              "comments": {
                "type": "integer"
              }
            }
          },
          "by": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of the people who made the changes (up to 20)"
          }
        }
      },
      "StickerEvent": {
        "type": "object",
        "required": [
          "event",
          "boardId",
          "title",
          "at",
          "by",
          "items"
        ],
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "sticker.created",
              "sticker.updated",
              "sticker.deleted"
            ]
          },
          "boardId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "by": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "object",
              "required": [
                "id",
                "text"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "color": {
                  "type": "string",
                  "enum": [
                    "yellow",
                    "green",
                    "blue",
                    "pink",
                    "orange",
                    "violet",
                    "red",
                    "teal",
                    "lime",
                    "cyan",
                    "gray",
                    "white"
                  ]
                },
                "x": {
                  "type": "integer"
                },
                "y": {
                  "type": "integer"
                },
                "link": {
                  "type": "string"
                },
                "by": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "CommentEvent": {
        "type": "object",
        "required": [
          "event",
          "boardId",
          "title",
          "at",
          "by",
          "items"
        ],
        "properties": {
          "event": {
            "const": "comment.added"
          },
          "boardId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "by": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "object",
              "required": [
                "id",
                "text",
                "reply"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Comment thread id"
                },
                "text": {
                  "type": "string"
                },
                "reply": {
                  "type": "boolean"
                },
                "elementId": {
                  "type": "string"
                },
                "by": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "OEmbed": {
        "type": "object",
        "required": [
          "version",
          "type",
          "html",
          "width",
          "height"
        ],
        "properties": {
          "version": {
            "const": "1.0"
          },
          "type": {
            "const": "rich"
          },
          "provider_name": {
            "type": "string"
          },
          "provider_url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "html": {
            "type": "string"
          },
          "thumbnail_url": {
            "type": "string"
          },
          "thumbnail_width": {
            "type": "integer"
          },
          "thumbnail_height": {
            "type": "integer"
          },
          "cache_age": {
            "type": "integer"
          }
        }
      }
    }
  }
}
