Fetching Profiles

You can fetch real-time profile attributes and audience membership for a user using the GrowthLoop Personalization API.

Endpoint

GET https://personalize.prod.growthloop.com/v1/entities/customers/{entity_id}

Authentication

Authentication is handled via a Bearer Token passed in the request header.

Required Header

Authorization: Bearer $(echo -n "YOUR_PERSONALIZATION_API_KEY" | base64)

Send the base64-encoded API key in the header. Make sure your API key has the Personalization API scope enabled.


Privacy and PII

By default, API responses exclude fields tagged as PII Fields. Admins can override this setting in Org Settings if your organization needs to transmit PII through the Personalization API.


Example Request (cURL)

curl -X GET "https://personalize.prod.growthloop.com/v1/entities/customers/user_001" \
  -H "Authorization: Bearer $(echo -n "YOUR_PERSONALIZATION_API_KEY" | base64)" \
  -H "Content-Type: application/json" \
  -H "X-Source-Connection-Id: YOUR_SOURCE_CONNECTION_ID"

The X-Source-Connection-Id header is optional. If your organization has more than one source connection and each has its own personalization store, pass the ID of the source connection whose store should serve the profile. Omit the header to use your organization's default personalization store. If your API key is scoped to a source connection, that scope takes precedence and the header is ignored.


Sample Response

Below is an example JSON response returned by the API. By default, the response includes audience membership and non-PII profile attributes:

{
    "age": 30,
    "audience_count": 2,
    "audiences": {
        "1": {
            "audience_name": "churned users",
            "offer": "20%"
        },
        "2": {
            "audience_name": "Onboarding",
            "offer": "10%"
        }
    },
    "entity_id": "user_001",
    "entity_name": "customers",
    "is_premium": true,
    "last_login": "2024-01-15T10:30:00Z",
    "metadata": {
        "campaign": "spring_2024",
        "source": "signup_form",
        "utm_source": "google"
    },
    "subscription_tier": "gold",
    "tags": [
        "vip",
        "early_adopter"
    ]
}

If the user isn't found

The API returns HTTP 200 even when no profile exists for the requested entity_id — for example, if the user doesn't have any synced attributes yet or the ID is misspelled. In that case, the response contains only the entity fields:

{
    "entity_id": "user_99999",
    "entity_name": "customers"
}

If you see a response like this, check that the entity_id matches your match field value and that a sync or journey has written profile data for that user.


Response Fields Explained

Profile Attributes

Any warehouse attributes available for the user, such as:

  • age
  • subscription_tier
  • is_premium
  • last_login

These are served directly from your warehouse-backed profile.

Fields tagged as PII Fields are excluded unless an admin allows PII transmission in Org Settings.


Audience Membership

  • audience_count → Number of audiences the user currently qualifies for
  • audiences → Object containing audience names and any associated attributes

This allows you to dynamically check qualification and serve personalized experiences (e.g., win-back offers, onboarding flows, pricing changes).


Entity Information

  • entity_id → Unique identifier for the profile
  • entity_name → The entity type (e.g., customers)


Did this page help you?