Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

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 · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
projectIdstringrequired
idstringrequired
Query parameters
fieldsToReturnstring
Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestring
Advanced 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:compactfull
Header parameters
LT-Response-Shapestring
Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:full
Request body
requiredapplication/json
descriptionstring
Component description (HTML or Markdown)
discountAmountnumber
Discount 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
discountTypestring
Type of discount. "Percentage" applies a percentage reduction, "Fixed" applies a fixed amount reduction. Required when discountAmount is provided.
Allowed:FixedPercentage
iconobject | null
Icon identifier (can be set to null)
internalNotestring
Internal note (HTML or Markdown)
namestring
Component name
tagsstring[]
Array of tag IDs
Responses
200Component updated successfully
idstringrequired
UUID 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"
  ]
}'
Response
{
  "id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890"
}