Update a project
PATCH
/projects/{projectId}
const url = 'https://docs.ywork.dev/api/v1/projects/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Website redesign 2026"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://docs.ywork.dev/api/v1/projects/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Website redesign 2026" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”projectId
required
string
Unique identifier of the project (e.g. prj_...).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string
Example
{ "name": "Website redesign 2026"}Responses
Section titled “Responses”The updated project.
Media typeapplication/json
object
id
required
string
object
required
string
name
required
string
key
required
string
task_count
integer
created_at
required
string format: date-time
updated_at
string format: date-time
Example
{ "id": "prj_8Hs2Kd0aZq", "object": "project", "name": "Website redesign", "key": "WEB", "task_count": 12}No valid API key was provided.
Media typeapplication/json
object
error
required
object
type
required
A broad category for the error.
string
code
required
A short machine-readable code for the specific error.
string
message
required
A human-readable description of the error.
string
request_id
A unique identifier for the request, useful for support.
string
Example
{ "error": { "type": "authentication_error", "code": "missing_api_key", "message": "No API key provided. Send your key as a bearer token in the Authorization header.", "request_id": "req_9f2a1c7b4e" }}The requested resource does not exist.
Media typeapplication/json
object
error
required
object
type
required
A broad category for the error.
string
code
required
A short machine-readable code for the specific error.
string
message
required
A human-readable description of the error.
string
request_id
A unique identifier for the request, useful for support.
string
Example
{ "error": { "type": "invalid_request_error", "code": "resource_not_found", "message": "No such resource.", "request_id": "req_4b8e0d2a71" }}The request body failed validation.
Media typeapplication/json
object
error
required
object
type
required
A broad category for the error.
string
code
required
A short machine-readable code for the specific error.
string
message
required
A human-readable description of the error.
string
request_id
A unique identifier for the request, useful for support.
string
Example
{ "error": { "type": "invalid_request_error", "code": "validation_failed", "message": "The 'name' field is required.", "request_id": "req_7c3f5a9e12" }}