> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetActivityCounters

# Package: activity

# Namespace: ActivityCounters

# Method link: https://dev.wix.com/docs/api-reference/crm/members-contacts/members/activity/activity-counters/get-activity-counters.md

## Permission Scopes:
Read Activity Counters: SCOPE.DC-MEMBERS.READ-ACTIVITY-COUNTERS

## Introduction

Retrieves activity counters for the specified site member, including all public counters and any private counters owned by the authenticated caller.

> **Note**: Make sure to pass a `memberId` and not a `contactId` to identify the member. Any relationship between a member's `memberId` and `contactId` is coincidental.

---

## REST API

### Schema

```
 Method: getActivityCounters
 Description: Retrieves activity counters for the specified site member, including all public counters and any private counters owned by the authenticated caller.  > **Note**: Make sure to pass a `memberId` and not a `contactId` to identify the member. Any relationship between a member's `memberId` and `contactId` is coincidental.
 URL: https://www.wixapis.com/members/v1/activity-counters/{memberId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  memberId
 Method parameters: 
   param name: memberId | type:   none | required: true 
 Return type: GetActivityCountersResponse
  - name: activityCounters | type: array<ActivityCounter> | description: Activity counters.  
     - name: memberId | type: string | description: Member GUID.  | validation: format GUID
     - name: appId | type: string | description: App GUID. When developing websites, if you set activity counter data using elevation, the action is assigned to the generic Wix code backend app: `151e476a-715e-ec33-db9a-a7ff4d51f70a`.  | validation: format GUID
     - name: counters | type: array<Counter> | description: Counters for this member.  
        - name: key | type: string | description: Counter key, unique within the given app.  
        - name: public | type: boolean | description: Whether this counter data is available to all. If `false`, the counter is only available to the data owner and counter owner.  
        - name: count | type: integer | description: Activity count.  
     - name: revision | type: string | description: Revision number, which increments by 1 each time the counter is updated. To prevent conflicting changes, the existing revision must be used when updating a counter.  | read-only: true | validation: format int64


```

### Examples

### Get Activity Counters
```curl
curl -X GET \
  https://www.wixapis.com/members/v1/activity-counters/987110f7-5100-4beb-a948-de610fd18f00 \
  -H 'Authorization: <AUTH>' \
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.activityCounters.activityCounters.getActivityCounters(memberId)
 Description: Retrieves activity counters for the specified site member, including all public counters and any private counters owned by the authenticated caller.  > **Note**: Make sure to pass a `memberId` and not a `contactId` to identify the member. Any relationship between a member's `memberId` and `contactId` is coincidental.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  memberId
 Method parameters: 
   param name: memberId | type: string | description: Member GUID whose counters will be returned. | required: true | validation: format GUID
 Return type: PROMISE<GetActivityCountersResponse>
  - name: activityCounters | type: array<ActivityCounter> | description: Activity counters.  
     - name: memberId | type: string | description: Member GUID.  | validation: format GUID
     - name: appId | type: string | description: App GUID. When developing websites, if you set activity counter data using elevation, the action is assigned to the generic Wix code backend app: `151e476a-715e-ec33-db9a-a7ff4d51f70a`.  | validation: format GUID
     - name: counters | type: array<Counter> | description: Counters for this member.  
        - name: key | type: string | description: Counter key, unique within the given app.  
        - name: public | type: boolean | description: Whether this counter data is available to all. If `false`, the counter is only available to the data owner and counter owner.  
        - name: count | type: integer | description: Activity count.  
     - name: revision | type: string | description: Revision number, which increments by 1 each time the counter is updated. To prevent conflicting changes, the existing revision must be used when updating a counter.  | read-only: true | validation: format int64


```

### Examples

### getActivityCounters
```javascript
import { activityCounters } from '@wix/activity-counters';

async function getActivityCounters(memberId) {
  const response = await activityCounters.getActivityCounters(memberId);
};
```

### getActivityCounters (with elevated permissions)
```javascript
import { activityCounters } from '@wix/activity-counters';
import { auth } from '@wix/essentials';

async function myGetActivityCountersMethod(memberId) {
  const elevatedGetActivityCounters = auth.elevate(activityCounters.getActivityCounters);
  const response = await elevatedGetActivityCounters(memberId);
}
```

### getActivityCounters (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { activityCounters } from '@wix/activity-counters';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { activityCounters },
  // Include the auth strategy and host as relevant
});


async function getActivityCounters(memberId) {
  const response = await myWixClient.activityCounters.getActivityCounters(memberId);
};
```

---