POST
https://api.stableyard.fi
/
sdk
/
v1
/
update-username
curl -X POST https://api.stableyard.fi/sdk/v1/update-username \
  -H "Authorization: Basic $(echo -n $STABLEYARD_APP_ID:$STABLEYARD_APP_SECRET | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "user_abc123",
    "username": "alice",
  }'
{
  "success": true,
  "message": "Username set successfully",
  "data": {
    "paymentAddress": "alice@your_partner_id"
  },
  "requestId": "req_xyz789"
}
Set the username for a Money Account that was registered without one.
One-time operation — This endpoint only works for Money Accounts that were created without a username during registration. Once a username is set, it cannot be changed. This ensures payment addresses remain stable and trustworthy.

Authentication

Authorization
string
required
Basic authentication. Value: Basic base64(STABLEYARD_APP_ID:STABLEYARD_APP_SECRET). Obtain your credentials from the Stableyard SDK.

Body Parameters

userId
string
required
The Money Account’s unique identifier
username
string
required
New username (3-20 characters, alphanumeric and underscores)

Response

success
boolean
Indicates if the request was successful
data
object
message
string
Status message
curl -X POST https://api.stableyard.fi/sdk/v1/update-username \
  -H "Authorization: Basic $(echo -n $STABLEYARD_APP_ID:$STABLEYARD_APP_SECRET | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "user_abc123",
    "username": "alice",
  }'
{
  "success": true,
  "message": "Username set successfully",
  "data": {
    "paymentAddress": "alice@your_partner_id"
  },
  "requestId": "req_xyz789"
}