Skip to navigation

Grant workspace permissions to users or teams

View as Markdown

This endpoint allows creating a grant which specifies permissions for one or more users or teams to access a workspace.

Usage notes

  • Grants: An array of grant objects. Each object specifies a grantee and the permission level assigned to them.

  • Retrieve the workspaceId by calling the /v2/workspaces endpoint.

  • Do not set both memberId and teamId in the same grantee object. Instead, choose one based on the target of the grant.

    • Retrieve the memberId by calling the /v2/members endpoint.
    • Retrieve the teamId by calling the /v2/teams endpoint.

Usage scenarios

  • Access control setup: Use this endpoint to set up or modify access controls for a workspace, specifying which users or teams can access and what actions they can perform.

Best practices

  • Clear permission definitions: Ensure that the permissions granted are well understood by both the grantor and the grantee to avoid misuse of access rights.

Authentication

AuthorizationBearer

OAuth authentication of the form <token>.

Path parameters

workspaceIdstringRequired
Unique identifier of the workspace.

Request

The request body.
grantslist of objectsRequired

Response

The response body.