Create a new project version
Creates a new version (snapshot) of the current project configuration state.
What gets saved: The version captures the complete project state at the time of creation:
- Project tree structure with all components and work packages
- Products including variants, prices, and discounts
- Answered form questions and their effects
- Manually added items
- All configuration changes
How to use:
- Make changes to your project configuration
- Call this endpoint with a descriptive title
- Optionally provide a description in HTML or Markdown format
- The version is created and becomes the current active version
Best practices:
- Create versions after filling out questionnaires or making structural changes
- Create a version before sending out offers
- Use clear, descriptive version titles
- Create variants when customers want to compare alternatives
Required permissions: Projects.manageSnapshots permission is required to create versions.
POST
/projects/{id}/versionsAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredQuery 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/jsondescriptionstringDescription of the version in HTML or Markdown format (optional). This can include notes about what changed, why the version was created, or any relevant context.
projectIdstringrequiredUUID of the project to create a version for
titlestringrequiredTitle/name of the version. Use clear, descriptive titles like "Version 1.2.3 - Initial Release" or "Customer Proposal v2"
Responses
200Created version with description as HTML
branchIdstringrequiredBranch identifier (UUID) for version tracking. Used to group related versions together and enable branching/versioning workflows
createdAtstringrequiredISO 8601 timestamp when the version was created
createdBystringrequiredUser ID (UUID) who created the version
descriptionstringrequiredHTML-formatted description of the version. Originally provided as HTML or Markdown when creating the version, always returned as HTML
idstringrequiredUnique identifier of the version (UUID)
isCurrentbooleanrequiredWhether this is the current active version for the project. Only one version can be current at a time. The current version represents the active project state
parentIdobject | nullrequiredParent version ID (UUID). Null if this is the first version created for the project. Used to track version lineage and generate semantic version numbers
semverVersionstringrequiredSemantic version string automatically generated based on parent version and branch. Follows semver-like format (e.g., "1.2.3")
titlestringrequiredTitle/name of the version as provided when creating it
400Invalid input
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions
404Project not found
Request
curl -X POST "https://leadtime.app/api/public/projects/string/versions" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "<h1>Version 1.2.3</h1><p>This version includes initial features</p>",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"title": "Version 1.2.3 - Initial Release"
}'const response = await fetch("https://leadtime.app/api/public/projects/string/versions", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"description": "<h1>Version 1.2.3</h1><p>This version includes initial features</p>",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"title": "Version 1.2.3 - Initial Release"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/string/versions",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"description": "<h1>Version 1.2.3</h1><p>This version includes initial features</p>",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"title": "Version 1.2.3 - Initial Release"
},
)Response
{
"branchId": "770e8400-e29b-41d4-a716-446655440002",
"createdAt": "2024-01-15T10:30:00.000Z",
"createdBy": "880e8400-e29b-41d4-a716-446655440003",
"description": "<h1>Version Description</h1><p>This is version 1.2.3</p>",
"id": "660e8400-e29b-41d4-a716-446655440001",
"isCurrent": true,
"parentId": "660e8400-e29b-41d4-a716-446655440000",
"semverVersion": "1.2.3",
"title": "Version 1.2.3"
}Invalid input
Unauthorized - Invalid or missing authentication token
Insufficient permissions
Project not found