Skip to content

Revoke sub user

Request

Revokes (soft-destroys) a sub user and every credential it holds: its API keys are deleted, and its OAuth access tokens, refresh tokens and unexchanged authorization codes are revoked.

It does not work the other way round: deleting one of a sub user's API keys leaves the sub user and its other credentials alone. Revoking one of its OAuth tokens does deactivate it, because a sub user exists for one authorization -- see POST /oauth_token/remove/{oauth_token_id}.

An administrator may revoke any sub user in the account; a non-administrator only their own. Sub users themselves are refused entirely.

Security
ApiKeyAuth
Path
sub_user_idinteger(id)required

unique identifier of the sub user

Example:123
curl -i -X POST \
  https://api.treasuredata.com/v3/sub_user/remove/123 \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
sub_userobjectrequired
Response
{ "sub_user": { "id": 123, "email": "string" } }