User Management
The user management API lets you create and manage platform users within your tenant. Users are identified by email address and can be enabled, disabled, or assigned license seats.
User Fields
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address (normalized to lowercase) |
display_name | string | No | Display name |
first_name | string | No | First name |
last_name | string | No | Last name |
enabled | boolean | No | Whether the account is active (default: true) |
licensed | boolean | No | Whether the user holds a license seat (default: false) |
metadata | object | No | Arbitrary key-value metadata |
Create a User
curl -X POST https://api.memorylayer.ai/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, "licensed": true }'Returns 201 Created with the full user object including the generated id, tenant_id, created_at, and updated_at timestamps.
List Users
curl https://api.memorylayer.ai/v1/users \ -H "Authorization: Bearer $ML_API_KEY"Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
enabled | boolean | — | Filter by enabled state |
limit | integer | 50 | Results per page (max 200) |
offset | integer | 0 | Pagination offset |
Response:
{ "users": [ { "id": "usr_a1b2c3d4e5f6g7h8", "tenant_id": "tenant_abc", "email": "alice@example.com", "display_name": "Alice", "enabled": true, "licensed": true, "metadata": {}, "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z" } ], "total_count": 1}Get a User
curl https://api.memorylayer.ai/v1/users/usr_a1b2c3d4e5f6g7h8 \ -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. Omitted fields are left unchanged.
curl -X PUT https://api.memorylayer.ai/v1/users/usr_a1b2c3d4e5f6g7h8 \ -H "Authorization: Bearer $ML_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "display_name": "Alice S.", "licensed": false }'Delete a User
curl -X DELETE https://api.memorylayer.ai/v1/users/usr_a1b2c3d4e5f6g7h8 \ -H "Authorization: Bearer $ML_API_KEY"Returns 204 No Content on success.
Common Patterns
Disable a user without deleting — Set enabled to false to revoke access while preserving the user record and audit history:
curl -X PUT https://api.memorylayer.ai/v1/users/usr_a1b2c3d4e5f6g7h8 \ -H "Authorization: Bearer $ML_API_KEY" \ -H "Content-Type: application/json" \ -d '{"enabled": false}'List only licensed users — Combine filters to find users consuming license seats:
curl "https://api.memorylayer.ai/v1/users?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 automatically assigned by the server.