Attach a form template to a task
Creates a new form instance from a workspace template. Pass templateId from GET /workspace/form-templates (each item includes id) or the legacy GET /administration/form-templates-available. To review fields, labels, and validation constraints before attaching, call GET /workspace/form-templates/{id} with that template id. After attach, fill values with PATCH /tasks/{identifier}/form-instances/{formInstanceId} (get formInstanceId from GET this resource list).
POST
/tasks/{identifier}/form-instancesAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
identifierstringrequiredTask UUID or shortNumber
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:
fullRequest body
requiredapplication/jsontemplateIdstring<uuid>requiredID of the form template to attach. List templates (each includes `id`) via GET `/workspace/form-templates` or GET `/administration/form-templates-available`. Optional: inspect field definitions before attach with GET `/workspace/form-templates/{id}`.
Responses
201
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/tasks/string/form-instances" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"templateId": "<uuid>"
}'const response = await fetch("https://leadtime.app/api/public/tasks/string/form-instances", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"templateId": "<uuid>"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/tasks/string/form-instances",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"templateId": "<uuid>"
},
)Response
No example response.
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions