Skip to main content

POST /api/group

Associates users with a group or organization. This endpoint is optional.

Request

Headers

Content-Type
string
required
application/json
X-Api-Key
string
required
Your API key

Body

groupId
string
required
Group ID
userId
string
User ID
anonymousId
string
Anonymous ID
traits
object
Group traits (properties that describe the group)
timestamp
string
required
ISO 8601 timestamp

Example Request

curl -X POST https://api.solute.dev/api/group \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: your_api_key" \
  -d '{
    "groupId": "company_123",
    "userId": "user_123",
    "traits": {
      "name": "Acme Corp",
      "plan": "enterprise",
      "employees": 50
    },
    "timestamp": "2025-01-15T10:30:00Z"
  }'

Response

Success Response

success
boolean
required
true if the request was successful
groupId
string
required
The group ID

Example Response

{
  "success": true,
  "groupId": "company_123"
}