Using the Flow API with Python
Last updated: February 26, 2026
Flow has an API that you can use to programmatically interact with your projects.
Using Design Values with Python via the API
For this example, we are going to fetch design values from Flow, perform calculations on them, and save the result to a design value.
Firstly we need to setup the Design Values we are going to be using in Flow

We can now use the example script below to interact with these design values
You can find FLOW_ORG and FLOW_PROJECT in the url, you will need to change these for your project and organisation
Note that the value IDs are just the number, ie VAL-66 is referred to just as 66
import requests
# Configuration
FLOW_ORG = "flow"
FLOW_PROJECT = "launch-vehicle-project-ae"
BASE_URL = f"https://api.flowengineering.com/rest/v1/org/{FLOW_ORG}/project/{FLOW_PROJECT}"
REFRESH_TOKEN = "TODO - set this with Refresh token from Flow > Settings > Account > API. It is valid for 1 year"
def fetch_design_values(session):
"""Fetch the current design values from the Flow API."""
response = session.get(f"{BASE_URL}/values/number")
response.raise_for_status()
return {item['id']: item['value'] for item in response.json()}
def update_flow_value(session, flow_id, value):
"""Update a Flow value using its ID."""
response = session.put(f"{BASE_URL}/value/{flow_id}/number", json={"value": value})
response.raise_for_status()
print(f"Updated ID {flow_id} with value {value}.")
def get_flow_access_token(refresh_token: str) -> str:
url = "https://api.flowengineering.com/rest/v1/auth/exchange"
headers = {"Content-Type": "application/json"}
response = requests.post(url, headers=headers, json={"refreshToken": refresh_token})
response.raise_for_status()
return response.json()["accessToken"]
# Main script logic
def main(do_update: bool = False):
with requests.Session() as session:
# Fetch and set the access token for auth
access_token = get_flow_access_token(REFRESH_TOKEN)
session.headers.update({"Content-Type": "application/json", "Authorization": f"Bearer {access_token}"})
# Fetch design values
design_values = fetch_design_values(session)
print("Fetched Flow Design Values:", design_values)
# Extract relevant values
target_burn_time = design_values[62]
target_thrust = design_values[63]
target_max_thrust = design_values[64]
# Perform calculations
thruster_volume = target_burn_time * target_thrust
thruster_weight = target_max_thrust * 2
if do_update:
# Update calculated values back to the Flow API
update_flow_value(session, 65, thruster_volume)
update_flow_value(session, 66, thruster_weight)
if __name__ == '__main__':
main()