---
title: "Manage your account"
sidebarTitle: "Manage your account"
description: "Change your password, verify your email address, sign out of every device, and switch between the organizations you belong to."
keywords: ["password", "change password", "verify email", "sign out everywhere", "sessions", "switch organization", "account"]
---

These are the things you do to your own account, as opposed to your
organization. All of them need a signed-in person: an API key or a workload
credential is refused with `403`, because a machine has no password, no mailbox
and no sessions.

## Change your password

**Settings → Security → Change password**, or:

```bash
curl -s -X POST https://app.trustivan.com/api/v1/me/password \
  -H 'Content-Type: application/json' \
  -b cookies.txt \
  -H "X-CSRF-Token: $(grep trustivan_csrf cookies.txt | awk '{print $7}')" \
  -d '{"current_password": "…", "new_password": "…", "code": "123456"}'
```

- You need your current password.
- If you have a second factor, `code` must be a current TOTP code. A recovery
  code is not accepted here.
- The new password must be at least 8 characters and at most 72 bytes.

A successful change answers `204` and **ends every session on your account,
including the one you made the change from**. You sign in again with the new
password. The change is recorded in the audit trail as `user.password_changed`.

A refusal carries a machine-readable `code` and is never `401`, because your
session was valid:

| Status | `code` or field | Meaning |
|---|---|---|
| `400` | `current_password_incorrect` | The current password did not match |
| `400` | `mfa_required` | You have a second factor and sent no valid code |
| `400` | `weak_password` | The new password does not meet the policy |
| `403` | `sso_required: true` | Your organization requires single sign-on. Only an owner with a second factor can change a password here |
| `409` | `no_password` | Your account signs in only through a provider. Use the reset flow to set a password |

If you sign in with GitHub, GitLab or Google, that account's password and its
own two-factor settings are managed with the provider. TRUSTIVAN never sees
that password.

If you have forgotten your password, see
[When a password is lost](/getting-started/signing-in#when-a-password-is-lost).

## Verify your email address

A verification link is mailed when you sign up. To send another:

```bash
curl -s -X POST https://app.trustivan.com/api/v1/me/verify-email \
  -b cookies.txt \
  -H "X-CSRF-Token: $(grep trustivan_csrf cookies.txt | awk '{print $7}')"
```

```json
{ "status": "sent", "expires_in_seconds": 86400 }
```

`status` is `sent` or `already_verified`; `expires_in_seconds` is how long the
link in that mail stays usable. Opening the link redeems it. Two rules apply:

- A new link invalidates the previous one.
- At most one link is sent per minute. A second request inside that minute is
  `429`.

On a deployment with no mail configured, the request answers `503` with
`mail_unavailable: true`, and there is no self-service path: ask whoever
operates the deployment.

<Note>
  Whether an unverified address can sign in is the operator's choice
  (`REQUIRE_EMAIL_VERIFICATION`, see
  [Environment variables](/configuration/environment)). Where it is required, a
  sign-in refused for that reason answers `401` with
  `code: email_not_verified` and mails a fresh link.
</Note>

## Sign out, and sign out everywhere

**Sign out** ends the session in the browser you are using.

**Sign out everywhere**, under **Settings → Security → Sign-in**, is the
control for a lost or stolen device. It ends every session your account holds,
on every device, including the one you press it from:

```bash
curl -s -X POST https://app.trustivan.com/api/v1/auth/logout-all \
  -b cookies.txt \
  -H "X-CSRF-Token: $(grep trustivan_csrf cookies.txt | awk '{print $7}')"
```

A `204` means every session was revoked. Access already issued stops working
on its next request instead of living out its remaining lifetime. Nothing
about your account or your memberships changes, so you can sign straight back
in.

<Warning>
  A `500` means the sessions could not be revoked and nothing is guaranteed to
  have been signed out. Try again; do not assume a stolen session is dead.
</Warning>

This does not touch API keys. A key is not a session; you stop one by
[revoking it](/how-to/rotate-an-api-key#3-revoke-the-old-one).

## Switch organization

You can belong to several organizations. Every request acts in exactly one,
and the organization menu at the top of the dashboard chooses which.

```bash
# The organizations you belong to, with your role in each
curl -s https://app.trustivan.com/api/v1/me/orgs -b cookies.txt \
  | jq '.organizations[] | {id, name, role, active}'

# Choose one
curl -s -X PUT https://app.trustivan.com/api/v1/me/active-org \
  -H 'Content-Type: application/json' \
  -b cookies.txt \
  -H "X-CSRF-Token: $(grep trustivan_csrf cookies.txt | awk '{print $7}')" \
  -d '{"organization_id": "…"}'
```

The choice belongs to you, not to a browser tab: it moves every session you
hold, including NHI Security, and survives your next sign-in. A tab left open
on the previous organization is refused and reloads into the current one. See
[Working in more than one organisation](/concepts/tenancy#working-in-more-than-one-organisation).

## What you cannot do yourself

- **Delete your account.** There is no endpoint for it. An administrator can
  remove you from an organization under **Settings → Members**.
- **Change your role.** Someone with a role at least as high as the one being
  granted does that, under **Settings → Members**.

## See also

- [Set up multi-factor authentication](/how-to/set-up-multi-factor-authentication)
- [Getting access to your workspace](/getting-started/signing-in)
