Ensure User

POST/external/v1/users/ensure/

Provision a user in LynxLedger, creating it if it does not yet exist. Idempotent — safe to call on every login. The user is tagged with the calling application via the API key.

ApiDocsParametersTitle

ApiDocsParamFieldApiDocsParamTypeApiDocsParamRequiredApiDocsParamDescription
emailstringApiDocsRequiredEmail address of the user to ensure.
passwordstringApiDocsRequiredInitial password (write-only, never returned).
first_namestringApiDocsRequiredUser's given name.
last_namestringApiDocsRequiredUser's family name.
ApiDocsRequestLabel
curl -X POST https://<api-host>/external/v1/users/ensure/ \
  -H "X-API-Key: <encrypted_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jane.doe@example.com",
    "password": "Secret123!",
    "first_name": "Jane",
    "last_name": "Doe"
  }'
ApiDocsResponseLabel
{
  "status": "success",
  "status_code": 200,
  "data": {
    "user_id": "42",
    "email": "jane.doe@example.com",
    "created": true
  }
}