crisp-im / ruby-crisp-api

💎 Crisp API Ruby Wrapper
https://docs.crisp.chat/guides/rest-api/
MIT License
16 stars 7 forks source link

RouteError: invalid_data on add_people_event #7

Closed manjeetbprofit closed 4 years ago

manjeetbprofit commented 4 years ago

In Model

data =[{"color"=>nil, "text"=>"signed_up", "data"=>{"email"=>"username@domain.net", "date"=>"06-10-2019 11:36", "plan"=>"Trial"}}]
client.website.add_people_event(@website_id, contact_id, data)

Can you please help me or any reference what should be data format. Thanks!

eliottvincent commented 4 years ago

Fixed through support. Correct data formatting was:

data ={"text"=>"signed_up", "data"=>{"email"=>"username@domain.net",
"date"=>"06-10-2019 11:36", "plan"=>"Trial"}}