---
title: "openemail account"
description: "Every command in this namespace, with its arguments, flags and examples."
url: "https://openemail.uk/docs/cli/reference/account"
area: "CLI"
category: "Reference"
---

# openemail account

Every command in this namespace, with its arguments, flags and examples.

## Commands

### `openemail account get-notifications`

Read your notification settings

```bash
openemail account get-notifications [flags]
```

Resolves which kinds of email OpenEmail sends the person, as Account, Notifications shows them, and the workspaces whose notifications are muted on their phone. An API key answers for the workspace owner, and an app for the person who connected it.

- Scopes: `account:read`.
- Needs a sign-in.

**Examples**

```bash
openemail account get-notifications
```

Print the raw JSON

```bash
openemail account get-notifications --json
```

Also available in: API [`GET /account/notifications`](https://openemail.uk/docs/api/reference/your-account#get-account-notifications); SDK [`account.getNotifications()`](https://openemail.uk/docs/sdk/reference/account#getNotifications).

### `openemail account set-email-notification`

Turn a kind of email on or off

```bash
openemail account set-email-notification <category> --enabled [flags]
openemail account set-email-notification <category> --data <json|@file|-> [flags]
```

`enabled: false` stops OpenEmail sending the person that kind of email, and `true` starts it again. `activity` and `product` can be turned off. `account` and `billing` cannot, and asking to is a 422 `invalid_parameter` on `category`.

- Scopes: `account:write`.
- Needs a sign-in.

**Arguments**

- `<category>` (required): `account`, `billing`, `activity` or `product`.

**Flags**

- `--enabled`: True to receive that email, false to stop it. Required, here or in `--data`.
- `--data <json|@file|->`: The whole `body` as JSON, inline, from a file with @path, or - for standard input. Flags override its keys.

**Examples**

```bash
openemail account set-email-notification product --no-enabled
```

Read the whole body from a JSON file

```bash
openemail account set-email-notification product --data @account.json
```

Also available in: API [`PUT /account/notifications/email/{category}`](https://openemail.uk/docs/api/reference/your-account#put-account-notifications-email-category); SDK [`account.setEmailNotification()`](https://openemail.uk/docs/sdk/reference/account#setEmailNotification).

### `openemail account set-push-muted`

Mute a workspace on your phone

```bash
openemail account set-push-muted <workspace-id> --muted [flags]
openemail account set-push-muted <workspace-id> --data <json|@file|-> [flags]
```

`muted: true` stops the phone app notifying the person about the mail of one workspace, on every phone they signed in on, and `false` lets it notify them again.

- Scopes: `account:write`.
- Needs a sign-in.

**Arguments**

- `<workspace-id>` (required): A workspace id from `workspaces.list`.

**Flags**

- `--muted`: True to mute it, false to let it notify again. Required, here or in `--data`.
- `--data <json|@file|->`: The whole `body` as JSON, inline, from a file with @path, or - for standard input. Flags override its keys.

**Examples**

```bash
openemail account set-push-muted 10417196-e324-4283-af98-66ec62167c47 --muted
```

Read the whole body from a JSON file

```bash
openemail account set-push-muted 10417196-e324-4283-af98-66ec62167c47 --data @account.json
```

Also available in: API [`PUT /account/notifications/push/{workspaceId}`](https://openemail.uk/docs/api/reference/your-account#put-account-notifications-push-workspaceid); SDK [`account.setPushMuted()`](https://openemail.uk/docs/sdk/reference/account#setPushMuted).

### `openemail account set-photo`

Set your profile photo

```bash
openemail account set-photo <data> [flags]
```

Sends the image bytes as the request body, replacing the person's profile photo, as Account, Profile does. PNG, JPEG, WebP and GIF are accepted, up to 5 MB. The server fits the image into a 512 pixel square, stores it as WebP and keeps the first frame of an animation.

`data` is a `Blob`, an `ArrayBuffer` or a `Uint8Array`. The type is read from `--content-type`, or from a `Blob`'s own type when that is left out. Without either the bytes go as `application/octet-stream` and the server refuses them with 422 `invalid_image`.

- Scopes: `account:write`.
- Needs a sign-in.

**Arguments**

- `<data>` (required): The image: a `Blob`, `ArrayBuffer` or `Uint8Array`.

**Flags**

- `--content-type <value>`: `image/png`, `image/jpeg`, `image/webp` or `image/gif`. Required unless `data` is a `Blob` with a type.

**Examples**

The required values only

```bash
openemail account set-photo ./photo.jpg
```

With optional flags

```bash
openemail account set-photo ./photo.jpg --content-type image/jpeg
```

Also available in: API [`PUT /account/photo`](https://openemail.uk/docs/api/reference/your-account#put-account-photo); SDK [`account.setPhoto()`](https://openemail.uk/docs/sdk/reference/account#setPhoto).

### `openemail account remove-photo`

Remove your profile photo

```bash
openemail account remove-photo [flags]
```

Removes the profile photo and deletes the stored image, so the app shows the person's initials again. Removing it when there is none changes nothing.

- Scopes: `account:write`.
- Needs a sign-in.
- Asks you to confirm.

**Examples**

```bash
openemail account remove-photo
```

Skip the confirmation, for scripts

```bash
openemail account remove-photo --yes
```

Also available in: API [`DELETE /account/photo`](https://openemail.uk/docs/api/reference/your-account#delete-account-photo); SDK [`account.removePhoto()`](https://openemail.uk/docs/sdk/reference/account#removePhoto).

### `openemail account get-username`

Read your username

```bash
openemail account get-username [flags]
```

Resolves the person's username, whether they chose it or it was made for them from their name, and the free address it gives them when this deployment offers one. A username the person chose never changes.

- Scopes: `account:read`.
- Needs a sign-in.

**Examples**

```bash
openemail account get-username
```

Print the raw JSON

```bash
openemail account get-username --json
```

Also available in: API [`GET /account/username`](https://openemail.uk/docs/api/reference/your-account#get-account-username); SDK [`account.getUsername()`](https://openemail.uk/docs/sdk/reference/account#getUsername).

### `openemail account check-username`

Check a username

```bash
openemail account check-username <username> [flags]
```

Says whether the person could choose a username, without choosing it, and why not when they could not. The username is lowercased and its spaces become dots before it is checked, as the app does, and `username` in the answer is the form that was checked.

- Scopes: `account:read`.
- Needs a sign-in.

**Arguments**

- `<username>` (required): Up to 60 characters before it is tidied.

**Examples**

```bash
openemail account check-username ada.lovelace
```

Print the raw JSON

```bash
openemail account check-username ada.lovelace --json
```

Also available in: API [`GET /account/username/availability`](https://openemail.uk/docs/api/reference/your-account#get-account-username-availability); SDK [`account.checkUsername()`](https://openemail.uk/docs/sdk/reference/account#checkUsername).

### `openemail account set-username`

Choose your username

```bash
openemail account set-username <username> [flags]
```

Sets the person's username for good, and with it their free address. Once chosen it never changes: a second choice is refused with 409 `username_locked`. A username another account has is a 409 `username_taken`, and one that is too short, too long, reserved or not lowercase letters, numbers and single dots is a 422 `invalid_parameter` on `username`. Check one first with `checkUsername`.

- Scopes: `account:write`.
- Needs a sign-in.
- Asks you to confirm.

**Arguments**

- `<username>` (required): 3 to 30 lowercase letters, numbers and single dots once it is tidied.

**Examples**

```bash
openemail account set-username ada.lovelace
```

Skip the confirmation, for scripts

```bash
openemail account set-username ada.lovelace --yes
```

Also available in: API [`PUT /account/username`](https://openemail.uk/docs/api/reference/your-account#put-account-username); SDK [`account.setUsername()`](https://openemail.uk/docs/sdk/reference/account#setUsername).

### `openemail account list-connected-apps`

List your connected apps

```bash
openemail account list-connected-apps [flags]
```

Resolves every app the person connected with OAuth, as Account, Connected apps lists them: the workspace and the permissions each may reach, until when, how many tokens it holds, and until when it may make changes that ask for a verification code without one. `current` marks the app making the call.

What an app may reach is changed in the app, never through an app.

- Scopes: `account:read`.
- Needs a sign-in.

**Examples**

```bash
openemail account list-connected-apps
```

Print the raw JSON

```bash
openemail account list-connected-apps --json
```

Also available in: API [`GET /account/connected-apps`](https://openemail.uk/docs/api/reference/your-account#get-account-connected-apps); SDK [`account.listConnectedApps()`](https://openemail.uk/docs/sdk/reference/account#listConnectedApps).

### `openemail account revoke-connected-app`

Remove a connected app

```bash
openemail account revoke-connected-app <client-id> [flags]
```

Deletes every token the app holds and the access the person gave it, so its next call is refused and it has to ask again, as removing it in Account, Connected apps does. Removing the app making the call disconnects it.

- Scopes: `account:write`.
- Needs a sign-in.
- Asks you to confirm.

**Arguments**

- `<client-id>` (required): The app's `clientId` from `listConnectedApps`.

**Examples**

```bash
openemail account revoke-connected-app client_4c1b257a
```

Skip the confirmation, for scripts

```bash
openemail account revoke-connected-app client_4c1b257a --yes
```

Also available in: API [`DELETE /account/connected-apps/{clientId}`](https://openemail.uk/docs/api/reference/your-account#delete-account-connected-apps-clientid); SDK [`account.revokeConnectedApp()`](https://openemail.uk/docs/sdk/reference/account#revokeConnectedApp).

### `openemail account list-invitations`

List your invitations

```bash
openemail account list-invitations [flags]
```

Resolves the invitations to join a workspace that are waiting for the address the person signs in with, oldest first. Expired, accepted and withdrawn ones are left out. The invitations a workspace sent are `members.listInvitations` instead.

- Scopes: `account:read`.
- Needs a sign-in.

**Examples**

```bash
openemail account list-invitations
```

Print the raw JSON

```bash
openemail account list-invitations --json
```

Also available in: API [`GET /account/invitations`](https://openemail.uk/docs/api/reference/your-account#get-account-invitations); SDK [`account.listInvitations()`](https://openemail.uk/docs/sdk/reference/account#listInvitations).

### `openemail account accept-invitation`

Accept an invitation

```bash
openemail account accept-invitation <invitation-id> [flags]
```

Joins the workspace with the role and the addresses the invitation gives, as accepting it in the app or from its link does. `--activate` also makes it the workspace the app opens for the person.

A workspace that asks everyone in it to sign in with two-factor authentication is refused with 403 `two_factor_required` until the person turns it on. An invitation that expired, was withdrawn or went to another address is a 422, and one that is not waiting any more a 404 `invitation_not_found`.

- Scopes: `account:write`.
- Needs a sign-in.

**Arguments**

- `<invitation-id>` (required): An invitation id from `listInvitations`.

**Flags**

- `--activate`: True to make it the workspace the app opens. Defaults to false.

**Examples**

The required values only

```bash
openemail account accept-invitation winv_6bb640f5b99e47deb758f1f5
```

With optional flags

```bash
openemail account accept-invitation winv_6bb640f5b99e47deb758f1f5 --activate
```

Also available in: API [`POST /account/invitations/{invitationId}/accept`](https://openemail.uk/docs/api/reference/your-account#post-account-invitations-invitationid-accept); SDK [`account.acceptInvitation()`](https://openemail.uk/docs/sdk/reference/account#acceptInvitation).

### `openemail account decline-invitation`

Decline an invitation

```bash
openemail account decline-invitation <invitation-id> [flags]
```

Turns the invitation down, so its link stops working, and tells whoever sent it. It cannot be taken back: they have to invite the person again. An invitation the person already accepted is refused with 409 `invitation_accepted`.

- Scopes: `account:write`.
- Needs a sign-in.
- Asks you to confirm.

**Arguments**

- `<invitation-id>` (required): An invitation id from `listInvitations`.

**Examples**

```bash
openemail account decline-invitation winv_6bb640f5b99e47deb758f1f5
```

Skip the confirmation, for scripts

```bash
openemail account decline-invitation winv_6bb640f5b99e47deb758f1f5 --yes
```

Also available in: API [`POST /account/invitations/{invitationId}/decline`](https://openemail.uk/docs/api/reference/your-account#post-account-invitations-invitationid-decline); SDK [`account.declineInvitation()`](https://openemail.uk/docs/sdk/reference/account#declineInvitation).
