Easymailing
Notes

Update a note

PUT /notes/{uuid}

PUT/notes/{uuid}

Changes the title or the text of a note. Fields you leave out keep their value; title: null removes the title. The record the note belongs to cannot be changed.

When to use: To correct or complete a note. Only the author of the note or an account admin with a token that reaches account administration (an API key, or OAuth with the admin scope) can do it; notes written through the API belong to the person who owns the token, so that person can edit them later.

When not to use: To move a note to another record, create a new one with create_note and delete this one with delete_note. For work with a deadline, use create_task.

Side effects: Saving a text that really differs adds a note.edited entry to the activity of the record, done by the person who owns the token (marked «via Maia» when Maia made the request); several quick edits by the same person merge into one entry. Saving the same title and text changes nothing. Nothing is sent and no automation or webhook fires.

Permissions: Requires a CRM seat and the crm.tasks_notes.write capability. The user must also be able to see the record the note belongs to (crm.contacts_companies.read for a contact or company, crm.opportunities.read plus access to the pipeline for an opportunity). Only the author of the note or an account admin with a token that reaches account administration (an API key, or OAuth with the admin scope) can do it; notes written through the API belong to the person who owns the token, so that person can edit them later.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

uuid*string

UUID of the note. Get it from list_notes.

Formatuuid

Request Body

The updated Note resource

TypeScript Definitions

Use the request body type in TypeScript.

Notes of the public API (plan fase 4, Task 19). Generated from the approved proposal by fase-4/tools/gen_notes.py and edited by hand afterwards: the texts are the proposal's. Every operation checks the CRM access in its provider or processor before anything else, because API Platform evaluates security after the provider.

list_notes pages by cursor (paginationViaCursor goes on the resource: on the operation API Platform 3.4.17 loses it) and gives the total of the record. cursor is the opaque position of each item, which API Platform copies into the cursor[gt] of hydra:next (the last item) and the cursor[lt] of hydra:previous (the first one); it is never published.

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X PUT "https://api.easymailing.com/notes/9b6d2f84-1a3c-4e57-8d0b-4c7a5e1f3d62" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "body_html": "string",    "expected_version": 1  }'
{  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",  "record": "/entity/1",  "record_type": "contact",  "title": "string",  "body_html": "string",  "preview_text": "string",  "created_by": {    "kind": "user",    "name": "string"  },  "updated_by": {    "kind": "user",    "name": "string"  },  "version": 0,  "can_edit": true,  "can_delete": true,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}