Partially update a project component
Updates only the provided fields of an existing component in a project. The description and internalNote fields accept HTML or Markdown and will be converted to the internal format. Updating a component triggers project configuration change tracking.
PATCH
/projects/{projectId}/components/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequiredidstringrequiredQuery parameters
fieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
compactfullHeader parameters
LT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
fullRequest body
requiredapplication/jsondescriptionstringComponent description (HTML or Markdown)
discountAmountnumberDiscount amount to apply to this component. For percentage discounts, this is the percentage (0-100). For fixed discounts, this is the amount in workspace currency. Set to 0 to remove the discount.
min 0
discountTypestringType of discount. "Percentage" applies a percentage reduction, "Fixed" applies a fixed amount reduction. Required when discountAmount is provided.
Allowed:
FixedPercentageiconobject | nullIcon identifier (can be set to null)
internalNotestringInternal note (HTML or Markdown)
namestringComponent name
tagsstring[]Array of tag IDs
Responses
200Component updated successfully
idstringrequiredUUID of the updated component
400Invalid request: invalid UUID format for component ID, project ID, or tag IDs
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions to manage components or access to project denied
404Component not found, component does not belong to project, or project not accessible
422Editor content conversion errors
Request
curl -X PATCH "https://leadtime.app/api/public/projects/string/components/string" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "<p>This component handles user authentication and authorization.</p>",
"discountAmount": 10,
"discountType": "Percentage",
"icon": "🔐",
"internalNote": "<p>Implementation notes for the development team.</p>",
"name": "User Authentication Module",
"tags": [
"550e8400-e29b-41d4-a716-446655440000"
]
}'const response = await fetch("https://leadtime.app/api/public/projects/string/components/string", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"description": "<p>This component handles user authentication and authorization.</p>",
"discountAmount": 10,
"discountType": "Percentage",
"icon": "🔐",
"internalNote": "<p>Implementation notes for the development team.</p>",
"name": "User Authentication Module",
"tags": [
"550e8400-e29b-41d4-a716-446655440000"
]
})
});import requests
response = requests.patch(
"https://leadtime.app/api/public/projects/string/components/string",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"description": "<p>This component handles user authentication and authorization.</p>",
"discountAmount": 10,
"discountType": "Percentage",
"icon": "🔐",
"internalNote": "<p>Implementation notes for the development team.</p>",
"name": "User Authentication Module",
"tags": [
"550e8400-e29b-41d4-a716-446655440000"
]
},
)Response
{
"id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890"
}Invalid request: invalid UUID format for component ID, project ID, or tag IDs
Unauthorized - Invalid or missing authentication token
Insufficient permissions to manage components or access to project denied
Component not found, component does not belong to project, or project not accessible
Editor content conversion errors