Question

How to duplicate/ clone boards using the REST Api

  • 16 March 2021
  • 7 replies
  • 64 views

Badge

As the title states, how can I duplicate an existing board programmatically using the REST api?

 

I couldn’t find anything in the documentation, and get all the widgets and then creating them in a new board are not practical as this method doesn’t support frames.


7 replies

Badge

Interested too!

Badge +1

Interested too!

Userlevel 1
Badge +2

I’m also curious!

Userlevel 3
Badge +7

Hi,
 

We currently have an undocumented API endpoint for cloning boards:

POST https://api.miro.com/v1/boards/{id}/copy

This will create a copy of the board with the id you passed in the url and return the copy. You could give it a try, but be aware that this endpoint will probably change in the next API version release.

 

Kind regards.
 

Daniela

Userlevel 1
Badge +2

Thanks, @Daniela Gavidia 

With this API Endpoint, I need an access token. So I could only use it for myself, right? 

My plan is to create a public “Use Template” button on our website. So others can quickly duplicate a board. 

Best, 

Daniel

Userlevel 3
Badge +7

Hi Daniel,

 

Yes, you would need an access token for an app that is installed in a team. Calling the “copy” endpoint would let you duplicate a board in a team where the app is installed.

 

Kind regards.

 

Daniela

Badge

Hi @Daniela Gavidia, :)

 

Have create a dummy board, trying to duplicate but KO. 

https://api.miro.com/v1/boards/o9J_lMf3sjg=/copy

Got this error. 

{  "status" : 401,  "code" : "tokenNotProvided",  "message" : "No authorization data was found on the request",  "context" : null,  "type" : "error"}

 

Question 1/ 

In your latest comment to Daniel you say: “you would need an access token for an app that is installed in a team”. Could you please tell us how to create such an access token?/ Share a resource/ 

 

Question 2/

If I want to duplicate a board 20 times, do I need to run the API URL 20 times or is there a more convenient way?

 

Thanks :)

Antoine. 

 

 

Reply