Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

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:

  1. Make changes to your project configuration
  2. Call this endpoint with a descriptive title
  3. Optionally provide a description in HTML or Markdown format
  4. 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}/versions
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
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

Description 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.

projectIdstringrequired

UUID of the project to create a version for

titlestringrequired

Title/name of the version. Use clear, descriptive titles like "Version 1.2.3 - Initial Release" or "Customer Proposal v2"

Responses
200

Created version with description as HTML

branchIdstringrequired

Branch identifier (UUID) for version tracking. Used to group related versions together and enable branching/versioning workflows

createdAtstringrequired

ISO 8601 timestamp when the version was created

createdBystringrequired

User ID (UUID) who created the version

descriptionstringrequired

HTML-formatted description of the version. Originally provided as HTML or Markdown when creating the version, always returned as HTML

idstringrequired

Unique identifier of the version (UUID)

isCurrentbooleanrequired

Whether 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 | nullrequired

Parent version ID (UUID). Null if this is the first version created for the project. Used to track version lineage and generate semantic version numbers

semverVersionstringrequired

Semantic version string automatically generated based on parent version and branch. Follows semver-like format (e.g., "1.2.3")

titlestringrequired

Title/name of the version as provided when creating it

400

Invalid input

401

Unauthorized - Invalid or missing authentication token

403

Insufficient permissions

404

Project not found

Try it
Server
Authorization
Parameters
Bodyapplication/json
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"
}'
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"
}