Skip to content

User Management

The user management API lets you create and manage platform user records within your tenant. Users are identified by email address and carry enabled and licensed flags plus free-form metadata. All operations are scoped to the tenant of the authenticated request. Reads require users:read; creates and updates require users:write; deletes require users:delete.

The examples use $MEMORYLAYER_URL for your deployment’s API endpoint.

User Fields

FieldTypeRequiredDescription
emailstringYesEmail address (trimmed and normalized to lowercase; must not be empty)
display_namestringNoDisplay name
first_namestringNoFirst name
last_namestringNoLast name
enabledbooleanNoWhether the account is active (default: true)
licensedbooleanNoPer-user flag (default: false) — see The licensed flag
metadataobjectNoArbitrary key-value metadata

Create a User

Terminal window
curl -X POST "$MEMORYLAYER_URL/v1/users" \
-H "Authorization: Bearer $ML_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "alice@example.com",
"display_name": "Alice",
"first_name": "Alice",
"last_name": "Smith",
"enabled": true
}'

Returns 201 Created with the full user object, including the generated id (prefixed usr_), tenant_id, created_at, and updated_at.

List Users

Terminal window
curl "$MEMORYLAYER_URL/v1/users" \
-H "Authorization: Bearer $ML_API_KEY"

Query parameters:

ParameterTypeDefaultDescription
enabledboolean—Filter by enabled state
licensedboolean—Filter by the licensed flag
searchstring—Case-insensitive substring match over email and display name
idsstring—Comma-separated user IDs to restrict the result to
limitinteger50Results per page (max 200)
offsetinteger0Pagination offset

Response:

{
"users": [
{
"id": "usr_a1b2c3d4e5f6a7b8",
"tenant_id": "tenant_abc",
"email": "alice@example.com",
"display_name": "Alice",
"first_name": "Alice",
"last_name": "Smith",
"enabled": true,
"licensed": false,
"metadata": {},
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-01-15T10:30:00Z"
}
],
"total_count": 1
}

Get a User

Terminal window
curl "$MEMORYLAYER_URL/v1/users/usr_a1b2c3d4e5f6a7b8" \
-H "Authorization: Bearer $ML_API_KEY"

Returns 404 if the user does not exist within your tenant.

Update a User

Send only the fields you want to change (email, display_name, first_name, last_name, enabled, licensed, metadata). Omitted fields are left unchanged.

Terminal window
curl -X PUT "$MEMORYLAYER_URL/v1/users/usr_a1b2c3d4e5f6a7b8" \
-H "Authorization: Bearer $ML_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"display_name": "Alice S."
}'

Delete a User

Terminal window
curl -X DELETE "$MEMORYLAYER_URL/v1/users/usr_a1b2c3d4e5f6a7b8" \
-H "Authorization: Bearer $ML_API_KEY"

Returns 204 No Content on success.

The licensed Flag

licensed is a stored boolean on each user record that you can set, update, and filter on (GET /v1/users?licensed=true). MemoryLayer Enterprise does not enforce it: it does not gate API access, count against any limit, or change behavior. A platform or operator can use it for its own access policy or user accounting, for example to mark which users are provisioned for a particular application.

Common Patterns

Disable a user without deleting — Set enabled to false to mark the account inactive while preserving the user record and audit history:

Terminal window
curl -X PUT "$MEMORYLAYER_URL/v1/users/usr_a1b2c3d4e5f6a7b8" \
-H "Authorization: Bearer $ML_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled": false}'

The enabled flag is stored on the user record; request authentication is performed by the Aether auth proxy, so revoke the user’s API keys to cut off access immediately.

Find users by name or email:

Terminal window
curl "$MEMORYLAYER_URL/v1/users?search=smith&enabled=true&limit=200" \
-H "Authorization: Bearer $ML_API_KEY"

Bulk onboarding — Create users in a loop. Each user gets a unique usr_-prefixed ID assigned by the server.