> ## Documentation Index
> Fetch the complete documentation index at: https://trysalty.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Activities

> Timestamped events — calls, meetings, emails, messages.

## Endpoints

| Method   | Path              | Purpose                                                                             |
| -------- | ----------------- | ----------------------------------------------------------------------------------- |
| `GET`    | `/activities`     | List, paginated                                                                     |
| `POST`   | `/activities`     | Log an activity (parent + `occurred_at` required)                                   |
| `GET`    | `/activities/:id` | Fetch one                                                                           |
| `PATCH`  | `/activities/:id` | Update `activity_type`, `occurred_at`, `payload`. Parent is **immutable** in v1     |
| `DELETE` | `/activities/:id` | Soft-delete (moves to 30-day trash; restore via POST /trash/activities/:id/restore) |

## Fields

| Field                | Type                            | Notes                                                          |
| -------------------- | ------------------------------- | -------------------------------------------------------------- |
| `id`                 | uuid                            |                                                                |
| `parent_object_type` | `person` \| `company` \| `deal` | Required                                                       |
| `parent_object_id`   | uuid                            | Must exist in the same workspace                               |
| `activity_type`      | string                          | Free-form — `call`, `meeting`, `email`, `message`, or your own |
| `occurred_at`        | datetime                        | Required; ISO 8601                                             |
| `payload`            | object                          | Free-form JSON; no schema validation in v1                     |
| `created_at`         | datetime                        | When the row was inserted (not when the activity occurred)     |

## Log a meeting

```bash theme={null}
curl -X POST $SALTY_API/activities \
  -H "Authorization: Bearer $SALTY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "parent_object_type": "person",
    "parent_object_id": "<person-uuid>",
    "activity_type": "meeting",
    "occurred_at": "2026-05-24T14:00:00Z",
    "payload": {
      "topic": "discovery",
      "duration_min": 30,
      "attendees": ["jane@acme.com", "sales@us"]
    }
  }'
```

## Why parent is immutable

If you need to re-parent an activity, delete and re-create. Allowing PATCH on `parent_object_*` would require enforcing the same parent-existence check on update and adds little value — agents that want to move an activity typically want to copy it anyway.
