Creating property on custom object return 402 payment required

I’m trying to issue a call to the API to add a property to a custom object. I keep getting a 402 payment required response and the following error:

{

“status”: “error”,

“message”: “There was a problem with the request.”,

“correlationId”: “adccae08-0ed7-411c-b6bc-8d07d1892fa8”

}

I’m making a POST request as follows:
https://api.hubapi.com/crm/v3/properties/p20997640_course?hapikey=XXX

{

“name”: “sku_unique”,

“groupName”: “course_information”,

“hidden”: false,

“label”: “Sku Unique”,

“hasUniqueValue”: true,

“type”: “string”,

“fieldType”: “text”,

“description”: “Syncs with sku property. Created because existing sku property could not be set to unique.”

}

This is happening in out sandbox account and the live account. Not sure what I’m doing wrong here. Is it possible there’s a limit to the amount of properties on a custom object? We currently have 50.

Hi nickgi

Hope you are doing great, i found something you might find usefull HubSpot Developer Documentation - HubSpot docs

@nickgi ,

I have a feeling you are running into the uniqye value limit. Custom Objects can have only 2. Other standard object have a limit of 10

It is way down in this doc

Yes this was the issue! Quite a cryptic error though. Hopefully this can be improved in the future.

I have a request in to get it updated :slightly_smiling_face:

Thanks. Had me well and truly stumped.