# getMemberActivity

WHAT ONE PERSON DID in a time window ("what did I do today", "how was my week", "what did Sam get done yesterday") in ONE call: their own texts (sent/delivered/failed), calls (outbound, inbound, connected, conversations, talkSeconds), emailsSent, notesWritten, tasksCreated, appointmentsBooked, tasksCompleted and dealStageMoves. Counts only, live. Use it instead of combining countOutboundTexts, getTeamCallStats and timeline reads. WINDOW: startDate (inclusive) and endDate (exclusive) as ISO datetimes WITH an offset, resolved in the USER's timezone (getMyProfile.resolvedTimezone): "today" is local midnight to now or to the next midnight. At most 93 calendar days; wider is REFUSED. WHO: omit userId for the key owner; naming a teammate needs VIEW_ALL_PHONES (org admins hold it) and is REFUSED otherwise. WHAT IS THEIRS: only work the person did themselves; an AI employee, a workflow or an outreach tool working on their behalf is never counted, nor is a bulk action or import, and notes, tasks and appointments count when made by hand in the app (texts and calls follow countOutboundTexts and getTeamCallStats). emailsSent is outbound mail from their connected mailbox. tasksCompleted is tasks they are on that were completed in the window (who ticked it is not recorded). dealStageMoves is moves they made by hand. For the records themselves, read the timeline or lists afterwards.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "getMemberActivity", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no

## Variables

- `startDate`: `DateTime!` (required)
- `endDate`: `DateTime!` (required)
- `userId`: `ID`

## Response (data, an example)

```json
{
  "teamAnalyticsQuery": {
    "memberActivity": {
      "startDate": "2026-01-01T00:00:00.000Z",
      "endDate": "2026-01-01T00:00:00.000Z",
      "userId": "<ID>",
      "name": "…",
      "texts": {
        "sent": 0,
        "delivered": 0,
        "failed": 0
      },
      "calls": {
        "outboundCalls": 0,
        "inboundCalls": 0,
        "connectedCalls": 0,
        "conversationCalls": 0,
        "talkSeconds": 0
      },
      "emailsSent": 0,
      "notesWritten": 0,
      "tasksCreated": 0,
      "appointmentsBooked": 0,
      "tasksCompleted": 0,
      "dealStageMoves": 0
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "getMemberActivity",
    "variables": {
      "startDate": "2026-01-01T00:00:00.000Z",
      "endDate": "2026-01-01T00:00:00.000Z"
    }
  }'
```
