Grant a workspace member access to a site, named by `email` or `memberId`.
This creates access — it does not change an existing grant. A member who already has access to this site is refused with `member_already_has_access`; use `PATCH` to change their Site Role instead.
<Warning title="Enterprise Only">This endpoint requires an Enterprise workspace.</Warning>
Required scope | `site_access:write`
Request
This endpoint expects an object.
siteRoleenumRequired
The Site Role to grant
emailstringOptional
Email address of the Workspace Member to grant access to. Provide either email or memberId, not both.
memberIdstringOptionalformat: "objectid"
ID of the Workspace Member to grant access to. Provide either email or memberId, not both.
siteRoleIdstringOptionalformat: "objectid"
ID of the custom Site Role to grant. Required when siteRole is custom, and rejected with any other siteRole. Rejected if the id doesn’t name a custom Site Role belonging to this workspace.
Response
Request was successful
idstringformat: "objectid"
Unique identifier for the Member
rolesobject
Roles the Member holds
emailstringOptional
Email address of the Member
firstNamestringOptional
First name of the Member
lastNamestringOptional
Last name of the Member