---
title: "Create a new account"
method: POST
path: "/accounts"
tags: ["Minimum"]
---

# Create a new account

`POST /accounts`

This method creates a new account. 

* The Diem MiniWallet Test Suite isolates test data by creating a new account for each test case.
* Client should store the response account ID for all the operations to the account.
* The balances property value shows the initial currency deposits to the account. Client can use the  get account balances endpoint to check the account balances available after creating the account. 
* When the account is required to provide Know Your Customer (KYC) data during an off-chain transaction,
 the server should use the kyc_data property value as the KycDataObject and send it to the counterparty service.

## Request body

- CreateAccountRequest
  - `kyc_data` KycDataObject — A KycDataObject represents the know your customer or know your client (KYC) data required for exchanging KYC data in Diem off-chain API. It matches Diem off-chain KycDataObject listed at https://dip.diem.com/dip-1/#kycdataobject.
    - `payload_version` string, required — Version identifier to allow modifications to KYC data Object without needing to bump version of entire API set. Set to 1
    - `type` 'individual' | 'entity', required
    - `given_name` string — Legal given name of the user for which this KYC data Object applies.
    - `surname` string — Legal surname of the user for which this KYC data Object applies.
    - `address` Address
      - `city` string — The city, district, suburb, town, or village
      - `country` string — Two-letter country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
      - `line1` string — Address line 1
      - `line2` string — Address line 2 - apartment, unit, etc.
      - `postal_code` string — ZIP or postal code
      - `state` string — State, county, province, region.
    - `dob` string — Date of birth for the holder of this account. Specified as an ISO 8601 calendar date format: https://en.wikipedia.org/wiki/ISO_8601
    - `place_of_birth` Address
      - `city` string — The city, district, suburb, town, or village
      - `country` string — Two-letter country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
      - `line1` string — Address line 1
      - `line2` string — Address line 2 - apartment, unit, etc.
      - `postal_code` string — ZIP or postal code
      - `state` string — State, county, province, region.
    - `national_id` NationalId — National ID information for the holder of this account
      - `id_value` string, required — Indicates the national ID value - for example, a social security number
      - `county` string — Two-letter country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
      - `type` string — Indicates the type of the ID
    - `legal_entity_name` string — Name of the legal entity. Used when subaddress represents a legal entity rather than an individual. KycData should only include one of legal_entity_name OR given_name/surname
  - `balances` Balances
    - `XUS` integer
    - `XDX` integer

## Response `201`

Account is created; currency balances are deposited to the account if provided.

- ResourceID
  - `id` string, required — ID of the resource created.

## Other responses

- `400` — Invalid input

---

[API](https://skmtc.net/diem/apis/mini-wallet-api-specification.md) · [All operations](https://skmtc.net/diem/apis/mini-wallet-api-specification/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/diem/mini-wallet-api-specification/versions/b3821c80b8b2/schema)
