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
| ApiDocsParamField | ApiDocsParamType | ApiDocsParamRequired | ApiDocsParamDescription |
|---|---|---|---|
| string | ApiDocsRequired | Email address of the user to ensure. | |
| password | string | ApiDocsRequired | Initial password (write-only, never returned). |
| first_name | string | ApiDocsRequired | User's given name. |
| last_name | string | ApiDocsRequired | User'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
}
}