Skip to main content

Update shape item API endpoint not working as expected


I’m using the PATCH https://api.miro.com/v2/boards/{board_id}/shapes/{shape_item_id} to try and change the text content and background colour of a shape. The request I am using (via https://beta.developers.miro.com/reference/rest-api-update-shape) is 

curl --request PATCH \
     --url https://api.miro.com/v2/boards/<board_id>/shapes/3458764521610298308 \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer <token>' \
     --header 'Content-Type: application/json' \
     --data '
{
     "data": {
          "content": "new text"
     },
     "style": {
          "fillColor": "#d0e17a"
     }
}
'

which results in...

{
  "type": "error",
  "code": "invalidParameters",
  "message": "Position (x and y) is required",
  "status": 400
}

if change the request to only include the “style” section i get a 200 response.

I have added a position block but that doesn’t change the response.

Any ideas?

Was it helpful?

I have fixed my immediate problem by using the patch widget v1 endpoint


Joanna Smith
Mironeer
Forum|alt.badge.img

Very curious. Thanks so much for reporting this! I’ve escalated the bug internally, so hopefully we can get this resolved soon.

 

Joanna


William Bishop
Mironeer
Forum|alt.badge.img+4

Hey @Tom Guest,

Apologies for the delay—however, I did want to quickly confirm that the original bug you reported should now be fixed! 

Best,
Will


Reply