Projects: Update
This documentation entry provides a clear and detailed guide on how to update an existing project using the API, including the necessary parameters, headers, and expected response.
Endpoint
POST /api/projects/{project_id}
/api/projects/{project_id}Update an existing project by specifying its unique identifier.
Request
HTTP Request
POST https://uptimekeep.com/api/projects/{project_id}Replace {project_id} with the ID of the project you wish to update.
Headers
Authorization
String
Bearer token for API authentication.
Content-Type
String
Must be set to multipart/form-data for file uploads.
Parameters
name
String
No
Name of the project.
color
String
No
Color associated with the project (hex code).
Example of a request:
curl --request POST \
--url 'https://uptimekeep.com/api/projects/{project_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Production' \
--form 'color=#000000'Response
A successful response returns a JSON object containing the unique identifier of the updated project.
Response Example
Fields
Data Object
id
Integer
Unique identifier for the updated project.
Errors
If the request fails, the API will return an error message with an appropriate HTTP status code, such as 400 Bad Request if required parameters are missing or invalid, or 404 Not Found if the project ID does not exist.
Last updated