Create image 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: POST

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

Content-Type header: multipart/form-data

Request

Request Type: Form-data

resource: Image file
data: Text file containing JSON object data

Where:
resource is the image file from the device.
data is the JSON object data.

The JSON object data must contain the following:

{
    "title": "title for the image",
    "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 image.

Response

HTTP 201 Created

{
    "id": "3458764513820647931",
    "type": "image",
    "createdAt": "2022-01-26T10:21:16Z",
    "createdBy": {
        "id": "3458764513820541929",
        "type": "user"
    },
    "data": {
        "title": "title for the image"
    },
    "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