Skip to main content

One last question for now:

What is the code for updating an items it’s content? I tried it with:

url = f'https://api.miro.com/v2/boards/{board_id}/items/{item_id}'
data = {"data": {"content": "<p>123</p>"}}headers = {    "accept": "application/json",    "authorization": f"Bearer {access_token}",}response = requests.patch(url, json=data, headers=headers)

Can you help me? And where can I find all the possibilities?

Hi @Ernst van der Heijden,

If you want to update a shape’s content, you can make a PATCH request to the Shape endpoint. You can find the PATCH endpoint for each supported item type in our API Reference—here’s the documentation for updating a shape:

https://developers.miro.com/reference/update-shape-item

 

And here’s an example PATCH request in cURL:

curl --request PATCH \
     --url https://api.miro.com/v2/boards/boardId/shapes/itemId \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "data": {
    "content": "123"
  }
}
'


I hope it helps!


Thanks a million!


Reply