Hello.
I’m using the Create or Update Profile API method (reference) on the revision v2024-06-15 and it’s not clearing out a field when passing null to it, despite what the mentioned documention says.
Note that setting a field to
null
will clear out the field, whereas not including a field in your request will leave it unchanged.
It doesn’t work on the latest stable version v2025-01-15 as well.
Am I doing something wrong? Or is it not really working as supposed?
See real example below. Some information has been supressed.
Request
{
"RequestMethod": "POST",
"RequestUrl": "https://a.klaviyo.com/api/profile-import/",
"RequestBody": {
"data": { "type": "profile", "attributes": { "properties": {}, "email": "test@example.com", "title": null } }
}
}
Response
{
"data": {
"type": "profile",
"id": "<id>",
"attributes": {
"email": "<email>",
"phone_number": null,
"external_id": null,
"anonymous_id": null,
"first_name": null,
"last_name": null,
"organization": null,
"locale": null,
"title": "test title",
"image": null,
"created": "2025-02-25T17:50:38+00:00",
"updated": "2025-02-26T14:40:30.073777+00:00",
"last_event_date": null,
"location": {
"zip": null,
"region": null,
"city": null,
"latitude": null,
"longitude": null,
"address1": null,
"country": null,
"address2": null,
"timezone": null,
"ip": null
},
"properties": {
"customproperty": "test"
}
},
"relationships": {
"lists": {
"links": {
"self": "https://a.klaviyo.com/api/profiles/<id>/relationships/lists/",
"related": "https://a.klaviyo.com/api/profiles/<id>/lists/"
}
},
"segments": {
"links": {
"self": "https://a.klaviyo.com/api/profiles/<id>/relationships/segments/",
"related": "https://a.klaviyo.com/api/profiles/<id>/segments/"
}
},
"conversation": {
"links": {
"self": "https://a.klaviyo.com/api/profiles/<id>/relationships/conversation/",
"related": "https://a.klaviyo.com/api/profiles/<id>/conversation/"
}
}
},
"links": {
"self": "https://a.klaviyo.com/api/profiles/<id>/"
}
},
"links": {
"self": "https://a.klaviyo.com/api/profile-import/"
}
}