# editContactNote

Rewrite an existing note's body (by noteId). REVERSIBLE: the note keeps its id and timeline position, so a wrong edit can be edited again, and no permission is needed when the user asked for a correction. Pass the FULL replacement body: it replaces the text, it does not append. noteIds come from getContact (notes[]) or a NOTE entry's note payload in listContactActivities; addContactNote returns none, so re-read the contact for the note you just wrote. The response echoes the saved body and updatedAt plus the owning contact (id + name): quote the corrected text back rather than assume it took. Only a note the key owner wrote, unless they are a team admin; a note whose `author.kind` is AI is someone else's, so a NON-ADMIN key is refused on one: check the author before offering to correct a note.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "editContactNote", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `noteId`: `ID!` (required)
- `body`: `String!` (required)

## Response (data, an example)

```json
{
  "noteMutation": {
    "editNote": {
      "id": "<ID>",
      "body": "…",
      "updatedAt": "2026-01-01T00:00:00.000Z",
      "contact": {
        "id": "<ID>",
        "name": "…"
      }
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "editContactNote",
    "variables": {
      "noteId": "<noteId>",
      "body": "<String>"
    }
  }'
```
