Quickstart
Get up and running with Dcycle quickly. Choose the approach that fits your use case:
API Quickstart Build custom integrations
CLI Quickstart Automate with scripts
MCP Quickstart AI-assisted analysis
Prerequisites
For all integration methods, you’ll need:
An account at app.dcycle.io
API access enabled for your organization
API Quickstart
Build custom integrations with full programmatic control.
Step 1: Get your API Key
Navigate to API settings
Go to Settings → API Keys
Generate a new API Key
Click “Generate API Key” The API Key is only shown once. Save it in a secure place.
Note your Organization ID
Copy your Organization ID from the same page.
Step 2: Make your first API call
Calculate the emissions of a shipment:
curl -X POST "https://api.dcycle.io/v1/logistics/requests" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-organization-id: YOUR_ORG_ID" \
-H "Content-Type: application/json" \
-d '{
"origin": "Madrid, Spain",
"destination": "Barcelona, Spain",
"load": 1000,
"load_unit": "kg"
}'
import requests
response = requests.post(
"https://api.dcycle.io/v1/logistics/requests" ,
headers = {
"x-api-key" : "YOUR_API_KEY" ,
"x-organization-id" : "YOUR_ORG_ID" ,
},
json = {
"origin" : "Madrid, Spain" ,
"destination" : "Barcelona, Spain" ,
"load" : 1000 ,
"load_unit" : "kg"
}
)
print (response.json())
const response = await fetch ( 'https://api.dcycle.io/v1/logistics/requests' , {
method: 'POST' ,
headers: {
'x-api-key' : 'YOUR_API_KEY' ,
'x-organization-id' : 'YOUR_ORG_ID' ,
'Content-Type' : 'application/json'
},
body: JSON . stringify ({
origin: 'Madrid, Spain' ,
destination: 'Barcelona, Spain' ,
load: 1000 ,
load_unit: 'kg'
})
});
const data = await response. json ();
console. log (data);
Expected Response
{
"id" : "req-123" ,
"co2e" : 245.5 ,
"distance_km" : 620.0 ,
"origin" : "Madrid, Spain" ,
"destination" : "Barcelona, Spain" ,
"methodology" : "ISO 14083"
}
Success! You’ve calculated your first emissions with the Dcycle API.
Explore the full API Reference →
CLI Quickstart
Automate data uploads and manage your operational data from the terminal.
Early Access - The CLI is currently available for enterprise customers.
Contact us to learn more.
Step 1: Install the CLI
Step 2: Authenticate
This opens an interactive prompt for your email and password.
Step 3: Set your organization
# List available organizations
dc org list
# Set your active organization
dc org set YOUR_ORG_ID
Step 4: Explore your data
# List facilities
dc facility list
# List vehicles
dc vehicle list
# Export as JSON
dc vehicle list --format json > vehicles.json
Step 5: Upload data
# Generate a template
dc logistics upload --type requests --template
# Upload your data
dc logistics upload viajes.csv --type requests
Success! You’re now managing operational data via CLI.
Explore CLI Examples →
MCP Quickstart
Use AI assistants like Claude to query your operational data with natural language.
Coming Soon - The MCP Server is in private beta.
Contact us for early access.
Step 1: Install the MCP Server
# Install with pip
pip install dcycle-mcp
# Or run directly with uvx (no install needed)
uvx dcycle-mcp
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers" : {
"dcycle" : {
"command" : "uvx" ,
"args" : [ "dcycle-mcp" ],
"env" : {
"DCYCLE_API_KEY" : "your_api_key"
}
}
}
}
Step 3: Ask questions
Once configured, ask Claude about your emissions:
"What are our total emissions for 2024?"
"Compare our Scope 1 vs Scope 2 emissions"
"Which facilities have the highest energy consumption?"
"How do our emissions this year compare to last year?"
Success! You’re now using AI-assisted operational data analysis.
Explore MCP Tools →
Next Steps
Authentication Deep Dive Learn about API keys, JWT tokens, and security best practices
Core Concepts Understand scopes, emission factors, and calculation methods
Emission Guides Step-by-step tutorials for different emission types
Automation Patterns CI/CD pipelines and multi-organization workflows
Troubleshooting
Error 401: Unauthorized
Verify your API key is correct and not expired
Check the header format matches your API version
Ensure your organization has API access enabled
Error 403: Forbidden
Verify your Organization ID is correct
Check you have permissions for the requested resource
Need more help?
Check our Support & Resources page for detailed troubleshooting and contact information.