Skip to main content
POST
Create document permission

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationName
string
required

The unique identifier of the organization Standard identifier pattern for resource names

Pattern: ^[a-zA-Z0-9_ -]+$
workspaceName
string
required

The unique identifier of the workspace Workspace name pattern. Allows any character except / (would split the FGA resource path — see ResourceIdentifier.parseFromFga) and * (FGA wildcard). 1-63 chars.

Pattern: ^(?!.*\*)(?!.*[/]).{1,63}$
documentPath
string
required

The path to the document within the workspace Document path. Permits alphanumerics, spaces, ASCII hyphen, Unicode en-dash/em-dash (U+2013/U+2014), and common title punctuation (& : , ' + ? ! ( ) $ ^). Bans path traversal (..). Length capped at 255 to match the underlying varchar(255) storage column. % is deliberately excluded because @InitBinder decodes %2F → / in path variables to fix encoded-slash routing, which would collide with any path that legitimately contained '%2F'.

Maximum string length: 255
Pattern: ^(?!.*\.\.)[a-zA-Z0-9_/. \-&:,'+?!()$^–—]+$

Query Parameters

requestPermission
boolean
default:false

Indicates that the user is requesting access to the resource

Body

application/json

Represents a permission assignment for a user or group within a document

userGroupId
string

A resource identifier that uniquely identifies either a user or a group within the system. This identifier is used throughout the API for permission management and access control.

Format:

  • For users: user:{email} or user:{userId}
  • For groups: group:{groupName}
Pattern: ^(user:[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}|group:[a-zA-Z0-9._-]+)$
permission
enum<string>

The role/permission level granted to the user or group

Available options:
editor,
viewer
inheritedPermission
enum<string>

The permission level inherited from parent workspace

Available options:
manager,
viewer
message
string

Optional message or note about the permission assignment

createdAt
string<date-time>

ISO 8601 timestamp indicating when the permission was created

updatedAt
string<date-time>

ISO 8601 timestamp indicating when the permission was last modified

Response

Document permission created successfully

Represents a permission assignment for a user or group within a document

userGroupId
string

A resource identifier that uniquely identifies either a user or a group within the system. This identifier is used throughout the API for permission management and access control.

Format:

  • For users: user:{email} or user:{userId}
  • For groups: group:{groupName}
Pattern: ^(user:[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}|group:[a-zA-Z0-9._-]+)$
permission
enum<string>

The role/permission level granted to the user or group

Available options:
editor,
viewer
inheritedPermission
enum<string>

The permission level inherited from parent workspace

Available options:
manager,
viewer
message
string

Optional message or note about the permission assignment

createdAt
string<date-time>

ISO 8601 timestamp indicating when the permission was created

updatedAt
string<date-time>

ISO 8601 timestamp indicating when the permission was last modified