Skip to main content
If you want to know more about User Profiles, visit the User Profiles section.
Searching User Profiles through the Chameleon API allows you to:
  • Search for a user by id, uid and email.
  • Search for users or get the Count of Users by any of the properties you have sent to us.
  • Search for users by any of the interactions they had with Chameleon (answered a Microsurvey etc.).
Note: Rate Limiting applies according to the table below.
endpointMaximum concurrent requests
/profiles2
/profiles/count1

Schema

See the full User Profile schema.

Examples

All of these examples are based directly on the full schema of Segmentation Filter Expressions.
Note: A fully-fledged version of these examples is implemented in the Chameleon Builder section for Segments.
Each example below is used as the value for the filters key in the JSON request body:
{
  "filters": [
    ...
  ]
}

1. User Profiles that Completed a Tour

[
  {
    "kind": "tour",
    "value": Chameleon Tour ID,
    "range": "completed"
  }
]

2. User Profiles that exited a Tour within last 3 days

cond - A secondary time-based filter operator. int - A secondary time-based filter # of days.
[
  {
    "kind": "tour",
    "value": Chameleon Tour ID,
    "range": "exited",
    "cond": "gt-d",
    "int": 3
  }
]

3. User Profiles that are an NPS promoter

mod - A secondary matching condition for range. range - A secondary matching range (in this case, button index).
Note: For a 11-button NPS, value range are 0,1,2,3,4,5,6,7,8,9,10.
[
  {
    "kind": "survey",
    "value": Chameleon Microsurvey ID,
    "mod": "gte",
    "range": 9
  }
]

4. User Profiles that answered negatively to CES Microsurvey

mod - A secondary matching condition for range. range - A secondary matching range (in this case, button index).
Note: For a 5-button CES, value range are 0,1,2,3,4.
[
  {
    "kind": "survey",
    "value": Chameleon Microsurvey ID,
    "mod": "lte",
    "range": 2
  }
]

5. User Profiles that were most recently active more than 7 days ago

[
  {
    "kind": "property",
    "prop": "last_seen_at",
    "op": "gt-d",
    "value": 7
  }
]

6. Admins AND are responsible for 3 or more user invites

[
  {
    "kind": "property",
    "prop": "role",
    "op": "eq",
    "value": "admin"
  },
  {
    "kind": "property",
    "prop": "invited_users_count",
    "op": "gte",
    "value": 3
  }
]

Full example using filters_op=or: Admins OR are responsible for 3 or more user invites

Query for users where either role is admin OR invited 3 or more users
{
  "filters_op": "or",
  "filters": [
    {
      "kind": "property",
      "prop": "role",
      "op": "eq",
      "value": "admin"
    },
    {
      "kind": "property",
      "prop": "invited_users_count",
      "op": "gte",
      "value": 3
    }
  ]
}

Full example using filters_op=or and filter Groups

Query for users where either Admins AND are in a Non-North-American timezone
{
  "filters": [
    {
      "kind": "property",
      "prop": "role",
      "op": "eq",
      "value": "admin"
    },
    {
      "kind": "group",
      "filters_op": "or",
      "filters": [
        {
          "kind": "property",
          "prop": "browser_tz",
          "op": "gt",
          "value": -4
        },
        {
          "kind": "property",
          "prop": "browser_tz",
          "op": "lt",
          "value": -8
        }
      ]
    }
  ]
}

Full example using filters_op=or and filter Groups

Query for users where either Admins AND are either com the Acme account or have an Acme email address.
{
  "filters": [
    {
      "kind": "property",
      "prop": "role",
      "op": "eq",
      "value": "admin"
    },
    {
      "kind": "group",
      "filters_op": "or",
      "filters": [
        {
          "kind": "property",
          "prop": "company.name",
          "op": "eq",
          "value": "Acme Inc."
        },
        {
          "kind": "property",
          "prop": "email",
          "op": "in",
          "value": "@acme.co"
        }
      ]
    }
  ]
}

Searching Users

HTTP Request

GET|POST https://api.chameleon.io/v3/analyze/profiles (plural)
param-description
segment_idoptionalThe Chameleon Segment ID from the List of Segments
filtersoptionalThe array of Segmentation filter expressions
filters_opoptionalThe operator to apply between each filter. Use either or or and (default)
expandoptionalObject that specifies relationships to include/exclude. Supported keys are profile and company
expand.profileoptionaluse values of all, min to control the properties present in the profile. Defaults to all
expand.companyoptionaluse values of all, min or skip to control the properties present in the company. Defaults to min

Using the expand parameter

# As a URL parameter
expand[profile]=min&expand[company]=skip

# In the Reqeust body
{"expand":{"profile":"min","company":"skip"}}
Notes:
  • A profile key will always be present with an object value. The company (embedded within profile) will be missing when the User Profile is not attached to a Company, otherwise it will be an object.

Example: Segment ID

{
  "segment_id": "5f3c4232c712de665632a6d7"
}

Example: Segmentation filter expressions

See examples above

HTTP Response

{
  "profiles": [
    {
      "id": "5f3c4232c712de665632a6d5",
      "uid": 18821,
      "email": "[email protected]",
      "role": "admin",
      "invited_users_count": 4,
       ...
    },
    {
      "id": "5f3c4232c712de665632a6d6",
      "uid": 18829,
      "email": "[email protected]",
      "role": "admin",
      "invited_users_count": 6,
       ...
    }
  ]
}

Counting Users

HTTP Request

GET|POST https://api.chameleon.io/v3/analyze/profiles/count
Use the same params / request body as Searching Users

HTTP Response

{
  "count": 65121
}