Grant Site Access

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`

Authentication

AuthorizationBearer

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

Path parameters

site_idstringRequiredformat: "objectid"
Unique identifier for a Site

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

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error