Link multiple objects to one task
Creates any missing links; already-linked pairs are skipped. Task-side and object-side audit entries match the internal batch semantics.
POST
/objects/tasks/link-batchAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredQuery 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/jsonobjectIdsstring[]requiredObject instance UUIDs (1–200; duplicates are ignored server-side)
taskIdstring<uuid>requiredTask UUID
Responses
200
linkednumberrequiredNumber of new links created (already-linked pairs are skipped)
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/objects/tasks/link-batch" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"objectIds": [
"string"
],
"taskId": "<uuid>"
}'const response = await fetch("https://leadtime.app/api/public/objects/tasks/link-batch", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"objectIds": [
"string"
],
"taskId": "<uuid>"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/objects/tasks/link-batch",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"objectIds": [
"string"
],
"taskId": "<uuid>"
},
)Response
{
"linked": 0
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions