Identify company

Endpoint

POST https://api.june.so/sdk/group

Purpose

This action is used to track the identification of a group.

Response

Returns a JSON response with a status of 200 and a success key set to true.

{
  "status": 200,
  "success": true
}

Parameters

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. Required
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

Example

POST https://api.june.so/sdk/group

{
  "groupId": "g123456",
  "userId": "u123456",
  "traits": {
    "name": "June",
    "address": "123 Main St",
    "phone": "555-555-5555"
  }
}