1POST https://api.june.so/sdk/group
1POST https://api.june.so/sdk/group
This action is used to track the identification of a group.
Returns a JSON response with a status of 200
and a success
key set to true
.
1{ 2"status": 200, 3"success": true 4}
Parameter | Type | Description | Required |
---|---|---|---|
userId | String | The ID for this user in your database. Note: At least one of userId or anonymousId must be included in any group call. | Optional |
anonymousId | String | An ID associated with the user when you don’t know who they are (e.g., the anonymousId generated by analytics.js). Note: At least one of userId or anonymousId must be included in any group call. | Optional |
groupId | String | The ID of the group. | Required |
traits | Dictionary | A dictionary of traits you know about the group. For a company, they might be things like name, address, or phone. | Optional |
context | Dictionary | A dictionary containing any context about the request. To see the full reference of supported keys, check them out in the context reference. | Optional |
timestamp | DateTime | A DateTime object representing when the group took place. If the group just happened, leave it out and we’ll use the server’s time. If you’re importing data from the past, make sure to send a timestamp. | Optional |
1POST https://api.june.so/sdk/group 2 3{ 4"groupId": "g123456", 5"userId": "u123456", 6"traits": { 7"name": "June", 8"address": "123 Main St", 9"phone": "555-555-5555" 10} 11}