Skip to content

Add a Collaborator

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.

    PermissionDescription
    read_storiesRead-only access to stories
    save_storiesEdit and save stories
    publish_storiesPublish stories
    unpublish_storiesUnpublish stories
    publish_foldersPublish folders (including stories contained within)
    unpublish_foldersUnpublish folders (including stories contained within)
    deploy_storiesDeploy pipeline stories
    delete_storiesPermanently delete stories
    edit_imageEdit images in the Image Editor
    view_composerUse the Visual Editor
    change_alternate_groupChange alternate content groupings (for internationalization or variants)
    move_storyMove stories between folders
    edit_story_slugEdit a story URL
    view_contentIf checked, hides all stories except those defined in allowed_paths (PermissionsContentFolder/Content item permissions)
    view_foldersIf checked, hides all folders except those defined in allowed_paths (PermissionsContentFolder/Content item permissions)
    view_draft_jsonView the draft JSON payload of stories
    view_published_jsonView the published JSON payload of stories
    manage_tagsCreate, edit, or delete tags
    edit_datasourcesEdit datasources
    edit_datasource_keysEdit datasources keys
    access_commerceAccess e-commerce features (if available)
    manage_block_libraryCreate, move, and edit blocks and folders
    hide_asset_foldersIf 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_OAUTH_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_OAUTH_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_OAUTH_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]}"