Update document item using file from device

πŸ“˜

Note

You cannot try out this API from the developer portal at the moment. We are working on fixing the known limitations. Feel free to try out the API in a tool of your choice. The API request and response information are provided in this document.

Resource URL

HTTP Method: PATCH

URL: https://api.miro.com/v2/boards/{board_id}/images/{document_item_id}

Content-Type header: multipart/form-data

Request

Request Type: Form-data

Key nameValue
resource
(required)
The document file from the device. For example, foo.pdf. The maximum file size supported is 28.6 MB.
data
(required)
Text file containing JSON object data.

The JSON object data must contain the following:

{
    "title": "title for the document",
    "position": {
        "x": 100,
        "y": 200,
        "origin": "center"
    },
    "geometry": {
        "width": 100,
        "height": 100,
        "rotation": 0
    }
}

Where:
x is the X-axis coordinate of the location of the center of the item on the board. By default, all items have
absolute positioning to the board, not the current viewport. The center point of the board has x: 0 and y: 0
coordinates.
Default: 0

y is the Y-axis coordinate of the location of the center of the item on the board. By default, all items have
absolute positioning to the board, not the current viewport. The center point of the board has x: 0 and y: 0
coordinates.
Default: 0

title is the title for the document.

Response

HTTP 201 Created

{
    "id": "3458764513820647931",
    "type": "document",
    "createdAt": "2022-01-26T10:21:16Z",
    "createdBy": {
        "id": "3458764513820541929",
        "type": "user"
    },
    "data": {
        "title": "title for the document"
    },
    "position": {
        "x": 100,
        "y": 200,
        "origin": "center"
    },
    "geometry": {
        "width": 100,
        "height": 100,
        "rotation": 0
    },
    "modifiedAt": "2022-01-26T10:21:16Z",
    "modifiedBy": {
        "id": "3458764513820541929",
        "type": "user"
    }
}

Returns

Required scope

Rate limiting