---
title: "Create a flow"
method: POST
path: "/app/v1/flows"
tags: ["flows"]
---

# Create a flow

`POST /app/v1/flows`

## Request body

- FlowCreateInput
  - `name` string
  - `type` string — Use `id` value of any index in `GET /v1/flow_types`
  - `status` 'active' | 'inactive'
  - `product_category` string — Use `id` value of any index in `GET /v1/product_categories`
  - `product_type` string — Use `id` value of any index in `GET /v1/product_types`
  - `custom_attributes` CustomAttributes
  - `associated_facility_id` string, uuid
  - `associated_equipment_id` string, uuid
  - `upstream_flow_ids` string[]
  - `downstream_flow_ids` string[]
  - `upstream_flows_count` integer
  - `downstream_flows_count` integer
  - `upstream_facility_id` string, uuid
  - `downstream_facility_id` string, uuid
  - `upstream_equipment_id` string, uuid
  - `downstream_equipment_id` string, uuid
  - `start_date` union — Start date of attributes. If start_date is provided and end_date is not provided, it defaults to the range [start_date, max]. If both start_date and end_date are not provided, it defaults to the range [current year month, next existing year month - 1]
    - string — Year month formatted as YYYYMM
    - 'min' | 'max' — Year month shorthand
  - `end_date` union — End date of attributes. If end_date is provided and start_date is not provided, it defaults to the range [min, start_date]. If both start_date and end_date are not provided, it defaults to the range [current year month, next existing year month - 1]
    - string — Year month formatted as YYYYMM
    - 'min' | 'max' — Year month shorthand
  - `associated_facility_filter` FacilityFilterFields — A filter object for facility where it can filter based on any of these following fields. No fields are mandatory and the syntax is roughly the same as MongoDB querying.
    - `custom_attributes` object
    - `id` string
    - `name` string
    - `status` string
    - `event.id` string
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `upstream_facility_filter` FacilityFilterFields — A filter object for facility where it can filter based on any of these following fields. No fields are mandatory and the syntax is roughly the same as MongoDB querying.
    - `custom_attributes` object
    - `id` string
    - `name` string
    - `status` string
    - `event.id` string
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `downstream_facility_filter` FacilityFilterFields — A filter object for facility where it can filter based on any of these following fields. No fields are mandatory and the syntax is roughly the same as MongoDB querying.
    - `custom_attributes` object
    - `id` string
    - `name` string
    - `status` string
    - `event.id` string
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `associated_equipment_filter` EquipmentFilterFields
    - `id` string
    - `name` string
    - `status` 'active' | 'inactive' | 'deprecated'
    - `type.id` string
    - `type.name` string
    - `custom_attributes` object
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `facility.custom_attributes` object
    - `facility.id` string
    - `facility.name` string
    - `facility.status` string
    - `event.id` string
  - `upstream_equipment_filter` EquipmentFilterFields
    - `id` string
    - `name` string
    - `status` 'active' | 'inactive' | 'deprecated'
    - `type.id` string
    - `type.name` string
    - `custom_attributes` object
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `facility.custom_attributes` object
    - `facility.id` string
    - `facility.name` string
    - `facility.status` string
    - `event.id` string
  - `downstream_equipment_filter` EquipmentFilterFields
    - `id` string
    - `name` string
    - `status` 'active' | 'inactive' | 'deprecated'
    - `type.id` string
    - `type.name` string
    - `custom_attributes` object
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `facility.custom_attributes` object
    - `facility.id` string
    - `facility.name` string
    - `facility.status` string
    - `event.id` string

## Response `200`

A successful operation

