> ## Documentation Index
> Fetch the complete documentation index at: https://dvaultdocs.dukka.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Account Management

> Create and manage wallet accounts in the Dukka Wallet Service

# Account Management

## Overview

The Account Management API allows you to create and manage wallet accounts in the Dukka Wallet Service. This guide explains how to use the API to perform various account operations.

## Endpoints

### Create Account

```http theme={null}
POST /api/v1/accounts/create
```

#### Request Body

```json theme={null}
{
  "accountName": "string",
  "accountType": "string",
  "currency": "string",
  "tierId": "string",
  "metadata": {
    "key": "value"
  }
}
```

#### Response

```json theme={null}
{
  "status": "success",
  "message": "Account created successfully",
  "data": {
    "accountId": "string",
    "accountName": "string",
    "accountType": "string",
    "currency": "string",
    "tierId": "string",
    "balance": 0,
    "createdAt": "string",
    "updatedAt": "string"
  }
}
```

### Get Account

```http theme={null}
GET /api/v1/accounts/{accountId}
```

#### Response

```json theme={null}
{
  "status": "success",
  "data": {
    "accountId": "string",
    "accountName": "string",
    "accountType": "string",
    "currency": "string",
    "tierId": "string",
    "balance": 0,
    "createdAt": "string",
    "updatedAt": "string"
  }
}
```

### Update Account

```http theme={null}
PUT /api/v1/accounts/{accountId}
```

#### Request Body

```json theme={null}
{
  "accountName": "string",
  "tierId": "string",
  "metadata": {
    "key": "value"
  }
}
```

#### Response

```json theme={null}
{
  "status": "success",
  "message": "Account updated successfully",
  "data": {
    "accountId": "string",
    "accountName": "string",
    "accountType": "string",
    "currency": "string",
    "tierId": "string",
    "balance": 0,
    "createdAt": "string",
    "updatedAt": "string"
  }
}
```

### List Accounts

```http theme={null}
GET /api/v1/accounts
```

#### Query Parameters

* `page` (optional): Page number
* `size` (optional): Number of items per page
* `accountType` (optional): Filter by account type
* `currency` (optional): Filter by currency
* `tierId` (optional): Filter by tier ID

#### Response

```json theme={null}
{
  "status": "success",
  "data": {
    "accounts": [
      {
        "accountId": "string",
        "accountName": "string",
        "accountType": "string",
        "currency": "string",
        "tierId": "string",
        "balance": 0,
        "createdAt": "string",
        "updatedAt": "string"
      }
    ],
    "pagination": {
      "page": 0,
      "size": 0,
      "total": 0,
      "totalPages": 0
    }
  }
}
```

## Error Responses

### 400 Bad Request

```json theme={null}
{
  "status": "error",
  "message": "Invalid request parameters"
}
```

### 401 Unauthorized

```json theme={null}
{
  "status": "error",
  "message": "Unauthorized access"
}
```

### 404 Not Found

```json theme={null}
{
  "status": "error",
  "message": "Account not found"
}
```

### 409 Conflict

```json theme={null}
{
  "status": "error",
  "message": "Account already exists"
}
```

## Best Practices

### Account Creation

* Validate all input data
* Implement proper error handling
* Use appropriate account types
* Set proper tier limits
* Implement proper logging

### Account Management

* Monitor account activity
* Implement proper access controls
* Use appropriate security measures
* Follow compliance requirements
* Implement proper audit trails

## Support

If you need help with account management:

1. Check the [documentation](/api/account)
2. Contact [support](mailto:support@dukka.com)
3. Report issues on [GitHub](https://github.com/dukka/dukka-wallet-service/issues)

## Additional Resources

* [Authentication Guide](/api/authentication)
* [Security Guidelines](/api/security)
* [Developer Guide](/getting-started)
* [API Reference](/api/account)
