A Task Relation (taskTarget) links a Task to a Person, Company, or Opportunity. First create the task at /rest/tasks, then link it here. Note: the list endpoint does not support filter — use depth=1 on the parent record to find tasks for a specific person or company.
Link a task to a person, company, or opportunity. Provide taskId plus at least one target ID. Create separate relations to link to multiple records.
Body
taskIdrequiredUUID
The task to link
personIdUUID
Person to link the task to
companyIdUUID
Company to link the task to
opportunityIdUUID
Opportunity to link the task to
Requestcurl
# Link a task to a person
curl -X POST "https://app.usedalil.ai/rest/taskTargets" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"taskId": "task-uuid-here",
"personId": "person-uuid-here"
}'
# Link the same task to an opportunity (separate relation)
curl -X POST "https://app.usedalil.ai/rest/taskTargets" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"taskId": "task-uuid-here",
"opportunityId": "opportunity-uuid-here"
}'
GET/rest/taskTargets/{id}
Get a single task relation. Default depth is 1 — includes the linked task and target record automatically.
List task relations. Supports order_by and pagination but NOT filter. To find tasks for a specific person/company, use depth=1 on the parent record instead.
💡 filter is not supported on this endpoint. To get tasks for a specific person, fetch GET /rest/people/{id}?depth=1 instead.
Parameters
limitnumber
Records per page (default 60)
starting_afterUUID
Pagination cursor
order_bystring
Sort field and direction
depthnumber
Default is 1
Requestcurl
# List all task relations sorted by date
curl -G "https://app.usedalil.ai/rest/taskTargets" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "order_by=createdAt[DescNullsLast]" \
--data-urlencode "limit=20"
# Get tasks for a person (use depth=1 on the person instead)
curl -G "https://app.usedalil.ai/rest/people/person-uuid" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "depth=1"
PATCH/rest/taskTargets/{id}
Change which task or target record a relation points to.
The task relation list endpoint does not support filter. You cannot query "all task relations for person X" directly. Use GET /rest/people/{id}?depth=1 on the parent record to retrieve linked tasks.