---
title: "Update Email Account"
method: PUT
path: "/email-accounts/{account_id}"
tags: ["integrations"]
---

# Update Email Account

`PUT /email-accounts/{account_id}`

## Request

- Base URL: `https://app.zeno-works.ch` (the document declares no server; this is the origin it was published from)
- URL: `https://app.zeno-works.ch/email-accounts/{account_id}`
- Auth: none declared

Partial update of an IMAP account (accountant/owner). Secret re-encrypted if supplied,
never returned. A company user's ``imap_host`` must resolve to a public address (422).

## Path parameters

- `account_id` string, required

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Request body

- EmailAccountUpdate: ``PUT /email-accounts/<id>`` body (admin) — partial update. Unset fields are not modified. ``imap_password`` is write-only; supplying it re-encrypts and replaces the stored secret.
  - `label` string, nullable
  - `imap_user` string, nullable
  - `imap_password` string, nullable
  - `imap_host` string, nullable
  - `imap_port` integer, nullable
  - `imap_tls` boolean, nullable
  - `imap_inbox` string, nullable
  - `imap_archive` string, nullable
  - `enabled` boolean, nullable
  - `poll_batch_cap` integer, nullable
  - `allow_private_host` boolean, nullable

## Response `200`

Successful Response

- EmailAccountResponse: ``GET/POST/PUT /email-accounts/...`` → ``{"email_account": ...}``.
  - `email_account` EmailAccountOut, required: Serialized IMAP account (no secret). ``imap_uri`` is computed.
    - `id` string, required
    - `company_id` string, required
    - `label` string, required
    - `enabled` boolean, required
    - `poll_batch_cap` integer, nullable
    - `imap_user` string, required
    - `imap_host` string, required
    - `imap_port` integer, required
    - `imap_tls` boolean, required
    - `imap_inbox` string, required
    - `imap_archive` string, nullable
    - `imap_uri` string, required
    - `allow_private_host` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zeno-works/apis/zeno-api.md) · [All operations](https://skmtc.dev/zeno-works/apis/zeno-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zeno-works/apis/zeno-api/revisions/1eb93dde146c?raw)
