Duplicate a component within the library
Creates a copy of an existing library component including all nested data (items, questions, todos, test cases, and conditions). The duplicated component is automatically named with “(Copy)” suffix and placed immediately after the original component in the sort order. Condition references are automatically updated to point to the new duplicated items. Recalculates conditions and timeframes. Only library components (projectId is null) can be duplicated through this endpoint.
POST
/administration/project-components/components/{id}/duplicateAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredComponent UUID to duplicate
Query 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:
fullResponses
201Component duplicated successfully
idstringrequiredUUID of the newly created duplicate component
400Invalid component ID format (not a valid UUID)
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions to edit component library
404Component not found or does not belong to library (has projectId)
Request
curl -X POST "https://leadtime.app/api/public/administration/project-components/components/e57dc37b-7693-4d06-b49c-17084b773aff/duplicate" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/administration/project-components/components/e57dc37b-7693-4d06-b49c-17084b773aff/duplicate", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.post(
"https://leadtime.app/api/public/administration/project-components/components/e57dc37b-7693-4d06-b49c-17084b773aff/duplicate",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}Invalid component ID format (not a valid UUID)
Unauthorized - Invalid or missing authentication token
Insufficient permissions to edit component library
Component not found or does not belong to library (has projectId)