Skip to content

Add a Collaborator

POST
https://mapi.storyblok.com/v1/spaces/:space_id/collaborators/

Add collaborators with specific roles and permissions.

The following list includes only required fields—find all available properties in the collaborator object page.

  • :space_id required number

    Numeric ID of a space.

  • email required string

    The collaborator’s email or SSO ID.

  • role required string

    The role name of the collaborator. It could be a default role (admin or editor), or a custom role listed with a role_id.

  • space_role_id required number

    Numeric ID associated with a single custom role.

  • space_role_ids number[]

    An array of numeric IDs associated with each custom role assigned to a single collaborator. Set allow_multiple_roles_creation to true to enable multi-role.

  • permissions enum[]

    An array of strings that define the role’s permissions.

    Permission Description
    read_stories Read-only access to stories
    save_stories Edit and save stories
    publish_stories Publish stories
    unpublish_stories Unpublish stories
    publish_folders Publish folders (including stories contained within)
    unpublish_folders Unpublish folders (including stories contained within)
    deploy_stories Deploy pipeline stories
    delete_stories Permanently delete stories
    edit_image Edit images in the Image Editor
    view_composer Use the Visual Editor
    change_alternate_group Change alternate content groupings (for internationalization or variants)
    move_story Move stories between folders
    edit_story_slug Edit a story URL
    view_content If checked, hides all stories except those defined in allowed_paths (PermissionsContentFolder/Content item permissions)
    view_folders If checked, hides all folders except those defined in allowed_paths (PermissionsContentFolder/Content item permissions)
    view_draft_json View the draft JSON payload of stories
    view_published_json View the published JSON payload of stories
    manage_tags Create, edit, or delete tags
    edit_datasources Edit datasources
    edit_datasource_keys Edit datasources keys
    access_commerce Access e-commerce features (if available)
    manage_block_library Create, move, and edit blocks and folders
    hide_asset_folders If checked, hides all assets and folders except those defined in asset_folder_ids (PermissionsAssetsAsset Folder Permissions)
  • allow_multiple_roles_creation boolean

    Set to true to add multiple role IDs for a single collaborator.

curl "https://mapi.storyblok.com/v1/spaces/288868932106293/collaborators/" \
-X POST \
-H "Authorization: YOUR_PERSONAL_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"allow_multiple_roles_creation\":false,\"email\":\"api.test@storyblok.com\",\"permissions\":[],\"role\":\"admin\",\"space_role_id\":null,\"space_role_ids\":[]}"

Request for adding a collaborator with one custom role.

curl "https://mapi.storyblok.com/v1/spaces/288868932106293/collaborators/" \
-X POST \
-H "Authorization: YOUR_PERSONAL_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"allow_multiple_roles_creation\":false,\"email\":\"api.test@storyblok.com\",\"permissions\":[],\"role\":\"62454\",\"space_role_id\":62454,\"space_role_ids\":[]}"

Request for adding a collaborator with multiple custom roles.

curl "https://mapi.storyblok.com/v1/spaces/288868932106293/collaborators/" \
-X POST \
-H "Authorization: YOUR_PERSONAL_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"allow_multiple_roles_creation\":true,\"email\":\"api.test@storyblok.com\",\"permissions\":[],\"role\":\"multi\",\"space_role_id\":null,\"space_role_ids\":[62454,123123]}"

Was this page helpful?

What went wrong?

This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.