CRM
Update CRM account notes
When the user asks to save research or edit CRM notes, read ehq_crm_account_notes_get first, preserve existing material, and submit the complete new notes with that exact expectedRevision. Requires crm:write and permission on the actual account in the selected CRM; supports platform, organization and personal accounts without an event. Rejects stale revisions and changes only notes. Returns before/after notes and the saved readback. On conflict, read again and reconcile without discarding newer work. Reuse the same Idempotency-Key on retry; replay returns the original receipt, so read again for current state. Creates no outreach or consent. General account edits still use their existing approval policy.
Method
PATCH
Path
/v1/crm/accounts/notes
Required scope
crm:writeRequest
curl -X PATCH "https://api.endurancehq.app/v1/crm/accounts/notes" \
-H "Authorization: Bearer $EHQ_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"JSON body schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"accountId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"organizationId": {
"description": "Use platform for Endurance HQ's CRM, an authorized organization ID, or omit only for personal CRM.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"expectedRevision": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "Exact revision returned by ehq_crm_account_notes_get. A stale revision rejects the entire update."
},
"notes": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"type": "null"
}
],
"description": "Complete replacement notes, preserving any existing research. Null explicitly clears the notes. Saved website context is retained separately."
}
},
"required": [
"accountId",
"expectedRevision",
"notes"
],
"additionalProperties": false
}Response
Success status: 200
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"account": {
"type": "object",
"properties": {
"accountId": {
"type": "string"
},
"organizationId": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"notes": {
"type": [
"string",
"null"
]
},
"revision": {
"type": "string"
},
"href": {
"type": "string"
}
},
"required": [
"accountId",
"organizationId",
"name",
"notes",
"revision",
"href"
],
"additionalProperties": false
},
"change": {
"type": "object",
"properties": {
"before": {
"type": [
"string",
"null"
]
},
"after": {
"type": [
"string",
"null"
]
}
},
"required": [
"before",
"after"
],
"additionalProperties": false
},
"outcome": {
"type": "string",
"enum": [
"updated",
"unchanged"
]
},
"verification": {
"type": "string",
"const": "read_back"
}
},
"required": [
"account",
"change",
"outcome",
"verification"
],
"additionalProperties": false
}
},
"required": [
"data"
],
"additionalProperties": false
}Other surfaces
MCP tool: ehq_crm_account_notes_update