HTTP Request, Patch to modify notes on a contact

Looking to create some HTTP Requests using Patch to modify notes on contacts. Based on the Rest API docs this should be formatted correctly. I receive no errors. However, no change is implemented.

Is the functionality I am attempting not permissible?

Ran tests with postman and response is good, and I can see the update on the test account correctly.

Still unsure as to why this does not work from the HTTP Request within a campaign?

I would guess the request is not authorized in the automation sequence, but Postman probably is.

To test you would need to pass an additional header in the request from the automation.

Header: X-Keap-API-Key
Value: {create a new service account key}

You can create the service account key from the API Settings.

Hmm, I have tried both with personal key from my admin account and a service key, neither are working.

Ok, I was able to POST and PATCH the note when I also passed the Content-Type: application/json


I could then test and it created the noted and then updated it;

Perfect! Wow that is all I was missing huh. What a great catch. Thank you so much!

So hit another wall, trying to implement merge fields both in the URL and body. Any suggestions?


w2edsfxc

I was able to pass the contact ID in the URL parameter w/o issue. The contactId I tested is literally 123.

However, nothing in the body was converted. All I got back was the merge fields:

[2024-06-21 17:07:20 UTC] POST~ []
[2024-06-21 17:07:20 UTC] GET~ {"contactId":"123"}
[2024-06-21 17:07:20 UTC] INPUT~ {
  "id": ~Contact.Id~,
  "first": "~Contact.FirstName~",
  "last": "~Contact.LastName~",
  "email": "~Contact.Email~"
}

I have tested body and are also getting the merge fields returned as key not value.

Regarding patch, you were able to merge a contact ID and Note ID into the URL path without issue?

Regarding Body, should we try to create the body entirely within a custom field like a Text Area, then supply it to the body as 1 merge field with correct encapsulation?