APIs & Integrations

AMamdani
Participant

Error 400: Some required fields were not set: [name, label, type, fieldType, groupName]

SOLVE

Hi everyone!

 

I'm getting an error with status 400 when trying to access this endpoint with POST: https://api.hubapi.com/crm/v3/properties/contacts

 

Full error: 

{
    "status": "error",
    "message": "Invalid input JSON on line 13, column 1. Some required fields were not set: [name, label, type, fieldType, groupName]",
    "correlationId": "54d021af-bdad-4d23-ba19-65bad0e8deff",
    "category": "VALIDATION_ERROR"
}
 
And here's my body: 
{
    "properties": {
        "full_name": -,
        "email": -,
        "mobile_phone_number": -,
        "num_of_bathrooms": 3,
        "num_of_bedrooms": 3,
        "additional_info": "none",
        "property_type": -
    }
}
 
Any help would be much appreciated, thanks!
0 Upvotes
1 Accepted solution
SteveHTM
Solution
Guide | Partner
Guide | Partner

Error 400: Some required fields were not set: [name, label, type, fieldType, groupName]

SOLVE

@AMamdani - it looks to me from your code fragment that you are using a properties API (one that is used to define or update property fields on an object type) rather that one intended to create a contact with specific property values.

I think what you may want to use here is:

https://api.hubapi.com/crm/v3/objects/contacts

See docs at: https://developers.hubspot.com/beta-docs/reference/api/crm/objects/contacts 

 

Good luck!

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature

View solution in original post

2 Replies 2
SteveHTM
Solution
Guide | Partner
Guide | Partner

Error 400: Some required fields were not set: [name, label, type, fieldType, groupName]

SOLVE

@AMamdani - it looks to me from your code fragment that you are using a properties API (one that is used to define or update property fields on an object type) rather that one intended to create a contact with specific property values.

I think what you may want to use here is:

https://api.hubapi.com/crm/v3/objects/contacts

See docs at: https://developers.hubspot.com/beta-docs/reference/api/crm/objects/contacts 

 

Good luck!

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature
AMamdani
Participant

Error 400: Some required fields were not set: [name, label, type, fieldType, groupName]

SOLVE

Oh! Thank you so much! Not sure how I missed that 😅

 

Accepting as solution.

0 Upvotes