I try it here, too. I use the import API to impor...
# questions
m
I try it here, too. I use the import API to import historical data, e.G “Account Created” for prev. registered accounts, with the
/import
endpoint. The API returns with 200. The events never show up! But if I set the
time
property to something within the last 5 days. It shows up! I double checked to set filters in the UI correctly! No luck. I am EU user. (I heard this could be related?) Here is my request that runs successfully. But as said, if the timestamp is like a year ago, I cannot find the events in the mixpanel UI.
Copy code
❯ curl --request POST \
     --url '<https://api.mixpanel.com/import?strict=1&project_id=123456>' \
     --header 'Accept: application/json' \
     --header 'Authorization: Basic some-auth' \
     --header 'Content-Type: application/json' \
     --data '
[
     {
          "properties": {
               "time": 1628714481010, // 0-5 days -> works. 1 year ago -> does not show up in UI
               "distinct_id": "7c50f520-fae4-11eb-9b6a-29ecbea6cad5",
               "$insert_id": "7c50f520-fae4-11eb-9b6a-29ecbea6cad1",
               "createdAt": "2021-08-11T20:41:21.010Z",
               "test": "1"
          },
          "event": "Account Created"
     }
]
'
{"code":200,"num_records_imported":1,"status":"OK"}