dynamics-crm Creating a note / annotation with attachment


Example

url: /api/data/v8.0/annotations

json:

{
    "isdocument": true,
    "mimetype": "text/plain",
    "documentbody": "dGVzdA==",
    "objectid_account@odata.bind" : "/accounts(c6da77b6-d53e-e611-80b9-0050568a6c2d)",
    "filename": "test.txt"
}

As the objectid can be almost every entity in CRM you need to define the entity with _entity name after objectid.