- union
  - object
    - `name` string
    - `type` string — Use `id` value of any index in `GET /v1/flow_types`
    - `status` 'active' | 'inactive'
    - `product_category` string — Use `id` value of any index in `GET /v1/product_categories`
    - `product_type` string — Use `id` value of any index in `GET /v1/product_types`
    - `custom_attributes` CustomAttributes
    - `upstream_flow_ids` string[]
    - `downstream_flow_ids` string[]
    - `upstream_flows_count` integer
    - `downstream_flows_count` integer
    - `upstream_facility_id` string, uuid
    - `downstream_facility_id` string, uuid
    - `upstream_equipment_id` string, uuid
    - `downstream_equipment_id` string, uuid
    - `id` string, uuid
    - `associated_facility_id` string, uuid
    - `associated_equipment_id` string, uuid
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `created_by` string, uuid
    - `updated_by` string, uuid
    - `upstream_flows` Flow[]
      - `name` string
      - `type` string — Use `id` value of any index in `GET /v1/flow_types`
      - `status` 'active' | 'inactive'
      - `product_category` string — Use `id` value of any index in `GET /v1/product_categories`
      - `product_type` string — Use `id` value of any index in `GET /v1/product_types`
      - `custom_attributes` CustomAttributes
      - `upstream_flow_ids` string[]
      - `downstream_flow_ids` string[]
      - `upstream_flows_count` integer
      - `downstream_flows_count` integer
      - `upstream_facility_id` string, uuid
      - `downstream_facility_id` string, uuid
      - `upstream_equipment_id` string, uuid
      - `downstream_equipment_id` string, uuid
      - `id` string, uuid
      - `associated_facility_id` string, uuid
      - `associated_equipment_id` string, uuid
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `created_by` string, uuid
      - `updated_by` string, uuid
    - `downstream_flows` Flow[]
      - `name` string
      - `type` string — Use `id` value of any index in `GET /v1/flow_types`
      - `status` 'active' | 'inactive'
      - `product_category` string — Use `id` value of any index in `GET /v1/product_categories`
      - `product_type` string — Use `id` value of any index in `GET /v1/product_types`
      - `custom_attributes` CustomAttributes
      - `upstream_flow_ids` string[]
      - `downstream_flow_ids` string[]
      - `upstream_flows_count` integer
      - `downstream_flows_count` integer
      - `upstream_facility_id` string, uuid
      - `downstream_facility_id` string, uuid
      - `upstream_equipment_id` string, uuid
      - `downstream_equipment_id` string, uuid
      - `id` string, uuid
      - `associated_facility_id` string, uuid
      - `associated_equipment_id` string, uuid
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `created_by` string, uuid
      - `updated_by` string, uuid
    - `upstream_equipment` EquipmentBasic
      - `custom_attributes` CustomAttributes
      - `effective_date` string
      - `id` string, uuid
      - `latitude` number, nullable — latitude on the Earth
      - `longitude` number, nullable — longitude on the Earth
      - `name` string
      - `type` EquipmentTypeShallow
        - `id` string
        - `name` string
    - `downstream_equipment` EquipmentBasic
      - `custom_attributes` CustomAttributes
      - `effective_date` string
      - `id` string, uuid
      - `latitude` number, nullable — latitude on the Earth
      - `longitude` number, nullable — longitude on the Earth
      - `name` string
      - `type` EquipmentTypeShallow
        - `id` string
        - `name` string
  - object
    - `name` string
    - `type` string — Use `id` value of any index in `GET /v1/flow_types`
    - `status` 'active' | 'inactive'
    - `product_category` string — Use `id` value of any index in `GET /v1/product_categories`
    - `product_type` string — Use `id` value of any index in `GET /v1/product_types`
    - `custom_attributes` CustomAttributes
    - `upstream_flow_ids` string[]
    - `downstream_flow_ids` string[]
    - `upstream_flows_count` integer
    - `downstream_flows_count` integer
    - `upstream_facility_id` string, uuid
    - `downstream_facility_id` string, uuid
    - `upstream_equipment_id` string, uuid
    - `downstream_equipment_id` string, uuid
    - `id` string, uuid
    - `associated_facility_id` string, uuid
    - `associated_equipment_id` string, uuid
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `created_by` string, uuid
    - `updated_by` string, uuid
    - `upstream_flows` Flow[]
      - `name` string
      - `type` string — Use `id` value of any index in `GET /v1/flow_types`
      - `status` 'active' | 'inactive'
      - `product_category` string — Use `id` value of any index in `GET /v1/product_categories`
      - `product_type` string — Use `id` value of any index in `GET /v1/product_types`
      - `custom_attributes` CustomAttributes
      - `upstream_flow_ids` string[]
      - `downstream_flow_ids` string[]
      - `upstream_flows_count` integer
      - `downstream_flows_count` integer
      - `upstream_facility_id` string, uuid
      - `downstream_facility_id` string, uuid
      - `upstream_equipment_id` string, uuid
      - `downstream_equipment_id` string, uuid
      - `id` string, uuid
      - `associated_facility_id` string, uuid
      - `associated_equipment_id` string, uuid
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `created_by` string, uuid
      - `updated_by` string, uuid
    - `downstream_flows` Flow[]
      - `name` string
      - `type` string — Use `id` value of any index in `GET /v1/flow_types`
      - `status` 'active' | 'inactive'
      - `product_category` string — Use `id` value of any index in `GET /v1/product_categories`
      - `product_type` string — Use `id` value of any index in `GET /v1/product_types`
      - `custom_attributes` CustomAttributes
      - `upstream_flow_ids` string[]
      - `downstream_flow_ids` string[]
      - `upstream_flows_count` integer
      - `downstream_flows_count` integer
      - `upstream_facility_id` string, uuid
      - `downstream_facility_id` string, uuid
      - `upstream_equipment_id` string, uuid
      - `downstream_equipment_id` string, uuid
      - `id` string, uuid
      - `associated_facility_id` string, uuid
      - `associated_equipment_id` string, uuid
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `created_by` string, uuid
      - `updated_by` string, uuid
    - `upstream_facility` Facility
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `created_by` string, uuid
      - `updated_by` string, uuid
      - `custom_attributes` CustomAttributes
      - `latitude` number, nullable — latitude on the Earth
      - `longitude` number, nullable — longitude on the Earth
      - `name` string
      - `status` string — Use `id` value of any index in `GET /v1/facility_statuses`
      - `type` string — Use `id` value of any index in `GET /v1/facility_types`
      - `id` string, uuid
    - `downstream_facility` Facility
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `created_by` string, uuid
      - `updated_by` string, uuid
      - `custom_attributes` CustomAttributes
      - `latitude` number, nullable — latitude on the Earth
      - `longitude` number, nullable — longitude on the Earth
      - `name` string
      - `status` string — Use `id` value of any index in `GET /v1/facility_statuses`
      - `type` string — Use `id` value of any index in `GET /v1/facility_types`
      - `id` string, uuid
  - object
    - `name` string
    - `type` string — Use `id` value of any index in `GET /v1/flow_types`
    - `status` 'active' | 'inactive'
    - `product_category` string — Use `id` value of any index in `GET /v1/product_categories`
    - `product_type` string — Use `id` value of any index in `GET /v1/product_types`
    - `custom_attributes` CustomAttributes
    - `upstream_flow_ids` string[]
    - `downstream_flow_ids` string[]
    - `upstream_flows_count` integer
    - `downstream_flows_count` integer
    - `upstream_facility_id` string, uuid
    - `downstream_facility_id` string, uuid
    - `upstream_equipment_id` string, uuid
    - `downstream_equipment_id` string, uuid
    - `id` string, uuid
    - `associated_facility_id` string, uuid
    - `associated_equipment_id` string, uuid
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `created_by` string, uuid
    - `updated_by` string, uuid
    - `upstream_flows` Flow[]
      - `name` string
      - `type` string — Use `id` value of any index in `GET /v1/flow_types`
      - `status` 'active' | 'inactive'
      - `product_category` string — Use `id` value of any index in `GET /v1/product_categories`
      - `product_type` string — Use `id` value of any index in `GET /v1/product_types`
      - `custom_attributes` CustomAttributes
      - `upstream_flow_ids` string[]
      - `downstream_flow_ids` string[]
      - `upstream_flows_count` integer
      - `downstream_flows_count` integer
      - `upstream_facility_id` string, uuid
      - `downstream_facility_id` string, uuid
      - `upstream_equipment_id` string, uuid
      - `downstream_equipment_id` string, uuid
      - `id` string, uuid
      - `associated_facility_id` string, uuid
      - `associated_equipment_id` string, uuid
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `created_by` string, uuid
      - `updated_by` string, uuid
    - `downstream_flows` Flow[]
      - `name` string
      - `type` string — Use `id` value of any index in `GET /v1/flow_types`
      - `status` 'active' | 'inactive'
      - `product_category` string — Use `id` value of any index in `GET /v1/product_categories`
      - `product_type` string — Use `id` value of any index in `GET /v1/product_types`
      - `custom_attributes` CustomAttributes
      - `upstream_flow_ids` string[]
      - `downstream_flow_ids` string[]
      - `upstream_flows_count` integer
      - `downstream_flows_count` integer
      - `upstream_facility_id` string, uuid
      - `downstream_facility_id` string, uuid
      - `upstream_equipment_id` string, uuid
      - `downstream_equipment_id` string, uuid
      - `id` string, uuid
      - `associated_facility_id` string, uuid
      - `associated_equipment_id` string, uuid
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `created_by` string, uuid
      - `updated_by` string, uuid
    - `associated_equipment` EquipmentBasic
      - `custom_attributes` CustomAttributes
      - `effective_date` string
      - `id` string, uuid
      - `latitude` number, nullable — latitude on the Earth
      - `longitude` number, nullable — longitude on the Earth
      - `name` string
      - `type` EquipmentTypeShallow
        - `id` string
        - `name` string
  - object
    - `name` string
    - `type` string — Use `id` value of any index in `GET /v1/flow_types`
    - `status` 'active' | 'inactive'
    - `product_category` string — Use `id` value of any index in `GET /v1/product_categories`
    - `product_type` string — Use `id` value of any index in `GET /v1/product_types`
    - `custom_attributes` CustomAttributes
    - `upstream_flow_ids` string[]
    - `downstream_flow_ids` string[]
    - `upstream_flows_count` integer
    - `downstream_flows_count` integer
    - `upstream_facility_id` string, uuid
    - `downstream_facility_id` string, uuid
    - `upstream_equipment_id` string, uuid
    - `downstream_equipment_id` string, uuid
    - `id` string, uuid
    - `associated_facility_id` string, uuid
    - `associated_equipment_id` string, uuid
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `created_by` string, uuid
    - `updated_by` string, uuid
    - `upstream_flows` Flow[]
      - `name` string
      - `type` string — Use `id` value of any index in `GET /v1/flow_types`
      - `status` 'active' | 'inactive'
      - `product_category` string — Use `id` value of any index in `GET /v1/product_categories`
      - `product_type` string — Use `id` value of any index in `GET /v1/product_types`
      - `custom_attributes` CustomAttributes
      - `upstream_flow_ids` string[]
      - `downstream_flow_ids` string[]
      - `upstream_flows_count` integer
      - `downstream_flows_count` integer
      - `upstream_facility_id` string, uuid
      - `downstream_facility_id` string, uuid
      - `upstream_equipment_id` string, uuid
      - `downstream_equipment_id` string, uuid
      - `id` string, uuid
      - `associated_facility_id` string, uuid
      - `associated_equipment_id` string, uuid
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `created_by` string, uuid
      - `updated_by` string, uuid
    - `downstream_flows` Flow[]
      - `name` string
      - `type` string — Use `id` value of any index in `GET /v1/flow_types`
      - `status` 'active' | 'inactive'
      - `product_category` string — Use `id` value of any index in `GET /v1/product_categories`
      - `product_type` string — Use `id` value of any index in `GET /v1/product_types`
      - `custom_attributes` CustomAttributes
      - `upstream_flow_ids` string[]
      - `downstream_flow_ids` string[]
      - `upstream_flows_count` integer
      - `downstream_flows_count` integer
      - `upstream_facility_id` string, uuid
      - `downstream_facility_id` string, uuid
      - `upstream_equipment_id` string, uuid
      - `downstream_equipment_id` string, uuid
      - `id` string, uuid
      - `associated_facility_id` string, uuid
      - `associated_equipment_id` string, uuid
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `created_by` string, uuid
      - `updated_by` string, uuid
    - `associated_facility` Facility
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `created_by` string, uuid
      - `updated_by` string, uuid
      - `custom_attributes` CustomAttributes
      - `latitude` number, nullable — latitude on the Earth
      - `longitude` number, nullable — longitude on the Earth
      - `name` string
      - `status` string — Use `id` value of any index in `GET /v1/facility_statuses`
      - `type` string — Use `id` value of any index in `GET /v1/facility_types`
      - `id` string, uuid

---

[API](https://skmtc.net/validere/apis/carbonhub-api.md) · [All operations](https://skmtc.net/validere/apis/carbonhub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/validere/carbonhub-api/revisions/053edab62415/schema)
