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.
You can only call this method when authenticated as a Wix app or Wix user identity.
Member ID whose counter will be set.
Counter data for this site member.
Updated activity counter.
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
}
}'
{
"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
}
]
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.