Skip to main content
Solved

Error with curl command for custom property

  • June 19, 2024
  • 1 reply
  • 108 views

Forum|alt.badge.img

I am using a curl command to edit a custom property to test something out. Unfortunately I keep getting this error : {"errors":[{"id":"b7c5d32b-8a1e-4ea4-aae0-c9c9db9dc4c5","status":400,"code":"invalid","title":"Invalid input.","detail":"The payload provided in the request is invalid.","source":{"pointer":"/data"},"links":{},"meta":{}}]}%

 

This is the code I am running: 

curl --request PATCH \
     --url https://a.klaviyo.com/api/profiles/{profile_id}/ \
     --header 'Authorization: Klaviyo-API-Key your-api-key' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'revision: 2024-06-15' \
     --data '{"data": {"properties":{"Pesticides":["Acephate","Tetraconazole","Endrin","Pyrimethanil","Penthiopyrad"]}}}'
 

I used a private API key with full access and the profile ID has Pesticides as a property although I don’t think that should matter. I honestly am lost on what is going wrong.

Best answer by Maxbuzz

Hello @hkhan317 

According to the Update Profile API documentation the highlight attributes are required. Try adding type and id in the payload
 

 

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

Forum|alt.badge.img+31
  • Partner
  • 252 replies
  • Answer
  • June 20, 2024

Hello @hkhan317 

According to the Update Profile API documentation the highlight attributes are required. Try adding type and id in the payload