A Note Relation (noteTarget) links a Note to a Person, Company, or Opportunity. One note can be linked to multiple records by creating multiple relations. First create the note at /rest/notes, then link it here.
Link a note to a person, company, or opportunity. Provide noteId plus at least one target ID. To link to multiple records, create separate relations.
Body
noteIdrequiredUUID
The note to link
personIdUUID
Person to link the note to
companyIdUUID
Company to link the note to
opportunityIdUUID
Opportunity to link the note to
Requestcurl
# Link a note to a person
curl -X POST "https://app.usedalil.ai/rest/noteTargets" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"noteId": "note-uuid-here",
"personId": "person-uuid-here"
}'
# Link the same note to their company (separate relation)
curl -X POST "https://app.usedalil.ai/rest/noteTargets" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"noteId": "note-uuid-here",
"companyId": "company-uuid-here"
}'
GET/rest/noteTargets/{id}
Get a single note relation. Default depth is 1 (unlike most entities), so the linked note and target record are included automatically.
filter=noteId[eq]:note-uuid
filter=personId[eq]:person-uuid
filter=companyId[eq]:company-uuid
filter=opportunityId[eq]:opportunity-uuid
filter=personId[is]:NOT_NULL # relations where a person is linked
Key Differences from Note Relations
Default depth=1 (most entities default to 0)
One target per relation record — create multiple relations to link to multiple records
Deleting a relation does not delete the note
No search operation — use the list endpoint with filters