Solved

HTTP 400: Bad Request (Unable to create definition from arguments)

  • 12 July 2022
  • 2 replies
  • 640 views

Hi,

I’m trying to call event segmentation API and the sample curl request is as shown below. i’m getting 400 response. could you please help me identify the issue here?

curl --location -g --request GET 'https://amplitude.com/api/2/events/segmentation?start=20220704&end=20220707&s=[{"prop": "gp:customer_type","op": "is","values": ["New"]}]&e={"event_type": "OnPricingPage", "filters": [{"subprop_type": "event","subprop_key": "signed_in","subprop_op": "is","subprop_value": ["True"]}}' 

 

icon

Best answer by Zhenia Semenina 15 July 2022, 16:14

View original

2 replies

Userlevel 4
Badge +7

Hey there,

please refer to this post: 

 customer type and signed in both appear to be custom properties and when we use a custom user property to filter on, we have to use gp: before it. 

Userlevel 7
Badge +10

Hey @harry-harish 

Adding to Zhenia’s suggestion of using gp: for custom user properties, you could also try using backslash syntax to escape characters if the issue persists since you are using curl.

Reply