I want to update my company name.

We are currently developing in php.
I want to update the company name using hubspot’s api.
The test run of the hubspot api documentation allows me to change the company name without any problems, but the following code gives me a 400 error.
Can someone please help me? Please.

use HubSpot\Factory;
use HubSpot\Client\Crm\Contacts\Model\SimplePublicObjectInput;

$client = Factory::createWithAccessToken(‘xxxxxxx-xxxxx-xxxxx-xxxx’);

$properties1 = [
‘companyname’ => ‘asas’
];
logger($properties1);
$simplePublicObjectInput = new SimplePublicObjectInput([
‘properties’ => $properties1,
]);
$client->crm()->companies()->basicApi()->update(‘xxxxxxxxxx’, $simplePublicObjectInput);

Hi @Yukiki :waving_hand:

Assuming you’re trying to update the default Contact property, “Company Name” --> this property’s internal name is “company”, not “companyname”. Hopefully the fix is as simple as that :crossed_fingers:

I hope this proves useful. Please let me know if you have any follow-up questions.

@blend-zachklein . The properties api currently show name

https://api.hubapi.com/crm/v3/properties/companies
company nor companyname is not available - will create it manually.
When creating company via api name, company, or companyname do not work.

Never mind … for some reason for companies the properties schema is completely different than any other object - **bleep**?