v2.4.1 Stable

API Reference

Programmatic access to Env's sustainability intelligence platform. Build integrations, automate reporting, and connect your infrastructure to our green data ecosystem.

Base URL

Production https://api.env.io/v2

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Authentication

Env uses Bearer token authentication. Include your secret API key in the Authorization header for every request.

Authorization Header Authorization: Bearer sk_live_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9

Security Notice: Never expose your secret keys in client-side code. Use environment variables and server-side proxies for web/mobile applications.

Carbon Footprint

Track, calculate, and optimize your organization's carbon emissions across Scope 1, 2, and 3.

GET /carbon-footprint

Retrieve aggregated carbon emission data filtered by date range, scope, and location.

ParameterTypeDescription
start_datestring (ISO8601)Start of reporting period Required
end_datestring (ISO8601)End of reporting period Required
scopeenum1, 2, or 3. Defaults to all Optional
granularityenumdaily, weekly, monthly Optional
Response 200 { "data": [ { "date": "2024-01-01", "scope": 1, "emissions_kg": 14500.5, "unit": "kg CO₂e", "sources": ["natural_gas", "company_vehicles"] } ], "meta": { "total_kg": 89200.3, "period": "2024-Q1", "currency": "CO₂e" } }
POST /carbon-footprint/calculate

Submit raw activity data for AI-powered carbon calculation and offset recommendations.

ParameterTypeDescription
activitiesarray[object]Energy usage, travel, waste data Required
methodologystringGHG Protocol, ISO 14064, SBTi Optional
include_offsetsbooleanCalculate net-zero pathway Optional
Response 201 { "id": "calc_9f8a7b6c5d4e", "status": "completed", "gross_emissions_kg": 42500.0, "offset_recommended_kg": 12400.0, "net_emissions_kg": 30100.0, "confidence_score": 0.96 }

Energy Analytics

Monitor energy consumption, identify inefficiencies, and optimize usage patterns across facilities.

GET /energy/usage

Fetch real-time and historical energy consumption metrics from integrated meters and IoT sensors.

Query Parameters facility_id=us-east-warehouse-01&interval=hourly&metrics=kwh,cost,carbon_intensity
POST /energy/optimization

Generate AI-driven optimization strategies based on current consumption patterns and grid pricing.

Compliance Reports

Automate regulatory reporting aligned with SEC, EU CSRD, GRI, and SASB standards.

GET /compliance/reports

List generated compliance reports with status, framework, and download links.

Response 200 { "reports": [ { "id": "rpt_8821", "framework": "EU_CSRD", "status": "finalized", "generated_at": "2024-06-15T10:30:00Z", "download_url": "https://api.env.io/v2/reports/rpt_8821/download" } ] }
POST /compliance/reports

Generate a new compliance report. Specify framework, reporting period, and output format (PDF, XLSX, JSON).

Supply Chain

Map Tier 1-3 suppliers, assess environmental risks, and track Scope 3 emissions across your value chain.

GET /supply-chain/assessment

Retrieve supplier sustainability scores, risk ratings, and remediation recommendations.

Webhooks

Receive real-time HTTP POST notifications when specific events occur in your Env account.

Event: carbon.threshold_exceeded { "id": "evt_3a2b1c", "type": "carbon.threshold_exceeded", "timestamp": "2024-08-01T14:22:00Z", "data": { "facility_id": "us-west-office", "current_emissions_kg": 50000, "threshold_kg": 45000, "scope": 2 } }

SDKs & Libraries

Official client libraries to integrate Env into your application with native syntax.

Node.js npm install @env/platform
Python pip install env-api
Go go get github.com/env-io/go-sdk/v2

Error Handling

Env uses conventional HTTP status codes to indicate success or failure of requests.

CodeMeaningDetails
400Bad RequestMissing or invalid parameters
401UnauthorizedInvalid or missing API key
403ForbiddenInsufficient permissions for this resource
404Not FoundRequested endpoint or resource does not exist
429Too Many RequestsRate limit exceeded. Retry after X-RateLimit-Reset
500Server ErrorInternal processing failure. Contact support if persistent

Rate Limits

API requests are limited to 1,000 requests per minute on the Standard plan and 5,000 requests per minute on Enterprise. Rate limit headers are included in every response.

Rate Limit Headers X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 942 X-RateLimit-Reset: 1704067200

Changelog

Stay updated with API improvements, deprecations, and new features.

  • v2.4.1 - Added Scope 3 supplier risk scoring endpoint
  • v2.4.0 - EU CSRD compliance framework support
  • v2.3.2 - Fixed ISO 8601 date parsing in carbon calculations
  • v2.3.0 - Introduced webhook signature verification (HMAC-SHA256)