> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Activities Introduction

## Article Link: https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/activity-log/activity-v1/introduction.md

## Article Content:

# About the Activities API

The Activities API lets you keep a record of what happened with a contact over time, their
**activity log**. Each activity is a dated entry describing something that occurred in relation to
the contact, such as a message sent to them, a change to their email or phone subscription, or any
other event worth remembering. Together, a contact's activities tell the story of your relationship
with them.

Activities are a permanent record: they can't be edited or deleted.

## What you can do

With the Activities API, you can:

- **Record a custom activity** for a contact, with a free-text message describing what happened.
- **Show a contact's history**, retrieving their activities from most recent to oldest. Optionally
  narrow results to a specific category or date range, for example to power an activity feed on the
  contact's page.
- **React to new activities** as they are recorded, using the `ActivityCreated` domain event.

## Domain events

Every time an activity is recorded, an `ActivityCreated` domain event is triggered. The event
payload contains the full `Activity` object. Subscribe to this event to react to new activities in
real time, for example to keep a contact timeline in an external system up to date.

## Template-based activities

Some activities in a contact's log are created automatically by Wix from **templates**: predefined
formats with consistent wording, an optional icon, and optional links. These activities have a
`templateId` and a `params` map, which together identify the template and the values used to
compose the activity's message.

Templates are organized into **categories**. You can filter a contact's activities by category using
the `categoryId` parameter in [List Activities](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/activity-log/activity-v1/list-activities.md), making it easy to display activities of a specific
type, such as email subscription changes or form submissions.

Use the [Templates API](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/activity-log/template-v1.md) to browse the available templates and categories.

### Translated messages

For activities created by Wix from a template, the `message` field is returned in the language
specified by the `language` parameter in [List Activities](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/activity-log/activity-v1/list-activities.md). Custom activity messages are always
returned as provided, regardless of language.

## Use cases

- [Record a custom activity](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/activity-log/activity-v1/activities-sample-flows.md#record-a-custom-activity)
- [Display a contact's activity timeline](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/activity-log/activity-v1/activities-sample-flows.md#display-a-contacts-activity-timeline)

## Terminology

- **Activity**: A single dated entry in a contact's activity log, describing something that happened.
- **Template**: A predefined format that Wix uses to create consistent activity entries. Defines the
  message wording, with placeholders for relevant details, optional links, and an icon.
- **Category**: A grouping of templates, also used to filter a contact's activities.

@sdk_package_setup