curl --request POST \
--url https://api.hubapi.com/companies/v2/companies/ \
--header 'Content-Type: application/json' \
--data '{
"properties": [
{
"name": "<string>",
"value": "<string>"
}
]
}'
"\nExample POST URL:\nhttps://api.hubapi.com/companies/v2/companies\n\nExample POST body:\n{\n \"properties\": [\n {\n \"name\": \"name\",\n \"value\": \"A company name\"\n },\n {\n \"name\": \"description\",\n \"value\": \"A company description\"\n }\n ]\n}\n\nExample response: \nReturns a 200 on success with an \nobject representing the company you have just created:\n{\n \"portalId\": 62515,\n \"additionalDomains\": [\n \n ],\n \"properties\": {\n \"createdate\": {\n \"sourceId\": \"API\",\n \"timestamp\": 1485550052985,\n \"versions\": [\n {\n \"name\": \"createdate\",\n \"sourceId\": \"API\",\n \"timestamp\": 1485550052985,\n \"value\": \"1485550052985\",\n \"source\": \"API\",\n \"sourceVid\": [\n \n ]\n }\n ],\n \"value\": \"1485550052985\",\n \"source\": \"API\"\n },\n \"name\": {\n \"sourceId\": null,\n \"timestamp\": 1485550052985,\n \"versions\": [\n {\n \"timestamp\": 1485550052985,\n \"sourceVid\": [\n \n ],\n \"name\": \"name\",\n \"value\": \"A company name\",\n \"source\": \"API\"\n }\n ],\n \"value\": \"A company name\",\n \"source\": \"API\"\n },\n \"description\": {\n \"sourceId\": null,\n \"timestamp\": 1485550052985,\n \"versions\": [\n {\n \"timestamp\": 1485550052985,\n \"sourceVid\": [\n \n ],\n \"name\": \"description\",\n \"value\": \"A company description\",\n \"source\": \"API\"\n }\n ],\n \"value\": \"A company description\",\n \"source\": \"API\"\n }\n },\n \"isDeleted\": false,\n \"companyId\": 266234266\n}"
This endpoint updates an existing company with new properties or property values. These properties/values must be specified by JSON in the request body. Use case for this endpoint: Your company is using HubSpot and an external Account-Based Marketing (ABM) solution. In your ABM product, you’ve recorded enough activity to classify a company as a target account. This endpoint would allow you to update the status of the company in HubSpot, kicking off a workflow notifying CRM users about the change.
curl --request POST \
--url https://api.hubapi.com/companies/v2/companies/ \
--header 'Content-Type: application/json' \
--data '{
"properties": [
{
"name": "<string>",
"value": "<string>"
}
]
}'
"\nExample POST URL:\nhttps://api.hubapi.com/companies/v2/companies\n\nExample POST body:\n{\n \"properties\": [\n {\n \"name\": \"name\",\n \"value\": \"A company name\"\n },\n {\n \"name\": \"description\",\n \"value\": \"A company description\"\n }\n ]\n}\n\nExample response: \nReturns a 200 on success with an \nobject representing the company you have just created:\n{\n \"portalId\": 62515,\n \"additionalDomains\": [\n \n ],\n \"properties\": {\n \"createdate\": {\n \"sourceId\": \"API\",\n \"timestamp\": 1485550052985,\n \"versions\": [\n {\n \"name\": \"createdate\",\n \"sourceId\": \"API\",\n \"timestamp\": 1485550052985,\n \"value\": \"1485550052985\",\n \"source\": \"API\",\n \"sourceVid\": [\n \n ]\n }\n ],\n \"value\": \"1485550052985\",\n \"source\": \"API\"\n },\n \"name\": {\n \"sourceId\": null,\n \"timestamp\": 1485550052985,\n \"versions\": [\n {\n \"timestamp\": 1485550052985,\n \"sourceVid\": [\n \n ],\n \"name\": \"name\",\n \"value\": \"A company name\",\n \"source\": \"API\"\n }\n ],\n \"value\": \"A company name\",\n \"source\": \"API\"\n },\n \"description\": {\n \"sourceId\": null,\n \"timestamp\": 1485550052985,\n \"versions\": [\n {\n \"timestamp\": 1485550052985,\n \"sourceVid\": [\n \n ],\n \"name\": \"description\",\n \"value\": \"A company description\",\n \"source\": \"API\"\n }\n ],\n \"value\": \"A company description\",\n \"source\": \"API\"\n }\n },\n \"isDeleted\": false,\n \"companyId\": 266234266\n}"
Successful response - This endpoint updates an existing company with new properties or property values
The response is of type object
.
Was this page helpful?