---
title: "Email/Password Auth"
description: "To create a new user account, you need to send a POST request to the following endpoint:"
stack: "Community Stack (open source) — version 0.21.0"
stack_version: "0.21.0"
stack_comparison: https://docs.walt.id/community-vs-enterprise.md
canonical_url: https://docs.walt.id/community-stack/wallet/authentication/email-password-auth
generated: 2026-07-20
---
# Email/Password Auth

To create a new user account, you need to send a `POST` request to the following endpoint:

## Create User Account

**Option: CURL**

[API Reference](https://wallet.demo.walt.id/swagger/index.html#/Authentication/post_wallet_api_auth_create)

Each created account receives a default "did:key" and private key (Ed25519).

```bash
curl -X 'POST' \
  'http://0.0.0.0:7001/wallet-api/auth/register' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Max Mustermann",
  "email": "test@email.com",
  "password": "password",
  "type": "email"
}'
```

**Body Parameters**

```json
{
  "name": "string",
  "email": "string",
  "password": "string",
  "type": "{type}"
}
```

- `name`: _[string]_ - The name of the user.
- `email`: _[string]_ - The email of the user.
- `password`: _[string]_ - The password of the user.
- `type`: _[string]_ - The type of the user account. `email` or `address` (for web3 login).

## Login

**Option: CURL**

[API Reference](https://wallet.demo.walt.id/swagger/index.html#/Authentication/post_wallet_api_auth_login)

```bash
curl -X 'POST' \
 'http://0.0.0.0:7001/wallet-api/auth/login' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "email",
  "email": "user@email.com",
  "password": "password"
}'
```

**Body Parameters**

```json
{
  "type": "{type}",
  "email": "string",
  "password": "string"
}
```

- `type`: _[string]_ - The type of the user account. `email` or `address` (for web3 login).
- `email`: _[string]_ - The email of the user.
- `password`: _[string]_ - The password of the user.

**Example Response**
<br />
Now a session is automatically created for cookie-based authentication. For Bearer Token Authentication, the `token`
returned
must be provided in the header for each request that needs authentication. Refer to
the [overview section](https://docs.walt.id/community-stack/wallet/authentication/overview.md#cookie-based-authentication) for more details.

```json
{
  "token": "KL-a_dk1qO8moCX4gxaGfb7_TS8RK-JWVKZk9BBP0-s",
  "id": "018045e5-942c-4362-b535-658c4dd581ef",
  "username": "user@email.com"
}
```

## Logout

**Option: CURL**

[API Reference](https://wallet.demo.walt.id/swagger/index.html#/Authentication/post_wallet_api_auth_logout)

Deletes the session/invalidates the token.

```bash
curl -X 'POST' \
  'http://0.0.0.0:7001/wallet-api/auth/logout' \
  -H 'accept: */*' \
  -d ''
```
