Skip to main content
POST
/
api
/
users
curl -X POST https://oro-tradebook-devnet.up.railway.app/api/users \
  -H "Content-Type: application/json" \
  -H "x-api-key: your-api-key" \
  -d '{
    "kycHash": "Base58EncodedKycHash",
    "userWalletAddress": "UserSolanaWalletAddress",
    "metadata": {
      "referenceId": "user-123",
      "tags": ["retail"]
    }
  }'
{
  "success": true,
  "data": {
    "userId": "user-pda-address",
    "userPda": "user-pda-address",
    "kycHash": "Base58EncodedKycHash",
    "userWalletAddress": "UserSolanaWalletAddress",
    "transaction": {
      "txId": "api-tx-record-id",
      "serializedTx": "base64-encoded-transaction",
      "signingInstructions": {
        "walletType": "executive_authority",
        "signers": ["ExecutiveAuthorityAddress"],
        "expiresAt": "2024-01-15T10:35:00.000Z"
      }
    }
  }
}

Overview

Creates a new user for a Distribution Partner.
  • Custodial partners: The User PDA holds the user’s gold balances managed by the partner
  • Self-Custody partners: The User PDA links a KYC hash to the user’s external wallet address
Authorization Required: PARTNER_EXECUTIVE_AUTHORITY

Headers

x-api-key
string
required
Your API key for authentication

Request Body

kycHash
string
required
Base58-encoded SHA-256 hash of the user’s KYC data
See the Generating a KYC Hash guide for how to generate this value.
userWalletAddress
string
User’s Solana wallet address. Required for self-custody partners, not allowed for custodial partners.
metadata
object
Optional metadata for the user

Response

success
boolean
Whether the request was successful
data
object
curl -X POST https://oro-tradebook-devnet.up.railway.app/api/users \
  -H "Content-Type: application/json" \
  -H "x-api-key: your-api-key" \
  -d '{
    "kycHash": "Base58EncodedKycHash",
    "userWalletAddress": "UserSolanaWalletAddress",
    "metadata": {
      "referenceId": "user-123",
      "tags": ["retail"]
    }
  }'
{
  "success": true,
  "data": {
    "userId": "user-pda-address",
    "userPda": "user-pda-address",
    "kycHash": "Base58EncodedKycHash",
    "userWalletAddress": "UserSolanaWalletAddress",
    "transaction": {
      "txId": "api-tx-record-id",
      "serializedTx": "base64-encoded-transaction",
      "signingInstructions": {
        "walletType": "executive_authority",
        "signers": ["ExecutiveAuthorityAddress"],
        "expiresAt": "2024-01-15T10:35:00.000Z"
      }
    }
  }
}

Notes

Transaction Type

This endpoint returns a Legacy Transaction which is compatible with all wallet libraries.

Signing

Only the executive authority wallet signs this transaction. The user does not need to sign for account creation.