PUT

Set Activity Counters


Sets activity counters for a requested site member.

If the counter does not already exist, it will be created.

Counters are identified with a custom key, which must be unique.

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.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Activity Counters
Learn more about app permissions.
Endpoint
PUT
https://www.wixapis.com/members/v1/activity-counters/{memberId}

Path Params
memberIdstringRequired

Member ID whose counter will be set.

Body Params
counterCounterRequired

Counter data for this site member.

Response Object
activityCounterActivityCounter

Updated activity counter.

Set Activity Counters
Request
cURL
curl -X PUT \ https://www.wixapis.com/members/v1/activity-counters/bc93bbe5-228e-4468-a9ac-ebc15f90427e \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Authorization: <AUTH>' \ -d '{ "memberId": "bc93bbe5-228e-4468-a9ac-ebc15f90427e", "counter": { "key": "My custom key", "public": true, "count": 10 } }'
Response
JSON
{ "activityCounter": { "memberId": "bc93bbe5-228e-4468-a9ac-ebc15f90427e", "appId": "fb70a122-6276-4bbd-9cc6-ea9bc452b2a1", "counters": [ { "key": "This is my public key", "public": true, "count": 1 }, { "key": "My custom key", "public": true, "count": 10 } ] } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?