POST
/
users
/
{user_id}
/
accounts
cURL
curl --request POST \
  --url http://localhost:8080/users/{user_id}/accounts \
  --header 'Content-Type: application/json' \
  --data '
{
  "account_details": {
    "ifsc_code": "<string>"
  },
  "external_account_id": "<string>"
}
'
{
  "account_details": {
    "ifsc_code": "<string>"
  },
  "created_at": "<string>",
  "external_account_id": "<string>",
  "holder": "user:012345678901",
  "id": "<string>",
  "last_modified_at": "<string>"
}

Path Parameters

user_id
string
required

User ID

Body

application/json
account_details
object
required

Tagged JSONB blob persisted into accounts.account_details. Mirrors accounts.account_type — types that carry extra metadata (e.g. SAVINGS → IFSC) embed it; the rest are unit variants. Bank account numbers / PBA UUIDs live in accounts.external_account_id.

account_type
enum<string>
required

Type of financial or health account.

Available options:
SAVINGS,
HSA,
EDUCATION,
SPONSOR
external_account_id
string
required

Response

Account created

account_details
object
required

Tagged JSONB blob persisted into accounts.account_details. Mirrors accounts.account_type — types that carry extra metadata (e.g. SAVINGS → IFSC) embed it; the rest are unit variants. Bank account numbers / PBA UUIDs live in accounts.external_account_id.

account_type
enum<string>
required

Type of financial or health account.

Available options:
SAVINGS,
HSA,
EDUCATION,
SPONSOR
created_at
string
required
external_account_id
string
required
holder
string
required
Example:

"user:012345678901"

id
string
required
last_modified_at
string
required
status
enum<string>
required

Account lifecycle status.

Available options:
ACTIVE,
INACTIVE,
PENDING