Use the Group Identify API to set or update the properties of particular groups.
The Amplitude Accounts add-on makes analytical functionality available at the group level. A group is an object that a set of users might belong to, like a company of customers, team of users, or a playlist with listeners. Groups can help you understand how accounts interact with your product, instead of how individual users interact.
This API uses your API key passed in the body of the request:
api-key=API_KEY
For more information, see Find your API Credentials
Region | Endpoint |
---|---|
Standard server | https://api2.amplitude.com/groupidentify |
EU residency server | https://api.eu.amplitude.com/groupidentify |
Set or update group properties.
POST https://api2.amplitude.com/groupidentify
1curl --location --request POST '<https://api2.amplitude.com/groupidentify>' \2--header 'Content-Type: application/x-www-form-urlencoded' \3--data-urlencode 'api_key=<API_KEY>' \4--data-urlencode 'identification=[{"group_properties":{"org csm":"Lucas","org plan":"Enterprise","org owner":"Luis"},"group_type":"Seller","group_value":"12345678"}]'
1POST /groupidentify?api_key={api-key}&identification={"group_properties":{"org_csm":"Lucas","org_plan":"Enterprise","org_owner":"Luis"},"group_type":"org_id","group_value":"12345678"} HTTP/1.12Host: api2.amplitude.com
Name |
Description |
---|---|
api_key |
Your project API key. |
identification |
Either a single JSON identification object or an array of JSON objects, each of which represents one identification. |
Key |
Description | Example |
---|---|---|
group_type |
String. Group type. | "org name", "org id" |
group_value |
String. One specific value of the group_type . |
"group_type":"org id","group_value":"12345678" or "group_type":"account name","group_value":"Acme Corp" . Ex."org id":"12345678", "account name":"Acme Corp" |
group_properties |
String. A dictionary of key-value pairs that represent data tied to the group. Each distinct value appears as a group segment on the Amplitude dashboard. You can store property values in an array, and date values are transformed into string values. See the next table for supported operations. |
{"arr": "10000", "cs": \["Justin", "Ben"\], "renewal_date": “01/01/2018" } |
group_properties
supports these operations:
Operation |
Description |
---|---|
$set |
Set the value of a property. |
$setOnce |
Set the value of a property, prevent overriding the property value. |
$add |
Add a numeric value to a numeric property. |
$append and $prepend |
Append and prepend the value to a group property array. |
$unset |
Remove a property. |
Code | Message |
---|---|
200 | Success |
400 | Bad request. See the error message for specifics. |
Thanks for your feedback!
May 21st, 2024
Need help? Contact Support
Visit Amplitude.com
Have a look at the Amplitude Blog
Learn more at Amplitude Academy
© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.