Error when creating a note with user_id

When I make a call to create a note without user_id, which is optional, the call works as expected. When I provide a user_id, I get “Invalid user_id” error (code 400).

How do I get the valid user_id? I am using a call to GET /oauth/connect/userinfo, and then take global_user_id. Is is the correct “user_id” for creating notes?

Also, shouldn’t be user_id populated by default with the current user if not provided?

Hi Andrei,

You can try using List Users endpoint Keap REST API
Use the “id” from there.

Thanks
Vasanth