Skip to main content
POST
/
v1
/
projects
Create Project
const options = {
  method: 'POST',
  headers: {
    'x-api-key': '<x-api-key>',
    'x-organization-id': '<x-organization-id>',
    'Content-Type': '<content-type>'
  },
  body: JSON.stringify({
    name: '<string>',
    responsible_user_id: '<string>',
    description: '<string>',
    start_date: '<string>',
    end_date: '<string>',
    due_date: '<string>',
    project_type: '<string>',
    methodology: '<string>'
  })
};

fetch('https://api.dcycle.io/v1/projects', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "<string>"
}

Create Project

Create a new project to organize and track emissions data across different reporting activities. Projects can be used to scope emissions by type (carbon footprint, ISO 14064, CSRD/ESRS) and link relevant entities for focused reporting.

Request

Headers

x-api-key
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa
Content-Type
string
required
Must be application/json
Accept-Language
string
default:"es"
Language for notifications and labelsAvailable values: es, en, fr, pt, de, it, ca

Body Parameters

name
string
required
Name of the projectExample: "Carbon Footprint 2024"
responsible_user_id
string
required
UUID of the user responsible for the project. Must be a member of the organization.Example: "user-uuid-001"
description
string
Optional project descriptionExample: "Annual carbon footprint calculation for FY2024"
start_date
string
Project start date in YYYY-MM-DD formatExample: "2024-01-01"
end_date
string
Project end date in YYYY-MM-DD format. Must be equal to or after start_date.Example: "2024-12-31"
due_date
string
Project deadline in YYYY-MM-DD formatExample: "2025-03-31"
project_type
string
Project type classificationAvailable values: carbon_footprint, custom, einf, iso_14064, iso_14001, iso_9001, acv, visualization, suppliers, logisticsExample: "carbon_footprint"
methodology
string
Reporting methodologyAvailable values: esrs, gri, glecExample: "gri"

Response

Returns the created project object.
id
string
Unique identifier (UUID) of the created project
See Get Project for the complete response schema.

Example

curl -X POST "https://api.dcycle.io/v1/projects" \
  -H "x-api-key: ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Carbon Footprint 2024",
    "description": "Annual carbon footprint calculation for FY2024",
    "responsible_user_id": "user-uuid-001",
    "start_date": "2024-01-01",
    "end_date": "2024-12-31",
    "due_date": "2025-03-31",
    "project_type": "carbon_footprint",
    "methodology": "gri"
  }'

Successful Response

Status Code: 201 Created
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "organization_id": "a8315ef3-dd50-43f8-b7ce-d839e68d51fa",
  "name": "Carbon Footprint 2024",
  "description": "Annual carbon footprint calculation for FY2024",
  "start_date": "2024-01-01",
  "end_date": "2024-12-31",
  "due_date": "2025-03-31",
  "project_type": "carbon_footprint",
  "methodology": "gri",
  "responsible_user_id": "user-uuid-001",
  "responsible_user": {
    "id": "user-uuid-001",
    "email": "maria@company.com",
    "first_name": "Maria",
    "last_name": "Garcia"
  },
  "parent": null,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}

Common Errors

400 Bad Request

Cause: Missing required fields or invalid data
{
  "detail": "field required",
  "code": "MISSING_REQUIRED_FIELD"
}
Solution: Ensure all required fields are provided: name, responsible_user_id.

401 Unauthorized

Cause: Missing or invalid API key
{
  "detail": "Invalid API key",
  "code": "INVALID_API_KEY"
}
Solution: Verify your API key is valid and active.

422 Validation Error

Cause: Invalid field values
{
  "detail": [
    {
      "loc": ["body", "end_date"],
      "msg": "end_date must be equal to or after start_date",
      "type": "value_error"
    }
  ]
}
Solution: Check that:
  • end_date is equal to or after start_date
  • responsible_user_id is a valid UUID
  • project_type is one of the allowed values
  • methodology is one of the allowed values

Project Types

TypeDescriptionTypical Use Case
carbon_footprintGHG inventory projectAnnual organizational carbon footprint
iso_14064ISO 14064-1 verificationThird-party verified GHG statement
einfSpanish EINF reportNon-financial information statement
acvLife Cycle AssessmentProduct carbon footprint (PCF)
logisticsLogistics emissionsGLEC Framework reporting
suppliersSupply chain projectSupplier engagement programs
customGeneral purposeAny custom reporting need
visualizationData visualizationDashboard and reporting
iso_14001Environmental managementISO 14001 EMS certification
iso_9001Quality managementISO 9001 QMS certification