Users endpoints
Use the /users
endpoint to manage user accounts in Langflow.
The user_id
value is specifically for Langflow's user system, which is stored in the Langflow database and managed at the /users
API endpoint.
The user_id
primary key in the Langflow database is mapped to the id
value in the API.
Add user
Create a new user account with a username and password.
This creates a new UUID for the user's id
, which is mapped to user_id
in the Langflow database.
- curl
- Result
_10curl -X POST \_10 "$LANGFLOW_URL/api/v1/users/" \_10 -H "Content-Type: application/json" \_10 -d '{_10 "username": "newuser2",_10 "password": "securepassword123"_10 }'
_16{_16 "id": "10c1c6a2-ab8a-4748-8700-0e4832fd5ce8",_16 "username": "newuser2",_16 "profile_image": null,_16 "store_api_key": null,_16 "is_active": false,_16 "is_superuser": false,_16 "create_at": "2025-05-29T16:02:20.132436",_16 "updated_at": "2025-05-29T16:02:20.132442",_16 "last_login_at": null,_16 "optins": {_16 "github_starred": false,_16 "dialog_dismissed": false,_16 "discord_clicked": false_16 }_16}
Get current user
Retrieve information about the currently authenticated user.
- curl
- Result
_10curl -X GET \_10 "$LANGFLOW_URL/api/v1/users/whoami" \_10 -H "accept: application/json" \_10 -H "x-api-key: $LANGFLOW_API_KEY"
_11{_11 "id": "07e5b864-e367-4f52-b647-a48035ae7e5e",_11 "username": "langflow",_11 "profile_image": null,_11 "store_api_key": null,_11 "is_active": true,_11 "is_superuser": true,_11 "create_at": "2025-05-08T17:59:07.855965",_11 "updated_at": "2025-05-29T15:06:56.157860",_11 "last_login_at": "2025-05-29T15:06:56.157016",_11}
List all users
Get a paginated list of all users in the system.
Only superusers can use this endpoint (is_superuser: true
).
- curl
- Result
_10curl -X GET \_10 "$LANGFLOW_URL/api/v1/users/?skip=0&limit=10" \_10 -H "accept: application/json" \_10 -H "x-api-key: $LANGFLOW_API_KEY"
_54{_54 "total_count": 3,_54 "users": [_54 {_54 "id": "07e5b864-e367-4f52-b647-a48035ae7e5e",_54 "username": "langflow",_54 "profile_image": null,_54 "store_api_key": null,_54 "is_active": true,_54 "is_superuser": true,_54 "create_at": "2025-05-08T17:59:07.855965",_54 "updated_at": "2025-05-29T15:06:56.157860",_54 "last_login_at": "2025-05-29T15:06:56.157016",_54 "optins": {_54 "github_starred": false,_54 "dialog_dismissed": true,_54 "discord_clicked": false,_54 "mcp_dialog_dismissed": true_54 }_54 },_54 {_54 "id": "c48a1f68-cc7e-491a-a507-a1a627708470",_54 "username": "newuser",_54 "profile_image": null,_54 "store_api_key": null,_54 "is_active": false,_54 "is_superuser": false,_54 "create_at": "2025-05-29T16:00:33.483386",_54 "updated_at": "2025-05-29T16:00:33.483392",_54 "last_login_at": null,_54 "optins": {_54 "github_starred": false,_54 "dialog_dismissed": false,_54 "discord_clicked": false_54 }_54 },_54 {_54 "id": "10c1c6a2-ab8a-4748-8700-0e4832fd5ce8",_54 "username": "newuser2",_54 "profile_image": null,_54 "store_api_key": null,_54 "is_active": false,_54 "is_superuser": false,_54 "create_at": "2025-05-29T16:02:20.132436",_54 "updated_at": "2025-05-29T16:02:20.132442",_54 "last_login_at": null,_54 "optins": {_54 "github_starred": false,_54 "dialog_dismissed": false,_54 "discord_clicked": false_54 }_54 }_54 ]_54}
Update user
Modify an existing user's information with a PATCH request.
This example makes the user 10c1c6a2-ab8a-4748-8700-0e4832fd5ce8
an active superuser.
- curl
- Result
_10curl -X PATCH \_10 "$LANGFLOW_URL/api/v1/users/10c1c6a2-ab8a-4748-8700-0e4832fd5ce8" \_10 -H "Content-Type: application/json" \_10 -H "x-api-key: $LANGFLOW_API_KEY" \_10 -d '{_10 "is_active": true,_10 "is_superuser": true_10 }'
_16{_16 "id": "10c1c6a2-ab8a-4748-8700-0e4832fd5ce8",_16 "username": "newuser2",_16 "profile_image": null,_16 "store_api_key": null,_16 "is_active": true,_16 "is_superuser": true,_16 "create_at": "2025-05-29T16:02:20.132436",_16 "updated_at": "2025-05-29T16:19:03.514527Z",_16 "last_login_at": null,_16 "optins": {_16 "github_starred": false,_16 "dialog_dismissed": false,_16 "discord_clicked": false_16 }_16}
Reset password
Change a user's password to a new secure value.
You can't change another user's password.
- curl
- Result
_10curl -X PATCH \_10 "$LANGFLOW_URL/api/v1/users/10c1c6a2-ab8a-4748-8700-0e4832fd5ce8/reset-password" \_10 -H "Content-Type: application/json" \_10 -H "x-api-key: $LANGFLOW_API_KEY" \_10 -d '{_10 "password": "newsecurepassword123"_10 }'
_16{_16 "id": "10c1c6a2-ab8a-4748-8700-0e4832fd5ce8",_16 "username": "langflow",_16 "profile_image": null,_16 "store_api_key": null,_16 "is_active": true,_16 "is_superuser": true,_16 "create_at": "2025-05-08T17:59:07.855965",_16 "updated_at": "2025-05-29T15:06:56.157860",_16 "last_login_at": "2025-05-29T15:06:56.157016",_16 "optins": {_16 "github_starred": false,_16 "dialog_dismissed": true,_16 "discord_clicked": false_16 }_16}
Delete user
Remove a user account from the system.
Only superusers can use this endpoint (is_superuser: true
).
- curl
- Result
_10curl -X DELETE \_10 "$LANGFLOW_URL/api/v1/users/10c1c6a2-ab8a-4748-8700-0e4832fd5ce8" \_10 -H "accept: application/json" \_10 -H "x-api-key: $LANGFLOW_API_KEY"
_10{_10 "detail": "User deleted"_10}