Detach a record from a note
Detaches one record from a note. The response hands back the attachment as it was, so you can log exactly what was removed.
Unlike attaching, this is not idempotent: the attachment is gone for
good, so a repeat call returns 404. A retry after a timeout will hit
that rather than succeeding twice.
The note itself is untouched. Detaching its last record leaves it in the workspace as a note without records, rather than deleting it.
Detaching takes the same permission as editing the note, so the person who wrote a note can always detach from it.
Path Parameters
- Type: stringFormat: uuidnote
_id requiredThe note's
id. - Type: integeridrequired
The attachment's
id, as returned innote_linkson any note response.
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for delete/public-api/v1/notes/{note_id}/links/{id}
curl https://app.hellobonsai.com/public-api/v1/notes/123e4567-e89b-12d3-a456-426614174000/links/1 \
--request DELETE \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"data": {
"id": 907,
"record_id": 42,
"record_type": "company"
},
"meta": {
"request_id": "b1f0d2c4-7a9e-4c3b-8d5f-1e2a3b4c5d6e"
}
}