Skip to content

Set a member's site access

PATCH
/v1/members/{memberId}/access
curl --request PATCH \
--url https://api.overwatch.weareheavy.dev/v1/members/example/access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "siteIds": [ "0a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9" ], "canCrawl": false }'

Set a restricted member’s per-site access allowlist and/or their crawl grant. siteIds: [] revokes all site access (members are default-deny). Role changes and removal have their own endpoints. Session-only, owner/admin.

memberId
required
string

The member’s id (from GET /v1/members).

Media typeapplication/json
object
siteIds

The sites the member may see. [] revokes all access.

Array<string>
canCrawl

Whether the member may trigger manual crawls.

boolean
Example
{
"siteIds": [
"0a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9"
],
"canCrawl": false
}

The grants were updated.

Media typeapplication/json
object
ok
required
boolean
Example
{
"ok": true
}

siteIds is not an array or names a site the organization doesn’t own.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Examplegenerated
{
"error": "example"
}

Missing or invalid credentials.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "invalid api key"
}

A dashboard session is required (API-key callers are rejected), or the session’s role does not allow this action.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "a dashboard session is required"
}

No member with that id exists in your organization.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "member not found"
}