Projects endpoints | Langflow Documentation

Use the /projects endpoint to create, read, update, and delete Langflow projects.

Get a list of Langflow projects, including project IDs, names, and descriptions.


_10

curl -X GET \

_10

"$LANGFLOW_URL/api/v1/projects/" \

_10

-H "accept: application/json" \

_10

-H "x-api-key: $LANGFLOW_API_KEY"


Result


_10

[

_10

{

_10

"name": "Starter Project",

_10

"description": "Manage your own projects. Download and upload projects.",

_10

"id": "1415de42-8f01-4f36-bf34-539f23e47466",

_10

"parent_id": null

_10

}

_10

]


Create a new project.


_10

curl -X POST \

_10

"$LANGFLOW_URL/api/v1/projects/" \

_10

-H "Content-Type: application/json" \

_10

-H "x-api-key: $LANGFLOW_API_KEY" \

_10

-d '{

_10

"name": "new_project_name",

_10

"description": "string",

_10

"components_list": [],

_10

"flows_list": []

_10

}'


Result


_10

{

_10

"name": "new_project_name",

_10

"description": "string",

_10

"id": "b408ddb9-6266-4431-9be8-e04a62758331",

_10

"parent_id": null

_10

}


To add flows and components at project creation, retrieve the components_list and flows_list values from the /all and /flows/read endpoints and add them to the request body.

Adding a flow to a project moves the flow from its previous location. The flow isn't copied.


_15

curl -X POST \

_15

"$LANGFLOW_URL/api/v1/projects/" \

_15

-H "accept: application/json" \

_15

-H "Content-Type: application/json" \

_15

-H "x-api-key: $LANGFLOW_API_KEY" \

_15

-d '{

_15

"name": "new_project_name",

_15

"description": "string",

_15

"components_list": [

_15

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

_15

],

_15

"flows_list": [

_15

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

_15

]

_15

}'


Retrieve details of a specific project.

To find the UUID of your project, call the read projects endpoint.


_10

curl -X GET \

_10

"$LANGFLOW_URL/api/v1/projects/$PROJECT_ID" \

_10

-H "accept: application/json" \

_10

-H "x-api-key: $LANGFLOW_API_KEY"


Result


_10

[

_10

{

_10

"name": "Starter Project",

_10

"description": "Manage your own projects. Download and upload projects.",

_10

"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",

_10

"parent_id": null

_10

}

_10

]


Update the information of a specific project with a PATCH request.

Each PATCH request updates the project with the values you send. Only the fields you include in your request are updated. If you send the same values multiple times, the update is still processed, even if the values are unchanged.


_15

curl -X PATCH \

_15

"$LANGFLOW_URL/api/v1/projects/b408ddb9-6266-4431-9be8-e04a62758331" \

_15

-H "accept: application/json" \

_15

-H "x-api-key: $LANGFLOW_API_KEY" \

_15

-d '{

_15

"name": "string",

_15

"description": "string",

_15

"parent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",

_15

"components": [

_15

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

_15

],

_15

"flows": [

_15

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

_15

]

_15

}'


Result


_10

{

_10

"name": "string",

_10

"description": "string",

_10

"id": "b408ddb9-6266-4431-9be8-e04a62758331",

_10

"parent_id": null

_10

}


Delete a specific project.


_10

curl -X DELETE \

_10

"$LANGFLOW_URL/api/v1/projects/$PROJECT_ID" \

_10

-H "accept: */*" \

_10

-H "x-api-key: $LANGFLOW_API_KEY"


Result

Download all flows from a project as a zip file.

The --output flag is optional.


_10

curl -X GET \

_10

"$LANGFLOW_URL/api/v1/projects/download/$PROJECT_ID" \

_10

-H "accept: application/json" \

_10

-H "x-api-key: $LANGFLOW_API_KEY" \

_10

--output langflow-project.zip


Import a project and its flows by uploading a Langflow project zip file:


_10

curl -X POST \

_10

"$LANGFLOW_URL/api/v1/projects/upload/" \

_10

-H "accept: application/json" \

_10

-H "Content-Type: multipart/form-data" \

_10

-H "x-api-key: $LANGFLOW_API_KEY" \

_10

-F "file=@20241230_135006_langflow_flows.zip;type=application/zip"