Skip to main content
Contributor I
December 13, 2020
Solved

Unable to update properties through Identify API

  • December 13, 2020
  • 5 replies
  • 668 views

I am able to call the Identify API to create new profiles with custom properties and update the standard properties.

However, when I make a call to the Identify API web service to update any of my custom properties, the call simply returns a 0 and the profile is not updated.

Is it possible to make updates to these properties through the Identify API after initial insert?  If so, could you please provide an example?

If updates are not possible, what API can I use to update properties using the email as key.

 

This topic has been closed for replies.
Best answer by caroline

Hi Ramesh,

 

When I decode the payload you’re attempting to send in your API call, I get the following:

{"token":"Us4ytm","properties":{"$event_id":null,"items":[]}}

 

To use the Identify API, you must identify the person by their email address ($email). For example, a valid payload would be:

{
"token" : "WtKVQ4",
"properties" : {
"$email" : "thomas.jefferson@klaviyo.com",
"$first_name" : "Thomas",
"$last_name" : "Jefferson",
"Plan" : "Premium",
"SignUpDate" : "2016-05-01 10:10:00"
}
}

 

Our API documentation provides additional information.

 

Hope this helps!

 

Best,

 

Caroline

5 replies

k.mcevoy
Klaviyo Employee
Klaviyo Employee
December 14, 2020

Hi there, thanks for contributing to the Community! 

 

You should be able to leverage the Identity API to update existing profile’s custom properties. If you don’t mind could you send me the request you are currently using that is returning the 0? Additionally for your reference this is our documentation on the Track and Identity API. 

 

Thanks so much!
 

Kelsey 

Contributor I
December 16, 2020

Hi Kelsey 

 

I am facing same issues

 

My request url  is https://a.klaviyo.com/api/identify?data=eyJ0b2tlbiI6IlVzNHl0bSIsInByb3BlcnRpZXMiOnsiJGV2ZW50X2lkIjpudWxsLCJpdGVtcyI6W119fQ==}

 

I want to post First name , last name , email , phone no ,city , state , zip code and country field

 

Thanks so much!

 

Ramesh

caroline
carolineAnswer
Klaviyo Alum
December 17, 2020

Hi Ramesh,

 

When I decode the payload you’re attempting to send in your API call, I get the following:

{"token":"Us4ytm","properties":{"$event_id":null,"items":[]}}

 

To use the Identify API, you must identify the person by their email address ($email). For example, a valid payload would be:

{
"token" : "WtKVQ4",
"properties" : {
"$email" : "thomas.jefferson@klaviyo.com",
"$first_name" : "Thomas",
"$last_name" : "Jefferson",
"Plan" : "Premium",
"SignUpDate" : "2016-05-01 10:10:00"
}
}

 

Our API documentation provides additional information.

 

Hope this helps!

 

Best,

 

Caroline

Caroline Lu
Contributor I
December 17, 2020

Hi Caroline

 

Thank you very much for prompt useful response

API is working now

 

 

January 14, 2022

HI everyone:

I’m having this same problem trying to save the utm_id from the referring URL using _learnq.push in an EventListener for a Submit button on a Klaviyo embedded form. _learnq is populated correctly in the debugger and returns 1.

_learnq.push([‘indentify’, { 

  '$email' : e.detail.metaData["$email"],
   '$first_name' : e.detail.metaData["$first_name"],
   'Campaign ID' : utm_id
}]);

Campaign ID is not coming through to the profile, even though _learnq.push is returning 1. 

Can anyone on this thread help me?

Thanks!

Roy