I need to find all the distinct names of profile properties. I need it using the API to replace a legacy JQL solution.
Hi Joonas L., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> 👋
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
To get all distinct profile property names via API (as a replacement for JQL), the closest supported options in the provided docs are:
1. Lexicon Schemas API (recommended for governed properties)
Lexicon exposes schemas for events and profiles, including the list of properties for each. For profile properties, call: http GET /projects/{projectId}/schemas/profileLBKSThis “List Schemas for Entity” endpoint returns an array of schema objects; for each profile schema, schemaJson.properties contains the property definitions (keys = property names).[Lexicon schemas]- Endpoint: GET /projects/{projectId}/schemas/{entityType}
- Use entityType=profile
- Response shape (simplified): LBKS{ "results": [ { "entityType": "profile", "name": "User Profiles", "schemaJson": { "description": "...", "properties": { "$email": { "type": "string", ... }, "$first_name": { "type": "string", ... }, "Plan": { "type": "string", ... } // etc. }, "metadata": { ... } } } ], "status": "ok" }LBKSCollect all keys under schemaJson.properties to get the distinct profile property names.> Note: The OpenAPI snippet says “This operation does not require authentication”, but there is no further detail in the sources on auth, headers, or host; if you need that, it’s not covered in the provided docs.
2. Lexicon UI (for manual inspection / QA)
In the Mixpanel UI, the Lexicon → Profile Properties view shows all profile properties with metadata such as “Users With Property” and “Status”.[Lexicon profile properties] This isn’t an API, but it’s the canonical place to confirm that what you pull from the Schemas API matches governed properties.
3. Engage (Profiles) API – not for listing all keys
The Engage /engage endpoint returns full profiles and their $properties,[Engage query; Exporting profiles] but there is no documented parameter to “return all distinct property names” the way JQL could via arbitrary JS. You could theoretically:
- Export all profiles, then
- Union the keys in $properties client-side,but this will be incomplete if you don’t page through all profiles, and it’s not described as an intended “schema discovery” mechanism in the docs.---So, based on the provided documentation, the only API specifically designed to give you a structured list of profile properties (i.e., a JQL replacement for “distinct property names”) is the Lexicon Schemas API with: http GET /projects/{projectId}/schemas/profileLBKS
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
Let me check the knowledge base for you again. One moment! 📚
No, the Lexicon Schemas API does not guarantee all properties will be present.Per the docs, schemas are only a subset of what you see in Lexicon/UI: - A Lexicon Schema is created only when: 1. You create a schema via the Schemas API, 2. You import Lexicon entries via CSV, or 3. You add metadata in the UI (description, hide/show, tags, etc.). [Lexicon vs Schemas API; Schemas overview]- The Lexicon UI additionally shows entities that have been sent in the last 30 days, even if they do not have a schema. Those entities (and any properties on them that aren’t defined in a schema) will not be returned by the Schemas API.[Lexicon vs Schemas API; Schemas overview]- If a property on an event is not specified in the event schema, it will also not be returned by the Schemas API, even if it exists in data.[Schemas overview]So there are clear circumstances where real properties (including profile properties) exist in data and in the Lexicon UI but do not appear in the Lexicon Schemas API responses.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
