Update Project
const options = {
method: 'PUT',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
name: '<string>',
description: '<string>',
start_date: '<string>',
end_date: '<string>',
responsible_user_id: '<string>'
})
};
fetch('https://api.dcycle.io/v1/projects/{project_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/projects/{project_id}"
payload = {
"name": "<string>",
"description": "<string>",
"start_date": "<string>",
"end_date": "<string>",
"responsible_user_id": "<string>"
}
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)curl --request PUT \
--url https://api.dcycle.io/v1/projects/{project_id} \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"name": "<string>",
"description": "<string>",
"start_date": "<string>",
"end_date": "<string>",
"responsible_user_id": "<string>"
}
'{
"id": "<string>"
}Update Project
Modify an existing project’s details
PUT
/
v1
/
projects
/
{project_id}
Update Project
const options = {
method: 'PUT',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
name: '<string>',
description: '<string>',
start_date: '<string>',
end_date: '<string>',
responsible_user_id: '<string>'
})
};
fetch('https://api.dcycle.io/v1/projects/{project_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/projects/{project_id}"
payload = {
"name": "<string>",
"description": "<string>",
"start_date": "<string>",
"end_date": "<string>",
"responsible_user_id": "<string>"
}
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)curl --request PUT \
--url https://api.dcycle.io/v1/projects/{project_id} \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"name": "<string>",
"description": "<string>",
"start_date": "<string>",
"end_date": "<string>",
"responsible_user_id": "<string>"
}
'{
"id": "<string>"
}Update Project
Update an existing project’s information. You can modify any combination of the project’s fields.Full Update: This endpoint uses
PUT and expects all fields. Fields not included will be set to null. To perform a partial update, first retrieve the project with Get Project and include all existing values along with your changes.Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51fastring
required
Must be
application/jsonstring
default:"es"
Language for notifications and labelsAvailable values:
es, en, fr, pt, de, it, caPath Parameters
string
required
The unique identifier (UUID) of the project to updateExample:
550e8400-e29b-41d4-a716-446655440000Body Parameters
string
Updated project nameExample:
"Carbon Footprint 2024 - Final"string
Updated project descriptionExample:
"Updated annual carbon footprint calculation"string
Updated start date in YYYY-MM-DD formatExample:
"2024-01-01"string
Updated end date in YYYY-MM-DD format. Must be equal to or after
start_date.Example: "2024-12-31"string
UUID of the new responsible userExample:
"user-uuid-002"Response
Returns the updated project object.string
Unique identifier (UUID)
Example
curl -X PUT "https://api.dcycle.io/v1/projects/550e8400-e29b-41d4-a716-446655440000" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}" \
-H "Content-Type: application/json" \
-d '{
"name": "Carbon Footprint 2024 - Final",
"description": "Finalized annual carbon footprint",
"start_date": "2024-01-01",
"end_date": "2024-12-31",
"responsible_user_id": "user-uuid-002"
}'
import requests
import os
api_key = os.getenv("DCYCLE_API_KEY")
org_id = os.getenv("DCYCLE_ORG_ID")
project_id = "550e8400-e29b-41d4-a716-446655440000"
headers = {
"x-api-key": api_key,
"x-organization-id": org_id,
"Content-Type": "application/json"
}
payload = {
"name": "Carbon Footprint 2024 - Final",
"description": "Finalized annual carbon footprint",
"start_date": "2024-01-01",
"end_date": "2024-12-31",
"responsible_user_id": "user-uuid-002"
}
response = requests.put(
f"https://api.dcycle.io/v1/projects/{project_id}",
headers=headers,
json=payload
)
project = response.json()
print(f"Updated: {project['name']}")
print(f"Responsible: {project['responsible_user']['email']}")
const axios = require('axios');
const apiKey = process.env.DCYCLE_API_KEY;
const orgId = process.env.DCYCLE_ORG_ID;
const projectId = '550e8400-e29b-41d4-a716-446655440000';
const headers = {
'x-api-key': apiKey,
'x-organization-id': orgId,
'Content-Type': 'application/json'
};
const payload = {
name: 'Carbon Footprint 2024 - Final',
description: 'Finalized annual carbon footprint',
start_date: '2024-01-01',
end_date: '2024-12-31',
responsible_user_id: 'user-uuid-002'
};
axios.put(
`https://api.dcycle.io/v1/projects/${projectId}`,
payload,
{ headers }
)
.then(response => {
const project = response.data;
console.log(`Updated: ${project.name}`);
console.log(`Responsible: ${project.responsible_user.email}`);
})
.catch(error => console.error(error));
Successful Response
Status Code:200 OK
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"organization_id": "a8315ef3-dd50-43f8-b7ce-d839e68d51fa",
"name": "Carbon Footprint 2024 - Final",
"description": "Finalized annual carbon footprint",
"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-002",
"responsible_user": {
"id": "user-uuid-002",
"email": "carlos@company.com",
"first_name": "Carlos",
"last_name": "Lopez"
},
"parent": null,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-06-25T11:00:00Z"
}
Common Errors
401 Unauthorized
Cause: Missing or invalid API key{
"detail": "Invalid API key",
"code": "INVALID_API_KEY"
}
404 Not Found
Cause: Project not found or doesn’t belong to your organization{
"detail": "Project not found"
}
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"
}
]
}
end_date is equal to or after start_date.
Use Cases
Reassign Project Responsibility
Transfer a project to a different team member:def reassign_project(project_id, new_user_id):
"""Reassign project to a different user"""
# Get current project data
response = requests.get(
f"https://api.dcycle.io/v1/projects/{project_id}",
headers=headers
)
project = response.json()
# Update with new responsible user
response = requests.put(
f"https://api.dcycle.io/v1/projects/{project_id}",
headers=headers,
json={
"name": project["name"],
"description": project["description"],
"start_date": project["start_date"],
"end_date": project["end_date"],
"responsible_user_id": new_user_id
}
)
return response.json()
updated = reassign_project(
"550e8400-e29b-41d4-a716-446655440000",
"new-user-uuid"
)
print(f"New responsible: {updated['responsible_user']['email']}")
Extend Project Timeline
Update the project end date:def extend_project(project_id, new_end_date):
"""Extend a project's end date"""
response = requests.get(
f"https://api.dcycle.io/v1/projects/{project_id}",
headers=headers
)
project = response.json()
response = requests.put(
f"https://api.dcycle.io/v1/projects/{project_id}",
headers=headers,
json={
"name": project["name"],
"responsible_user_id": project["responsible_user_id"],
"start_date": project["start_date"],
"end_date": new_end_date
}
)
return response.json()
updated = extend_project(
"550e8400-e29b-41d4-a716-446655440000",
"2025-06-30"
)
print(f"New end date: {updated['end_date']}")
Related Endpoints
Get Project
View project details before updating
Delete Project
Remove a project
List Projects
View all projects
Link Entities
Link entities to a project
Was this page helpful?