Skip to content

Revoke a user's portal access

DELETE
/client-members/{memberId}/portal-access
Code sample: Shell / cURL
curl --request DELETE \
--url https://example.com/api/v1/client-members/example/portal-access \
--header 'Authorization: Bearer <token>'

Revokes one user’s portal access as the Users page row action does: to every live company the caller reaches, closing the account once the last one goes, or right away for a person with no company. A person who also holds a company the caller cannot reach keeps that access; one already revoked or inactive is skipped. Requires the clients.view and clients.edit permissions and the same reach as GET /client-members; anyone else answers 404.

memberId
required

WorkspaceMember id of the client person.

string
>= 1 characters

WorkspaceMember id of the client person.

What the revocation did.

Media typeapplication/json
object
data
required
object
failed
required

1 when the revocation was refused because the account changed meanwhile.

integer
>= -9007199254740991 <= 9007199254740991
people
required

1 when the person lost portal access.

integer
>= -9007199254740991 <= 9007199254740991

Example generated

{
"data": {
"failed": 1,
"people": 1
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Client person not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.