How to get UTM vars into Record via API call?


Once we submit data from our custom forms the UTM vars are being rejected.

the process looks like this:
We use the APi key to send data from a custom form into:

  • A: email
  • B: our local database
  • C: Keap of course

We use PUT via createOrUpdateContactUsingPUT

Then we catch the contactId for the use and run this

However… insertUTMsUsingPOST
Always fails to update the UTM vars.

The output “says” it works.
the code returned is 200, along with all of the following:

  • [utmSource] => test01source
  • [utmMedium] => test01medium
  • [utmTerm] => test01term
  • [utmCampaign] => test01campaign
  • [utmContent] => test01content

However… That data never gets inserted into the user record.

We use the following call:{contactId}/utm
We have tried using all of the following for keapSourceId

  • -1
  • 0
  • 115 (our default form ID)
  • null
  • empty

How do we get the UTM vars into createOrUpdateContactUsingPUT or insertUTMsUsingPOST?