Contact custom property not exist

I created a contact custom property which is where_you_found_us according to this https://knowledge.hubspot.com/crm-setup/manage-your-properties#create-custom-properties
When I pass the custom property along the create contact API, it throws an Error PROPERTY_DOESNT_EXIST.
How can I resolve this?

Thanks

Thank you for your post @HJack .

@MichaelC would you mind sharing your advice here?

@HJack

Can you give some example of what API you are using and some example to understand better.

@MichaelCbelow is the image of the code. I use hubsport API to create a contact with a custom property where_you_found_us I created by Settings → Properties → Create Property (based on this Create and edit properties)

It throws Error where_you_found_us NOT EXIST

@HJack In your property settings - is “where_you_found_us” the internal value (green in picture) or the label (red in picture)?

I use the green label

Please provide more information about your API call

In order to better provide help I kindly ask you to provide the following:
1. The method you use (example: GET, POST, PUT, PATCH).
2. The URL you use to make the call (such as https://api.hubapi.com/crm/v3/properties/contacts)
NOTE: Remove your HAPI key token before posting it here.
3. Your request header
NOTE: Remove any access tokens if you use that in your header before posting it here.
4. Your request body (if there is one) :check_mark: (already done)

@MichaelC Let me know if you need more info

@HJack

I dont know if you are using some kind of framework to do the call for you. The proper URL to create a contact would be:

https://api.hubapi.com/crm/v3/objects/contacts?hapikey=YOUR_HUBSPOT_API_KEY (or without hapi if you use oauth)

Everything else looks good including the body.

Are you able to create a contact through the API without using the custom made property?

@MichaelC I use express to call hubspot create contact api with this library https://www.npmjs.com/package/@hubspot/api-client . I’m able to create a contact with default properties like email, phone, firstname, etc. It only throws Error NOT EXIST if I add the new custom property where_you_found_us to the payload

This is how I use hubspot API

@dennisedson its time for me to throw you into the game here. We need to check API logs and portal settings to confirm the above. I need your help here :slightly_smiling_face:

@HJack , do you have a contact record that is using that property?

I can confirm that the property does exist and I am able to use the read a property endpoint to confirm it, but I do not think there is a record using that property which makes me wonder if that is the issue. Could you test on a contact record?

@dennisedson I was trying to create a contact with that property but the request throws an Error PROPERTY NOT EXIST. So there are no contacts with that property

@HJack , would you be ok if I created a test contact in your account?

Yes, go ahead

I was able to create a contact in postman with the following properties JSON body

{

“properties”: {

“email”: “dennistests@dennistestedit.com”,

“firstname”: “Test”,

“lastname”: “Contact”,

“where_you_found_us”: “The internet”

}

}

And I was able to verify that it was added to the portal as you can see in this screengrab

Is there a way to print out the payload that to see what is actually being sent?

this is what I receive from the request if I add where_you_found_us

@HJack can you run this call and post what you get back here
Header: Normal headers
Body: None
Mehtod: GET
URL: https://api.hubapi.com/integrations/v1/me?hapikey=YOUR_HAPI_KEY_HERE

I want to tripple check the fact that the two of you are in the same portal and working.

@MichaelC I apply as you suggest

and it returns

HJack_0-1622654315131.png