Skip to main content
POST
/
groups#group-batch-update
Batch Update Group Profiles
curl --request POST \
  --url 'https://{region}.mixpanel.com/groups#group-batch-update' \
  --header 'Content-Type: application/json' \
  --data '
"[\n    {\n        \"$token\": \"YOUR_PROJECT_TOKEN\",\n        \"$group_key\": \"Company\",\n        \"$group_id\": \"Mixpanel\",\n        \"$set\": {\n            \"Address\": \"1313 Mockingbird Lane\"\n        }\n    },\n    {\n        \"$token\": \"YOUR_PROJECT_TOKEN\",\n        \"$group_key\": \"Company\",\n        \"$group_id\": \"Wayne Enterprises\",\n        \"$set_once\": {\n            \"Address\": \"Wayne Tower, Gotham City\"\n        }\n    }\n]\n"
'
1
Send a batch of group profile updates. Instead of sending a single JSON object as the data query parameter, send a JSON list of objects as the data parameter of an application/x-www-form-urlencoded POST or GET request body. Refer to the respective group profile update commands ($set, $set_once, $add, $union, $remove, $unset, and $delete) on syntax for their parameters.

Query Parameters

ip
integer
default:0

If present and equal to 0, Mixpanel will not perform geolocation parsing using the IP address of the request. We recommend setting the ip to "0" when making requests from the server-side to prevent the unintentional effect of overwriting your profile's geolocation with your server location. Defaults to 1 which would use the IP address of the request to update profile geolocation.

Required range: 0 <= x <= 1
strict
integer

If present and equal to 1, Mixpanel will validate the provided records and return a JSON object with per-record error messages for records that fail validation.

Required range: 0 <= x <= 1
verbose
integer

If present and equal to 1, Mixpanel will respond with a JSON Object describing the success or failure of the tracking call. The returned object will have two keys: status, with the value 1 on success and 0 on failure, and error, with a string-valued error message if the request wasn't successful. This is useful for debugging during implementation.

Required range: 0 <= x <= 1

Body

application/json

A JSON list of update objects, each with a $token, $group_key, $group_id, and an operation.

Response

  • 1 - One or more objects provided are valid. This does not signify a valid project token or secret.
  • 0 - No data objects in the body are valid.

The response is of type enum<integer>.

Available options:
1,
0