Can I use the API to set descriptions for events and event properties programmatically?
Hi Ali B., 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
Yes, you can use the Lexicon Schemas API to set descriptions for events and event properties programmatically in Mixpanel. The Lexicon Schemas API provides endpoints to retrieve, create, and delete your data dictionary in Lexicon Lexicon Schemas API.To set descriptions for events and event properties using the API, you would typically use a POST request to create or update schemas. The API allows you to define schemas that include descriptions for events and their properties.Here's an example of how an event schema might look when using the API::LBKSLBKS```LBKS{
"$schema":: "http://json-schema.org/draft-07/schema",
"description": "Tracked when a user adds an item to their cart.",
"required": [
"item_name",
"item_id",
"item_price"
],
"additionalProperties": true,
"properties": {
"item_name": {
"type": "string",
"description": "The name of the item",
"examples": [
"Blue Widget"
]
},
"item_id": {
"type": "integer",
"description": "The internal id of the item",
"examples": [
12345
]
},
"item_price": {
"type": "number",
"description": "The current price of the item",
"examples": [
25.35
]
}
}
}```In this example, you can see that the event itself has a description, and each property within the event also has its own description Lexicon Schemas API.To use the API, you'll need to refer to the specific endpoints and authentication methods detailed in Mixpanel's API reference documentation. The base URL for the API is typically https://{regionAndDomain}.com/api/app
 Annotations API.Remember that while the API provides this functionality, you can also manage event and property descriptions directly through the Lexicon UI or by exporting and importing CSV files if you prefer a more manual approach Cleaning up display names and adding descriptions for events.
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.