curl --request PUT \
--url https://api.example.com/api/projects/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"color": "<string>"
}
'{
"id": 123,
"name": "<string>",
"color": "<string>",
"userId": 123
}Update an existing project
curl --request PUT \
--url https://api.example.com/api/projects/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"color": "<string>"
}
'{
"id": 123,
"name": "<string>",
"color": "<string>",
"userId": 123
}curl -X PUT https://api.example.com/api/projects/1 \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"name": "Website Redesign v2",
"color": "#ef4444"
}'
{
"id": 1,
"name": "Website Redesign v2",
"color": "#ef4444",
"userId": 123
}
{
"error": "Validation Failed",
"message": "name: must not be blank"
}
{
"error": "Unauthorized",
"message": "Invalid or missing authentication token"
}
{
"error": "Not Found",
"message": "Project not found"
}