Mark important events in your charts
cURL
curl --request POST \ --url https://mixpanel.com/api/app/projects/{projectId}/annotations \ --header 'Content-Type: application/json' \ --data ' { "date": "<string>", "description": "<string>", "tags": [ {} ] } '
https://mixpanel.com/api/app/projects/{projectId}/annotations
YYYY-MM-DD HH:mm:ss
curl "https://mixpanel.com/api/app/projects/123/annotations" \ -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET
2024-01-15 12:00:00
Product launch - v2.0
curl "https://mixpanel.com/api/app/projects/123/annotations" \ -X POST \ -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET \ -H "Content-Type: application/json" \ -d '{ "date": "2024-01-15 12:00:00", "description": "Launched new homepage design", "tags": [1, 2] }'
{ "status": "ok", "results": { "id": 12345, "date": "2024-01-15 12:00:00", "description": "Launched new homepage design", "user": { "id": 789, "first_name": "John", "last_name": "Doe" }, "tags": [ {"id": 1, "name": "Product"}, {"id": 2, "name": "Launch"} ] } }
curl "https://mixpanel.com/api/app/projects/123/annotations/12345" \ -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET
curl "https://mixpanel.com/api/app/projects/123/annotations/12345" \ -X PATCH \ -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET \ -H "Content-Type: application/json" \ -d '{ "description": "Updated: Launched new homepage with A/B test", "tags": [1, 2, 3] }'
curl "https://mixpanel.com/api/app/projects/123/annotations/12345" \ -X DELETE \ -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET
curl "https://mixpanel.com/api/app/projects/123/annotations/tags" \ -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET
curl "https://mixpanel.com/api/app/projects/123/annotations/tags" \ -X POST \ -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET \ -H "Content-Type: application/json" \ -d '{"name": "Marketing Campaign"}'
Use meaningful descriptions
{ "description": "Product Launch: v2.0 - New checkout flow", "date": "2024-01-15 14:00:00" }
Tag annotations for filtering
Automate annotation creation
import requests import os def create_deployment_annotation(version): requests.post( f'https://mixpanel.com/api/app/projects/{os.getenv("PROJECT_ID")}/annotations', auth=(os.getenv("MP_USERNAME"), os.getenv("MP_SECRET")), json={ 'date': datetime.now().strftime('%Y-%m-%d %H:%M:%S'), 'description': f'Deployed version {version}' } )