Skip to main content
PUT
/
api
/
projects
/
{id}
Update 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
}
Updates the details of an existing project. The project must belong to the authenticated user.

Authentication

Requires Bearer token authentication.

Path Parameters

id
integer
required
The unique identifier of the project to update

Request Body

name
string
required
The updated name of the project (max 100 characters, cannot be blank)
color
string
The updated color code for the project in hex format (max 7 characters, e.g., #3b82f6)

Response

id
integer
required
The unique identifier for the project
name
string
required
The updated name of the project
color
string
required
The updated color code for the project
userId
integer
required
The ID of the user who owns the project

Example Request

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"
  }'

Example Response

{
  "id": 1,
  "name": "Website Redesign v2",
  "color": "#ef4444",
  "userId": 123
}

Error Responses

400 Bad Request
Validation failed for the request body
{
  "error": "Validation Failed",
  "message": "name: must not be blank"
}
401 Unauthorized
Authentication token is missing or invalid
{
  "error": "Unauthorized",
  "message": "Invalid or missing authentication token"
}
404 Not Found
Project not found or does not belong to the authenticated user
{
  "error": "Not Found",
  "message": "Project not found"
}

Build docs developers (and LLMs) love