---
title: "Register Wallet Rails"
method: POST
path: "/v2/profiles/wallet-rails"
tags: ["v2 - Profiles"]
---

# Register Wallet Rails

`POST /v2/profiles/wallet-rails`

## Request

- Base URL: `https://api.jubjubapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jubjubapp.com/v2/profiles/wallet-rails`
- Auth: HTTP bearer

Register wallet rails (Privy wallet) for the authenticated user.

Writes wallet_rails structured metadata and appends the address to
wallet_addresses for fast array-contains lookups. Both fields are
written in a single Firestore update.

Idempotent: returns 200 if already registered with the same privy_user_id.
Returns 409 if wallet_rails.evm exists with a different privy_user_id.

## Headers

- `Authorization` string
- `X-JubJub-Service-Key` string
- `X-JubJub-Agent-Key` string
- `X-JubJub-Platform-Key` string
- `Origin` string
- `Referer` string
- `X-JubJub-Trial-Token` string

## Request body

- RegisterWalletRailsRequest
  - `wallet_address` string, required: Primary EVM address (smart wallet if available, else embedded EOA)
  - `privy_user_id` string, nullable: Privy DID e.g. did:privy:xxxx (Privy path)
  - `embedded_address` string, nullable: Embedded EOA signer address (if different from primary)
  - `wallet_type` string, nullable: 'smart_wallet', 'embedded', or 'external'
  - `signature` string, nullable: EIP-191 signature over the SIWE message from /v2/auth/wallet-nonce (external path)
  - `nonce` string, nullable: Nonce previously issued by /v2/auth/wallet-nonce (external path)

## Response `200`

Successful Response

- WalletRailsResponse
  - `wallet_rails` object, nullable
  - `message` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/jubjubapp/apis/jubjub-api.md) - [All operations](https://skmtc.dev/jubjubapp/apis/jubjub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jubjubapp/apis/jubjub-api/revisions/353157b296f2?raw)
