Minimum

Create a new account

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.
post/accounts

Request body

Example request

{
  "kyc_data": {
    "type": "individual",
    "payload_version": 1,
    "given_name": "Tom",
    "surname": "Jack"
  },
  "balances": {
    "XUS": 1000000000
  }
}

Response

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

idstring required

ID of the resource created.

Changes

Changed in 3 of the 6 revisions of this API.4108

  • 64ebf1d3c93a37See the full diff
    • added the new required request property kyc_data/payload_version

      new-required-request-property

    • added the new required request property kyc_data/type

      new-required-request-property

    • the kyc_data request property type/format changed from string/ to object/

      request-property-type-changed

    • added the new optional request property kyc_data/address

      new-optional-request-property

    • added the new optional request property kyc_data/dob

      new-optional-request-property

    • added the new optional request property kyc_data/given_name

      new-optional-request-property

    • added the new optional request property kyc_data/legal_entity_name

      new-optional-request-property

    • added the new optional request property kyc_data/national_id

      new-optional-request-property

    • added the new optional request property kyc_data/place_of_birth

      new-optional-request-property

    • added the new optional request property kyc_data/surname

      new-optional-request-property

    • removed the optional property kyc_data from the response with the 201 status

      response-optional-property-removed

  • 118633303045191See the full diff
    • the kyc_data request property type/format changed from object/ to string/

      request-property-type-changed

    • removed the request property kyc_data/address

      request-property-removed

    • removed the request property kyc_data/dob

      request-property-removed

    • removed the request property kyc_data/given_name

      request-property-removed

    • removed the request property kyc_data/legal_entity_name

      request-property-removed

    • removed the request property kyc_data/national_id

      request-property-removed

    • removed the request property kyc_data/payload_version

      request-property-removed

    • removed the request property kyc_data/place_of_birth

      request-property-removed

    • removed the request property kyc_data/surname

      request-property-removed

    • removed the request property kyc_data/type

      request-property-removed

    • added the optional property kyc_data to the response with the 201 status

      response-optional-property-added

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog