> ## Documentation Index
> Fetch the complete documentation index at: https://code.dcycle.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Project

> Create a new project in your organization

# 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

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication

  **Example:** `sk_live_1234567890abcdef`
</ParamField>

<ParamField header="x-organization-id" type="string" required>
  Your organization UUID

  **Example:** `a8315ef3-dd50-43f8-b7ce-d839e68d51fa`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`
</ParamField>

<ParamField header="Accept-Language" type="string" default="es">
  Language for notifications and labels

  **Available values:** `es`, `en`, `fr`, `pt`, `de`, `it`, `ca`
</ParamField>

### Body Parameters

<ParamField body="name" type="string" required>
  Name of the project

  **Example:** `"Carbon Footprint 2024"`
</ParamField>

<ParamField body="responsible_user_id" type="string" required>
  UUID of the user responsible for the project. Must be a member of the organization.

  **Example:** `"user-uuid-001"`
</ParamField>

<ParamField body="description" type="string">
  Optional project description

  **Example:** `"Annual carbon footprint calculation for FY2024"`
</ParamField>

<ParamField body="start_date" type="string">
  Project start date in YYYY-MM-DD format

  **Example:** `"2024-01-01"`
</ParamField>

<ParamField body="end_date" type="string">
  Project end date in YYYY-MM-DD format. Must be equal to or after `start_date`.

  **Example:** `"2024-12-31"`
</ParamField>

<ParamField body="due_date" type="string">
  Project deadline in YYYY-MM-DD format

  **Example:** `"2025-03-31"`
</ParamField>

<ParamField body="project_type" type="string">
  Project type classification

  **Available values:** `carbon_footprint`, `custom`, `einf`, `iso_14064`, `iso_14001`, `iso_9001`, `acv`, `visualization`, `suppliers`, `logistics`

  **Example:** `"carbon_footprint"`
</ParamField>

<ParamField body="methodology" type="string">
  Reporting methodology

  **Available values:** `esrs`, `gri`, `glec`

  **Example:** `"gri"`
</ParamField>

## Response

Returns the created project object.

<ResponseField name="id" type="string">
  Unique identifier (UUID) of the created project
</ResponseField>

See [Get Project](/api-reference/projects/get) for the complete response schema.

## Example

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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"
    }'
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import requests
  import os

  api_key = os.getenv("DCYCLE_API_KEY")
  org_id = os.getenv("DCYCLE_ORG_ID")

  headers = {
      "x-api-key": api_key,
      "x-organization-id": org_id,
      "Content-Type": "application/json"
  }

  data = {
      "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"
  }

  response = requests.post(
      "https://api.dcycle.io/v1/projects",
      headers=headers,
      json=data
  )

  project = response.json()
  print(f"Created project: {project['id']}")
  print(f"Name: {project['name']}")
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const axios = require('axios');

  const apiKey = process.env.DCYCLE_API_KEY;
  const orgId = process.env.DCYCLE_ORG_ID;

  const headers = {
    'x-api-key': apiKey,
    'x-organization-id': orgId,
    'Content-Type': 'application/json'
  };

  const data = {
    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'
  };

  axios.post(
    'https://api.dcycle.io/v1/projects',
    data,
    { headers }
  )
  .then(response => {
    const project = response.data;
    console.log(`Created project: ${project.id}`);
    console.log(`Name: ${project.name}`);
  })
  .catch(error => console.error(error.response.data));
  ```
</CodeGroup>

### Successful Response

**Status Code:** `201 Created`

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "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

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "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

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "detail": "Invalid API key",
  "code": "INVALID_API_KEY"
}
```

**Solution:** Verify your API key is valid and active.

### 422 Validation Error

**Cause:** Invalid field values

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "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

| Type               | Description              | Typical Use Case                       |
| ------------------ | ------------------------ | -------------------------------------- |
| `carbon_footprint` | GHG inventory project    | Annual organizational carbon footprint |
| `iso_14064`        | ISO 14064-1 verification | Third-party verified GHG statement     |
| `einf`             | Spanish EINF report      | Non-financial information statement    |
| `acv`              | Life Cycle Assessment    | Product carbon footprint (PCF)         |
| `logistics`        | Logistics emissions      | GLEC Framework reporting               |
| `suppliers`        | Supply chain project     | Supplier engagement programs           |
| `custom`           | General purpose          | Any custom reporting need              |
| `visualization`    | Data visualization       | Dashboard and reporting                |
| `iso_14001`        | Environmental management | ISO 14001 EMS certification            |
| `iso_9001`         | Quality management       | ISO 9001 QMS certification             |

## Related Endpoints

<CardGroup cols={2}>
  <Card title="List Projects" icon="list" href="/api-reference/projects/list">
    View all projects
  </Card>

  <Card title="Get Project" icon="folder" href="/api-reference/projects/get">
    Get project details
  </Card>

  <Card title="Update Project" icon="pencil" href="/api-reference/projects/update">
    Modify project details
  </Card>

  <Card title="Link Entities" icon="link" href="/api-reference/projects/link-entities">
    Link entities to this project
  </Card>
</CardGroup>
