Storyblok Raises $80M Series C - Read News

Skip to main content

How to backup collaborators

  • FAQ
  • How to backup collaborators

Section titled Load current collaborators

Access your current space from the management API and execute a GET request to receive a space object.

This will give you access to an object formed like this:

Where you will be able to access: space.collaborators which is an array of all your current collaborators, their default role or their custom space_role_id.

What you will need to restore your collaborators will be:

  1. The e-mail or SSO userid available in each collaborator.user object. Do not use the friendly_name.
  2. The role field available on the collaborator object.
  3. The space_role_id field available on the collaborator object.

Section titled Restoring your collaborators

To restore your collaborators you need the information above and execute a POST request on your space for each of them. Make sure to replace SPACE_ID from the below CURL request.

Section titled Create a collaborator by using its mail

curl 'https://mapi.storyblok.com/v1/spaces/SPACE_ID/collaborators/' 
-H 'authorization: YOUR_OAUTH_TOKEN' 
-H 'content-type: application/json' 
-H 'accept: application/json, text/plain, */*' 
--data-binary '{"email":"email@ofyourcollaborator.com","role":"editor","space_role_id":null}' --compressed