Attach a record to a note
Attaches a note you have already written to a client company, a project
or a contact. Find the id with GET /public-api/v1/companies,
GET /public-api/v1/projects or GET /public-api/v1/contacts.
Attaching is idempotent. Posting a pair the note already carries returns
201 with the attachment that was there, and writes nothing — so a
retry after a timeout is safe and there is no duplicate to handle.
A note holds at most 10 records. Once it is full
any further record returns 422 pointed at the body rather than at
record_id, because a different id would fail the same way.
Attaching a record takes the same permission as editing the note, so
the person who wrote a note can always attach to it. data.id is what
addresses the attachment if you later want to remove it.
- Type: string Format: uuidnote
_id requiredThe note's
id.
The record to attach, wrapped in a link key.
- Type: objectlinkrequired
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://app.hellobonsai.com/public-api/v1/notes/123e4567-e89b-12d3-a456-426614174000/links \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"link": {
"record_type": "project",
"record_id": 42
}
}'
{
"data": {
"id": 907,
"record_id": 42,
"record_type": "company"
},
"meta": {
"request_id": "b1f0d2c4-7a9e-4c3b-8d5f-1e2a3b4c5d6e"
}
}