Create a Note or Attachment simply by providing them as children records of the parent record; reference the relationship name Notes
or Attachments
to insert the appropriate type of record.
Example:
{
"records": [{
"attributes": { "type": "Opportunity", "referenceId": "opp1" },
"name": "Closing Soon",
"closedate": "2018-09-01",
"stagename": "Prospecting",
"Notes": { "records": [{
"attributes": { "type": "Note", "referenceId": "note1" },
"title": "This is a note",
"body": "This is the content of the note"
}]},
"Attachments": { "records": [{
"attributes": { "type": "Attachment", "referenceId": "att1" },
"name": "filename.txt",
"body": "VGhpcyBpcyB0aGUgY29udGVudCBvZiB0aGUgYXR0YWNobWVudA==",
"contenttype": "text/plain"
}]}
}]
}
Please note that the body of an attachment must be base64-encoded.