---
title: "Update Account"
method: PATCH
path: "/v0/accounts/{account_id}/update"
tags: ["accounts"]
---

# Update Account

`PATCH /v0/accounts/{account_id}/update`

## Request

- Base URL: `https://api.agentmail.to`
- URL: `https://api.agentmail.to/v0/accounts/{account_id}/update`
- Auth: HTTP bearer

Updates one account. Set `status` to `disabled` to stop the inbox from
signing in at the app again, or to `enabled` to re-enable it.
Idempotent: disabling an already disabled account keeps its original
`disabled_at`, and enabling an enabled account is a no-op.

Find the `account_id` with List Accounts. An account exists only after an
inbox's first sign-in at an app, so it cannot be disabled in advance.
A disable applies to that inbox at that app whichever sign-in key is
used: the app's next authorization ends in `access_denied`, and a code
issued earlier is refused with `invalid_grant`. Access tokens already
issued stay valid until they expire, and the app's own session is
unaffected.

Requires `account_update`, which sign-in keys (`type: public_key`) cannot
hold, so call this with a bearer API key. An account outside the key's
scope is a 404. A 409 means the account changed during the write; read it
again and retry.

## Path parameters

- `account_id` string, uuid, required: ID of account.

## Request body

- AccountsUpdateAccountRequest: Fields to change on the account. Fields you omit are left unchanged and unknown fields are rejected. Expects at least one field; today that is `status`.
  - `status` 'enabled' | 'disabled': Status to set. `disabled` stops the inbox from signing in at the app; `enabled` re-enables it. An enabled account reads back with no `status`.

## Response `200`

Response with status 200

- AccountsAccount: One inbox signed in at one app.
  - `account_id` string, uuid, required: ID of account.
  - `app_id` string, uuid, required: ID of app.
  - `app_name` string: Display name of app.
  - `inbox_id` string, required: The ID of the inbox.
  - `pod_id` string, required: ID of pod.
  - `organization_id` string, required: ID of organization.
  - `first_signed_in_at` string, date-time, required: Time of first sign-in at app.
  - `last_signed_in_at` string, date-time, required: Time of most recent sign-in at app.
  - `sign_in_count` integer, required: Number of sign-ins at app.
  - `status` 'disabled': `disabled` refuses every new sign-in for the account until it is re-enabled. Access tokens already issued are not revoked.
  - `disabled_at` string, date-time: Time at which the account was disabled. Present only while `status` is `disabled`.

## Other responses

- `400`: Error response with status 400
- `404`: Error response with status 404
- `409`: Error response with status 409

## Changes

- **2026-10-16** `3f5c7830c952`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentmail-to/apis/api/changes/v0/accounts/:account_id/update/patch.md)

---

[API](https://skmtc.dev/agentmail-to/apis/api.md) - [All operations](https://skmtc.dev/agentmail-to/apis/api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentmail-to/apis/api/revisions/a9792efe7bdf?raw)
