Hello community, I am trying to create a custom property in companies to store a list of string example:
custom_property: [‘one’, ‘two’, ‘three’]
but it failed to save the list, it used select types and multiple options…
I am using the package @hubspot/api-client to call the API, i have been able to save only boolean values strings and numbers.
My question is what type should I set to the custom property and how should I send the string list via API using your npm package?
I attach errors that I have had tried to send the list of string in different ways:


@JSequea
Hi.
Is `custom_property` type ‘enumeration’ ?
How about try this ?
// request json
{
// separated by semicolon
"custom_property": "1;2;3"
// invalid
// "custom_property": ["1", "2", "3"]
...
}
If it doesn’t work, please give details of `custom_property`.
Thanks.
Hello, these are the options that appear in the data type of a custom property
@JSequea
>custom_property: [‘one’, ‘two’, ‘three’]
If list element is limited like `1, 2, 3` only,
how about use multiple checkboxes ?
Like this.
Api request format is this.
{
// means [1, 2, 3]
// [1, 2, ...] -> "1;2;..." separated by semicoloumn
"test": "1;2;3",
...
}
If list element is not limited, it gets complicated.
For example, use property type `single-line text`.
If `list` value is alphanumeric, set property value `aaa;bbb;ccc`.
(Separate each element with a semicolon.
When using this value you need to convert it to an array.)
I hope it will be helpful.
Thanks.
I already have the type with multiple checkboxes
and I’m sending to the API:
custom_property: “1;2;3”
but i have the following error
{
“status”:“error”,
“message”:“Property values were not valid: [{\“isValid\”:false,\“message\”:\“1 was not one of the allowed options: [label: \\\”\\\”\\nvalue: \\\“\\\”\\ndisplay_order: 0\\nhidden: false\\nread_only: false\\n]\“,\“error\”:\“INVALID_OPTION\”,\“name\”:\“custom_property\”,\“localizedErrorMessage\”:\“1 was not one of the allowed options: [label: \\\”\\\”\\nvalue: \\\“\\\”\\ndisplay_order: 0\\nhidden: false\\nread_only: false\\n]\“}]”,
“correlationId”:“5b9ed677-aad4-47d6-b69b-9d28a208e845”,
“category”:“VALIDATION_ERROR”
}
@JSequea
Please show me your custome_property` info (label and internal value).
And if you can, source code, and request parameter.
property info:
If your can, please use this API.
GET `/crm/v3/properties/{objectType}/{propertyName}`
Thanks.
@skimura
I am using the batch to create multiple companies
the array that I put together to send to the batch
this is config the custom property croptypes
@JSequea
Thank you for the information.
I have a question.
1. Property `croptypes` looks like only one value.
But, request parameter means it has three values.
(like internal value 1, 2, and 3)
Is this property has three values? (and its internal values are 1, 2, and 3 ?)
Looking at the image it looks like there is only one.
2. What happens if you create a value of 1,2,3 and test it?
Thanks.