> ## Documentation Index
> Fetch the complete documentation index at: https://www.1password.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Suspend a user

Suspend a user. This action transitions the user's state from `ACTIVE` to `SUSPENDED` and suspends the user's access in the 1Password account.

The `:suspend` action is idempotent. Using this action on a user who is already suspended returns the user with no changes to their state.

<table>
  <thead>
    <tr>
      <th>Method</th>
      <th>Endpoint URL</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>POST</code></td>
      <td><code>\<base\_url>/v1beta1/accounts/\<account\_id>/users/\<user\_id>:suspend</code></td>
    </tr>
  </tbody>
</table>

## Restrictions

The following users can't be suspended from a 1Password account:

* Externally managed administrators (EAM users).
* The last remaining owner of an account.

Your integration should handle these outcomes gracefully (for example: log the failure and notify an administrator).

## Make a request

### Request headers

Include the following headers:

* `Authorization: Bearer <YOUR_ACCESS_TOKEN>`
* `User-Agent: <CompanyOrProductName>/<version>`

### Path parameters

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Required</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>account\_id</code></td>
      <td>string</td>
      <td><span class="badge badge--primary">Yes</span></td>
      <td>The unique identifier of the 1Password account.</td>
    </tr>

    <tr>
      <td><code>user\_id</code></td>
      <td>string</td>
      <td><span class="badge badge--primary">Yes</span></td>
      <td>The unique identifier of the user.</td>
    </tr>
  </tbody>
</table>

### Request body

This endpoint does not accept a request body.

### Example request

```shell theme={null}
curl --request POST \
  --url "https://api.1password.com/v1beta1/accounts/<account_id>/users/<user_id>:suspend" \
	--header "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
	--header "User-Agent: <CompanyOrProductName>/<version>"
```

## Receive a response

A successful response returns `200 OK` with the updated [User object](#user-object) with the state set to `SUSPENDED`.

### Example response

```json theme={null}
{
  "id": "IR7VJHJ36JHINBFAD7V2T5MP3E",
  "email": "wendy_appleseed@agilebits.com",
  "display_name": "Wendy Appleseed",
  "state": "SUSPENDED",
  "create_time": "2024-01-15T10:30:00Z",
  "path": "accounts/ACCOUNT123/users/IR7VJHJ36JHINBFAD7V2T5MP3E"
}
```

### Response schemas

#### User object

<table>
  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>id</code></td>
      <td>string</td>
      <td>User UUID.</td>
    </tr>

    <tr>
      <td><code>email</code></td>
      <td>string</td>
      <td>User email address.</td>
    </tr>

    <tr>
      <td><code>display\_name</code></td>
      <td>string</td>
      <td>User display name.</td>
    </tr>

    <tr>
      <td><code>state</code></td>
      <td>string</td>
      <td>User state. Possible values: <code>STATE\_UNSPECIFIED</code>, <code>ACTIVE</code>, <code>SUSPENDED</code>. This value is <code>SUSPENDED</code> for a successful response.</td>
    </tr>

    <tr>
      <td><code>create\_time</code></td>
      <td>string</td>
      <td>Date and time when the user was created. Uses the <a href="https://datatracker.ietf.org/doc/html/rfc3339">RFC 3339 standard <Icon icon="arrow-up-right-from-square" /></a>.</td>
    </tr>

    <tr>
      <td><code>path</code></td>
      <td>string</td>
      <td>Resource path for the user. Format: <code>accounts/\<account\_id>/users/\<user\_id></code>.</td>
    </tr>
  </tbody>
</table>
