"INVALID_OPTION" error while sending one from list

Hi, I am using the v1 HubSpot API. And when I send a request to the API, I get a strange error. It says that the value should be one from the list, but I send the value contained in the list.

POST https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/fakemail@mail.com
Array
(
 [request] => POST https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/fakemail@mail.com
 [request_made_at] => 2019-03-19 10:51:34
 [request_headers] => Array
 (
 [Accept-Type] => application/json
 [Content-Type] => application/json
 [Authorization] => Bearer ***HERE API KEY**
 )

 [request_data] => Array
 (
 [properties] => Array
 (
 [0] => Array
 (
 [property] => sc_volume
 [value] => 50
 )

 [1] => Array
 (
 [property] => tag
 [value] => Downloaded content A-E
 )

 [2] => Array
 (
 [property] => firstname
 [value] => Аовлвл // 4($(2(2kdkssksk
 )

 [3] => Array
 (
 [property] => phone
 [value] => 6396666666
 )

 [4] => Array
 (
 [property] => email
 [value] => fakemail@mail.com
 )

 )

 )

 [response_code] => 400
 [response_headers] => Array
 (
 [Date] => Tue, 19 Mar 2019 10:51:34 GMT
 [Content-Type] => application/json;charset=utf-8
 [Transfer-Encoding] => chunked
 [Connection] => keep-alive
 [Set-Cookie] => __cfduid=***; expires=Wed, 18-Mar-20 10:51:34 GMT; path=/; domain=.hubapi.com; HttpOnly
 [X-Trace] => ****
 [Vary] => Accept-Encoding
 [Access-Control-Allow-Credentials] => false
 [Strict-Transport-Security] => max-age=31536000; includeSubDomains; preload
 [Expect-CT] => max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
 [Server] => cloudflare
 [CF-RAY] => ***
 )

 [response_data] => Array
 (
 [validationResults] => Array
 (
 [0] => Array
 (
 [isValid] => 
 [message] => Downloaded content A-E was not one of the allowed options: [label: "BDR Lead"
value: "BDR Lead"
display_order: -1
hidden: false
read_only: false
, label: "Pricing List Downloaded"
value: "Pricing List Downloaded"
display_order: 0
hidden: false
read_only: false
, label: "Requested Demo"
value: "Requested Demo"
display_order: 1
hidden: false
read_only: false
, label: "Downloaded Content"
value: "Downloaded Content"
display_order: 2
hidden: false
read_only: false
, label: "Requested Custom Plan"
value: "Requested Custom Plan"
display_order: 3
hidden: false
read_only: false
, label: "Downloaded Content A-E"
value: "Downloaded Content A-E"
display_order: 4
hidden: false
read_only: false
, label: "Requested Academy"
value: "Requested Academy"
display_order: 5
hidden: false
read_only: false
, label: "No Flow"
value: "No Flow"
display_order: 6
hidden: false
read_only: false
]
 [error] => INVALID_OPTION
 [name] => tag
 )

 )

 [status] => error
 [message] => Property values were not valid
 [correlationId] => ***
 [requestId] => ***
 )
)

Hi @Convertful , what is the hubID of the account you’re looking to create a contact in? you should use the internal value of the options that exist in that account, not the label.

Sorry for the late answer.
I don’t have hub_id, only user’s email, but I can’t publish it in public thread.

> you should use the internal value of the options that exist in that account, not the label.

As you can see, from the query above, value and label have the same text “Downloaded Content A-E”

Hi @Convertful , I’d need to know the Hub ID so that I can see if the property exists in that account, but if the user’s email corresponds with the account you’re making requests to, you can just DM me that email.

I can see that your value has spaces in it in your API request, which HubSpot does not accept. If you create a property with spaces in it, HubSpot will automatically format that property to include underscores instead of spaces, so that’s probably what’s going on.

I’d need to see that actual property in the account that you’re requesting to in order to see the internal values of those properties in HubSpot so I can check against how you’re using that.

The issue is that the internal value for the tag field should have been “Downloaded Content A-E”, but was input as “Downloaded content A-E”. If internal values are edited, they will act case-sensitively.