# addMemoryEntries

Add conversation records from another system to your memory, idempotent on `externalId`. Your people's words (FROM_ACCOUNT) are learned from; the other side's are context. Hidden records, typed notes and calendar emails are refused.

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

## Variables

- `entries`: `[MemoryEntryInput!]!` (required)
  - `externalId`: `String!` (required). Your id for the record (at most 256 characters); sending it again adds nothing.
  - `occurredAt`: `DateTime!` (required). When it was said; in the past.
  - `kind`: `MemoryEntryKind!` (required, one of `MESSAGE`, `EMAIL`, `CALL_SUMMARY`, `MEETING_SUMMARY`, `NOTE`). CALL_SUMMARY: A recap of a minute or longer is a conversation, so it counts as the organization's words whoever wrote the recap or placed the call. MEETING_SUMMARY: Holds both sides of a meeting, so it counts as the organization's words whoever wrote the recap. NOTE: Only the source's own system's; a person's typed note is refused.
  - `direction`: `MemoryEntryDirection` (one of `FROM_ACCOUNT`, `TO_ACCOUNT`). Required for MESSAGE, EMAIL and CALL_SUMMARY; ignored otherwise.
  - `author`: `MemoryEntryAuthorInput`
    - `name`: `String`
    - `kind`: `MemoryEntryAuthorKind` (one of `PERSON`, `AUTOMATION`). Default PERSON. AUTOMATION: The source's own system (a drip text, an automated note): a MESSAGE, EMAIL or NOTE it wrote is context, never your people's words. A summary is judged by the conversation it records instead.
    - `userId`: `ID`. The member who said it, if one did.
  - `subject`: `String`
  - `text`: `String!` (required). At most 50,000 characters.
  - `durationSeconds`: `Int`
  - `sourceLabel`: `String!` (required). The source's name, e.g. Zendesk (at most 80 characters).
  - `hidden`: `Boolean`. The source hid it: refused.

## Response (data, an example)

```json
{
  "memoryEntryMutation": {
    "addEntries": {
      "organizationId": "<ID>",
      "added": 0,
      "alreadyAdded": 0,
      "excluded": [
        {
          "externalId": "…",
          "reason": "HIDDEN"
        }
      ]
    }
  }
}
```

## 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": "addMemoryEntries",
    "variables": {
      "entries": [
        {
          "externalId": "<String>",
          "occurredAt": "2026-01-01T00:00:00.000Z",
          "kind": "MESSAGE",
          "text": "<String>",
          "sourceLabel": "<String>"
        }
      ]
    }
  }'
```
