1. Docs
  2. API Reference
  3. Deactivate a user

Deactivate a user

POST/portal/v1/accounts/{accountSlug}/users/{id}/deactivate

Authentication

  • Bearer Token Authorization

    JWT access token

Path Parameters

Name Required Type Description
idRequiredstring

Code samples

cURLJavaScriptPythonGo
curl -X POST "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/users/value/deactivate" \
  -H "Authorization: Bearer $CANOPY_TOKEN"

Responses

200 User deactivated
{
  "message": "string"
}

application/json

  • messagestring*
401 Invalid or expired token
403 This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)
404 User not found

Returned object

On this page

Related endpoints

GETList users in Account
GETGet Account users summary
GETGet a user
DELETERemove user from Account
POSTActivate a user