Create a Custom Feed on the Setup page to generate server-to-server API credentials and store them in a safe place. You’ll need them to make a POST
request in the next step.
Use curl or Postman to send an HTTP request with your access credentials to our server-to-server endpoint https://s2s.mparticle.com/v2/events
.
Create data.json
with the contents of your request.
{
"schema_version": 2,
"environment": "development",
"user_identities": {
"customer_id": "1234",
"email": "hello@mparticle.com"
},
"events": [
{
"data": {
"event_name": "click",
"custom_event_type": "other",
"custom_attributes": {
"button_name": "home",
"other_attribute": "xyz"
}
},
"event_type": "custom_event"
}
]
}
Run curl
from the same directory.
curl -u YOUR_API_KEY:YOUR_API_SECRET -vX POST -H "Content-Type: application/json" -d @data.json https://s2s.mparticle.com/v2/events
Check out our Postman collection designed to help build your understanding of mParticle by allowing you to send real test data into mParticle to see how the platform responds.
Go to the Live Stream and watch new events come in as you send requests.
Congrats on sending your first event to mParticle!
Some ideas on what to do next:
Was this page helpful?