---
title: "BlockAccount"
method: POST
path: "/gitpod.v1.AccountService/BlockAccount"
tags: ["gitpod.v1.AccountService"]
---

# BlockAccount

`POST /gitpod.v1.AccountService/BlockAccount`

Blocks an account, preventing all API access.

 Use this method to:
 - Revoke access for policy violations
 - Handle abuse cases
 - Enforce compliance requirements

 When an account is blocked:
 - All API requests return 403 PERMISSION_DENIED
 - All running environments are stopped
 - All active subscriptions are cancelled

 Requires the `block_account` permission.

 ### Examples

 - Block account for policy violation:

   ```yaml
   accountId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
   reason: "Terms of Service violation - spam"
   ```

## Request body

- GitpodV1BlockAccountRequest
  - `accountId` string, uuid, required — account_id is the UUID of the account to block
  - `reason` string, required — reason is the reason for blocking the account (required for audit trail)

## Response `200`

Success

- GitpodV1BlockAccountResponse
  - `environmentsStopped` integer — environments_stopped is the number of environments that were stopped
  - `subscriptionsCancelled` integer — subscriptions_cancelled is the number of subscriptions that were cancelled

## Other responses

- `default` — Error

---

[API](https://skmtc.net/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.net/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/44d50c2ac284/schema)
