Skip to main content

Dcycle API Introduction

The Dcycle API allows you to integrate carbon emissions calculation and tracking directly into your applications and workflows.

Base URL

All API requests must be made to:

Authentication

All API requests require authentication using your API key and organization ID:
User Attribution: All operations are automatically attributed to the user who created the API key. This ensures proper audit trails and data governance without requiring an explicit user header.
When you create an API key, you authorize it to perform actions on your behalf. Any data uploaded using that key will be linked to you for compliance and traceability purposes. Get your API key from Settings → API. See the Authentication Guide for detailed instructions.
Legacy API: Some older endpoints use a different authentication format (Authorization: Bearer, x-user-id). These are available under the Legacy API version selector. Existing integrations using the legacy format will continue to work, but new integrations should use the format above.

Versioning

The API uses path-based versioning. Most endpoints are available under /v1/, with newer or enhanced endpoints under /v2/:
When a V2 endpoint exists, the corresponding V1 endpoint remains available. V2 endpoints typically add new filters, response fields, or capabilities — they are not breaking changes. Use the V2 version when available for the best experience. Modules with V2 endpoints: Employees, Logistics, Dashboards, Imports, Vehicle Consumptions, Projects, Organizations.

Response Format

The API returns responses in JSON format:

HTTP Status Codes

Error Format

Application errors include a machine-readable code and a human-readable detail:
Validation errors (422) return an array of field-level issues following the standard FastAPI format:

Common Errors

Your API key is invalid or missing. Check your x-api-key header.
You don’t have permission to access this resource. Verify your x-organization-id header.
The requested resource doesn’t exist. Check the endpoint URL and resource UUID.
The request body failed validation. Inspect the detail array — each entry includes loc (field path), msg (error message), and type (error category).
You’ve exceeded the endpoint’s rate limit. Wait the number of seconds specified in the Retry-After response header before retrying.

Pagination

Endpoints that return lists support pagination:
Parameters:
  • page: Page number (default: 1)
  • size: Items per page (default: 50, max: 100)
Response:

Data Types

UUIDs

All resource IDs use UUID v4 format:

Dates

Dates use ISO 8601 format (YYYY-MM-DD):

Timestamps

Timestamps use ISO 8601 format with UTC timezone:

Rate Limits

Rate limits are applied per API key and endpoint. When rate-limited, the API returns 429 Too Many Requests with a Retry-After header. Response headers (included on rate-limited endpoints):
429 Too Many Requests
Most endpoints do not enforce rate limits. Endpoints that do (such as logistics calculations) include the rate limit headers in every response. Contact support if you need higher limits.

API Endpoints Overview

Core Data

  • Organizations — Manage organization hierarchy and structure
  • Facilities — Manage sites, offices, and production plants
  • Projects — Organize emission reduction initiatives

Emission Sources

Analysis & Reporting

Data Management

  • Files — Upload and manage data files
  • Imports — Bulk data import sessions (V2)

Reference Data

Quick Start Example

Next Steps

Quickstart Guide

Make your first API call in 5 minutes

Authentication

Learn about API Keys and authentication

Facilities

Manage facilities and track emissions

Logistics

Calculate shipment emissions

MCP Server

Query your data from AI assistants via MCP