Templates

Want to create PixelPaper "Templates" with content pre-created on them? Easy! Follow the instructions below to get started.

1. Follow the quickstart guide to create a PixelPaper to use as a template.

Follow the steps through in the quickstart guide to embed a PixelPaper. Draw something on this PixelPaper so it can be used as a template for a new PixelPaper. Note down the "room_id" of the PixelPaper you created. This is a UUID that is used to identify the PixelPaper.

2. Use the RestAPI to create a new PixelPaper using this as a template.

Add a new parameter, template_id, to the payload of the creation request. This should be the room_id of the board you created earlier. This will tell PixelPaper to use the PixelPaper that you just created as the template for this whiteboard.

POST

https://hq.pixelpaper.io/api/board

curl --location --request POST 'https://hq.pixelpaper.io/api/board'
--header 'Authorization: Bearer [your-private-api-token]'
--header 'Content-Type: application/json'
-d '{"template_id": "00000000-0000-4ab4-92e1-699d0a5a85f1"}'

This will return a PixelPaper object with a `template_id` value of the previous PixelPaper's room_id. If you then embed this new PixelPaper, you can see that it is using the first PixelPaper as a template. You'll receive a response like so:

{"room_id":"00000000-0000-4025-9c7a-cb54b4dcc566", "template_id": "00000000-0000-4ab4-92e1-699d0a5a85f1", "updated_at":"2022-06-30 08:34:57","created_at":"2022-06-30 08:34:57"}

Some things to remember are:

  • Changes made to the template do not show in the new PixelPaper. The template is only copied when creating a new PixelPaper using it.

  • You can update the template. Any new PixelPapers created using it will use the updated version.