> For the complete documentation index, see [llms.txt](https://xerial.gitbook.io/xerial-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xerial.gitbook.io/xerial-doc/xerial-apis/wallet-api/custodial-wallets/create-wallet.md).

# Create Wallet

The "Create Wallet" endpoints allows for the creation of a Xerial Wallet  to a specified user in the xerial database.

## Overview

{% hint style="success" %}

### Endpoint

* **Method:** POST
* **URL:** /`wallet/{userId}`
  {% endhint %}

### Body

```json
{
     "type": "evm"
}
```

### Header

* **Field:** Authorization
* **Value:** `Bearer + (Access token)`

### Responses

#### Success (Code 200)

```json
{
    {
      "id": "656ab9db6a378b91ab1871be",
      "address": "0x8e9DD3c1Db3254d968967CbC367542C343273629",
      "smartAccount": "0x8e9DD3c1Db3254d968967CbC367542C343273629",
      "custodial": true,
      "user": "5ebac534954b54139806c112"
      "type":"evm"
    }
}
```

* **Media Type**: application/json
* **Example Value**: An object containing the all information about the wallet.

## Usage

1. **Send a POST request** to the `/wallet/{userId}`endpoint to create a wallet for the user.
2. **Handle the response accordingly** based on success, unauthorized access or internal server error.

**Note:** Ensure the user is authenticated before making the request.
