Is the documentation for the Events API correct?

#1

The documentation says that the API to create an Event is this:

$ curl https://api.intercom.io/events
-X POST
-H ‘Authorization:Bearer ’
-H “Content-Type: application/json” -d’
{
“event_name” : “invited-friend”,
“created_at”: 1391691571,
“user_id” : “314159”
}’

however when I try it (with a correct access token and user id, it says:
{
“type”: “error.list”,
“request_id”: null,
“errors”: [
{
“code”: “parameter_not_found”,
“message”: “missing data parameter”
}
]
}

0 Likes

#2

Hey @david927 :wave:

Everything is correct there with the params you’re providing during the POST request. Can you make sure you’re sending this encoded as JSON however? We expect to parse this as JSON - otherwise, we don’t find the event ‘data’ and respond that it’s missing.

0 Likes

#3

That was it. Thanks so much, Zach!

1 Like