Skip to main content
POST
Create Waste Water Treatment
Create a waste water treatment (WWT) record: the measured inflows, outflows and pollutant loads of one waste water facility over one period (typically a month). Dcycle then calculates the CH4 and N2O emissions of the period asynchronously, using the treatment lines configured on the facility.
The facility must be a waste water facility, created with POST /v1/facilities/waste_water. It can belong to your organization or to a subsidiary you can write to.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Body Parameters

string
required
UUID of the waste water facility the measurement belongs toExample: 660e8400-e29b-41d4-a716-446655440000
string
Name or reference of the measurement. Returned as invoice_id in responses.Example: "January 2026"
date
required
Start of the measured period (YYYY-MM-DD)Example: "2026-01-01"
date
required
End of the measured period (YYYY-MM-DD). Must be on or after start_date.Example: "2026-01-31"
number
required
Influent water volume, in m³Example: 125000
number
required
Effluent (discharged) water volume, in m³Example: 120000
number
required
Sludge produced during the period, in kgExample: 48000
number
required
BOD concentration of the influent in the waste water treatment line, in kg BOD/m³Example: 0.3
number
required
BOD content of the sludge in the sludge line, in kg BOD/kg sludgeExample: 0.05
number
required
BOD concentration of the effluent in the waste water discharge line, in kg BOD/m³Example: 0.02
number
required
Nitrogen concentration of the influent in the waste water treatment line, in kg N/m³Example: 0.04
number
required
Nitrogen concentration of the effluent in the waste water discharge line, in kg N/m³Example: 0.01
number
CH4 recovered in the waste water treatment line, in kg. Defaults to 0.Example: 0
number
CH4 recovered in the sludge line, in kg. Defaults to 0.Example: 0
string
URL of a supporting document for the measurement
Every numeric field must be 0 or greater.

Response

Returns 201 Created with the new record, in the same shape as GET /v1/waste-water-treatments/{wwt_id}/detail. The record starts with status: "uploaded" and co2e: null. Fetch the detail endpoint later to read the calculated emissions.
string
Unique identifier (UUID) of the new WWT record
string
Processing status. uploaded on creation, active once emissions are calculated, error if the calculation failed.
string
The name you sent, or an empty string if you sent none
string
UUID of the facility
number
The m3_water_in you sent
number
The m3_water_out you sent
number | null
CO2 equivalent emissions in kg CO2e. null until the calculation finishes.
See the detail endpoint for the full list of response fields.

Example

Successful Response

Common Errors

400 Bad Request

Cause: The facility exists but is not a waste water facility
Solution: Use a facility created with POST /v1/facilities/waste_water.

401 Unauthorized

Cause: Missing or invalid API key
Solution: Verify your API key is valid and active.

404 Not Found

Cause: The facility does not exist, or it belongs to an organization you cannot write to
Solution: Check the facility_id and that it belongs to the organization in x-organization-id or one of its subsidiaries.

422 Validation Error

Cause: A required field is missing, a number is negative, or end_date is before start_date Solution: Check the request body against the parameters above.

Get Waste Water Treatment

Read a record and its calculated emissions

List Waste Water Treatments

Retrieve all WWT records for a facility

Create Waste Water Facility

Create the facility and its treatment lines

Bulk Upload (legacy)

Upload daily measurements with automatic imputation