---
title: "Prepare account for registration"
method: POST
path: "/setup-account"
tags: ["Accounts"]
---

# Prepare account for registration

`POST /setup-account`

Derive the Rhinestone smart account for (ownerAddress, sessionOwnerAddress), compare against the existing registration and target, and return either the Solana deposit address (if no re-registration is needed) or the unsigned session details and factory parameters the client must sign before calling /register.

## Headers

- `x-api-key` string, required — API key for authentication
- `x-api-version` string — API version identifier (e.g. "2026-04.amazon"). Optional today, will become required in a future release.

## Request body

- SetupAccountRequestBody
  - `ownerAddress` string, required — Ethereum address (0x followed by 40 hex characters)
  - `sessionOwnerAddress` string, required — Ethereum address (0x followed by 40 hex characters)
  - `targetToken` string, required
  - `targetChain` union, required — Chain identifier as a positive integer or CAIP-2 string (e.g. "eip155:8453")
    - integer
    - string
  - `recipient` string
  - `outputTokenRules` OutputTokenRule[]
    - `match` OutputTokenRuleMatch, required — Source-token match criteria. Rules may match by source chain, source token address, source symbol, or a combination.
      - `chain` string — CAIP-2 chain identifier (e.g. "eip155:8453")
      - `token` string
      - `symbol` string
    - `outputToken` string, required
  - `rejectUnmapped` boolean
  - `postBridgeActions` unknown
  - `signerAddress` string — Ethereum address (0x followed by 40 hex characters)
  - `sessionChainIds` integer[]
  - `forceRegister` boolean

## Response `200`

Account setup result

- SetupAccountResponse
  - `smartAccount` string, required — Ethereum address (0x followed by 40 hex characters)
  - `isRegistered` boolean, required
  - `targetChain` string
  - `targetToken` string
  - `needsRegistration` boolean, required
  - `solanaDepositAddress` string
  - `accountParams` object
    - `factory` string, required — Ethereum address (0x followed by 40 hex characters)
    - `factoryData` string, required — Hex-encoded string (0x followed by hex characters)
  - `sessionDetailsUnsigned` object
    - `hashesAndChainIds` object[], required
      - `chainId` string, required
      - `sessionDigest` string, required — Hex-encoded string (0x followed by hex characters)
    - `data` object, required

## Other responses

- `400` — Invalid request or unauthorized
- `403` — API key lacks required deposits scope
- `500` — Failed to derive account or build sessions

---

[API](https://skmtc.net/rhinestonewtf/apis/deposit-service-api.md) · [All operations](https://skmtc.net/rhinestonewtf/apis/deposit-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rhinestonewtf/deposit-service-api/versions/ce4e0abfe33a/schema)
