Skip to main content

Users endpoints

Use the /users endpoint to manage user accounts in Langflow.

Add user

Create a new user account with a given username and password.

Requires authentication as a superuser if the Langflow server has authentication enabled.


_10
curl -X POST \
_10
"$LANGFLOW_URL/api/v1/users/" \
_10
-H "Content-Type: application/json" \
_10
-H "x-api-key: $LANGFLOW_API_KEY" \
_10
-d '{
_10
"username": "newuser2",
_10
"password": "securepassword123"
_10
}'

The request returns an object describing the new user. The user's UUID is stored in user_id in the Langflow database, and returned as id in the /users API response. This user_id key is specifically for Langflow user management.

Result

_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 authenticated user.


_10
curl -X GET \
_10
"$LANGFLOW_URL/api/v1/users/whoami" \
_10
-H "accept: application/json" \
_10
-H "x-api-key: $LANGFLOW_API_KEY"

Result

_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.

Requires authentication as a superuser if the Langflow server has authentication enabled.


_10
curl -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"

Result

_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.

Requires authentication as a superuser if the Langflow server has authentication enabled.

This example activates the specified user's account and makes them a superuser:


_10
curl -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
}'

Result

_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 the specified user's password to a new secure value.

Requires authentication as the target user.


_10
curl -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
}'

Result

_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.

Requires authentication as a superuser if the Langflow server has authentication enabled.


_10
curl -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"

Result

_10
{
_10
"detail": "User deleted"
_10
}

Search