curl --request POST \
--url https://api.hubapi.com/companies/v2/domains/{domain}/companies \
--header 'Content-Type: application/json' \
--data '{
"limit": 123,
"requestOptions": {
"properties": [
"<string>"
]
},
"offset": {
"isPrimary": true,
"companyId": 123
}
}'
"\nExample POST URL:\nhttps://api.hubapi.com/companies/v2/domains/hubspot.com/companies\n\nExample POST body:\n{\n \"limit\": 2,\n \"requestOptions\": {\n \"properties\": [\n \"domain\",\n \"createdate\",\n \"name\",\n \"hs_lastmodifieddate\"\n ]\n },\n \"offset\": {\n \"isPrimary\": true,\n \"companyId\": 0\n }\n}\n\nExample response:\n{\n \"results\": [\n {\n \"portalId\": 62515,\n \"companyId\": 184896670,\n \"isDeleted\": false,\n \"properties\": {\n \"hs_lastmodifieddate\": {\n \"value\": \"1502872954691\",\n \"timestamp\": 1502872954691,\n \"source\": \"CALCULATED\",\n \"sourceId\": null,\n \"versions\": [\n {\n \"name\": \"hs_lastmodifieddate\",\n \"value\": \"1502872954691\",\n \"timestamp\": 1502872954691,\n \"source\": \"CALCULATED\",\n \"sourceVid\": [\n \n ]\n }\n ]\n },\n \"domain\": {\n \"value\": \"hubspot.com\",\n \"timestamp\": 1457708103847,\n \"source\": \"COMPANIES\",\n \"sourceId\": null,\n \"versions\": [\n {\n \"name\": \"domain\",\n \"value\": \"hubspot.com\",\n \"timestamp\": 1457708103847,\n \"source\": \"COMPANIES\",\n \"sourceVid\": [\n \n ]\n }\n ]\n },\n \"name\": {\n \"value\": \"Hubspot, Inc.\",\n \"timestamp\": 1457708103906,\n \"source\": \"BIDEN\",\n \"sourceId\": \"name\",\n \"versions\": [\n {\n \"name\": \"name\",\n \"value\": \"Hubspot, Inc.\",\n \"timestamp\": 1457708103906,\n \"sourceId\": \"name\",\n \"source\": \"BIDEN\",\n \"sourceVid\": [\n \n ]\n }\n ]\n },\n \"createdate\": {\n \"value\": \"1457708103847\",\n \"timestamp\": 1457708103847,\n \"source\": \"API\",\n \"sourceId\": null,\n \"versions\": [\n {\n \"name\": \"createdate\",\n \"value\": \"1457708103847\",\n \"timestamp\": 1457708103847,\n \"source\": \"API\",\n \"sourceVid\": [\n \n ]\n }\n ]\n }\n },\n \"additionalDomains\": [\n \n ],\n \"stateChanges\": [\n \n ],\n \"mergeAudits\": [\n \n ]\n },\n {\n \"portalId\": 62515,\n \"companyId\": 418736767,\n \"isDeleted\": false,\n \"properties\": {\n \"hs_lastmodifieddate\": {\n \"value\": \"1498644245669\",\n \"timestamp\": 1498644245669,\n \"source\": \"CALCULATED\",\n \"sourceId\": null,\n \"versions\": [\n {\n \"name\": \"hs_lastmodifieddate\",\n \"value\": \"1498644245669\",\n \"timestamp\": 1498644245669,\n \"source\": \"CALCULATED\",\n \"sourceVid\": [\n \n ]\n }\n ]\n },\n \"domain\": {\n \"value\": \"hubspot.com\",\n \"timestamp\": 1490280388204,\n \"source\": \"API\",\n \"sourceId\": null,\n \"versions\": [\n {\n \"name\": \"domain\",\n \"value\": \"hubspot.com\",\n \"timestamp\": 1490280388204,\n \"source\": \"API\",\n \"sourceVid\": [\n \n ]\n }\n ]\n },\n \"name\": {\n \"value\": \"qweqwe2323\",\n \"timestamp\": 1490280388204,\n \"source\": \"API\",\n \"sourceId\": null,\n \"versions\": [\n {\n \"name\": \"name\",\n \"value\": \"qweqwe2323\",\n \"timestamp\": 1490280388204,\n \"source\": \"API\",\n \"sourceVid\": [\n \n ]\n }\n ]\n },\n \"createdate\": {\n \"value\": \"1490280388204\",\n \"timestamp\": 1490280388204,\n \"source\": \"API\",\n \"sourceId\": \"API\",\n \"versions\": [\n {\n \"name\": \"createdate\",\n \"value\": \"1490280388204\",\n \"timestamp\": 1490280388204,\n \"sourceId\": \"API\",\n \"source\": \"API\",\n \"sourceVid\": [\n \n ]\n }\n ]\n }\n },\n \"additionalDomains\": [\n \n ],\n \"stateChanges\": [\n \n ],\n \"mergeAudits\": [\n \n ]\n }\n ],\n \"hasMore\": true,\n \"offset\": {\n \"companyId\": 418736767,\n \"isPrimary\": true\n }\n}"
Deletes the exisiting company specified by :companyId. Returns JSON indicating whether or not the specified company was actually deleted. Since companies play a central role in the CRM, it is a best practice not to delete a company unless your application has created them.
curl --request POST \
--url https://api.hubapi.com/companies/v2/domains/{domain}/companies \
--header 'Content-Type: application/json' \
--data '{
"limit": 123,
"requestOptions": {
"properties": [
"<string>"
]
},
"offset": {
"isPrimary": true,
"companyId": 123
}
}'
"\nExample POST URL:\nhttps://api.hubapi.com/companies/v2/domains/hubspot.com/companies\n\nExample POST body:\n{\n \"limit\": 2,\n \"requestOptions\": {\n \"properties\": [\n \"domain\",\n \"createdate\",\n \"name\",\n \"hs_lastmodifieddate\"\n ]\n },\n \"offset\": {\n \"isPrimary\": true,\n \"companyId\": 0\n }\n}\n\nExample response:\n{\n \"results\": [\n {\n \"portalId\": 62515,\n \"companyId\": 184896670,\n \"isDeleted\": false,\n \"properties\": {\n \"hs_lastmodifieddate\": {\n \"value\": \"1502872954691\",\n \"timestamp\": 1502872954691,\n \"source\": \"CALCULATED\",\n \"sourceId\": null,\n \"versions\": [\n {\n \"name\": \"hs_lastmodifieddate\",\n \"value\": \"1502872954691\",\n \"timestamp\": 1502872954691,\n \"source\": \"CALCULATED\",\n \"sourceVid\": [\n \n ]\n }\n ]\n },\n \"domain\": {\n \"value\": \"hubspot.com\",\n \"timestamp\": 1457708103847,\n \"source\": \"COMPANIES\",\n \"sourceId\": null,\n \"versions\": [\n {\n \"name\": \"domain\",\n \"value\": \"hubspot.com\",\n \"timestamp\": 1457708103847,\n \"source\": \"COMPANIES\",\n \"sourceVid\": [\n \n ]\n }\n ]\n },\n \"name\": {\n \"value\": \"Hubspot, Inc.\",\n \"timestamp\": 1457708103906,\n \"source\": \"BIDEN\",\n \"sourceId\": \"name\",\n \"versions\": [\n {\n \"name\": \"name\",\n \"value\": \"Hubspot, Inc.\",\n \"timestamp\": 1457708103906,\n \"sourceId\": \"name\",\n \"source\": \"BIDEN\",\n \"sourceVid\": [\n \n ]\n }\n ]\n },\n \"createdate\": {\n \"value\": \"1457708103847\",\n \"timestamp\": 1457708103847,\n \"source\": \"API\",\n \"sourceId\": null,\n \"versions\": [\n {\n \"name\": \"createdate\",\n \"value\": \"1457708103847\",\n \"timestamp\": 1457708103847,\n \"source\": \"API\",\n \"sourceVid\": [\n \n ]\n }\n ]\n }\n },\n \"additionalDomains\": [\n \n ],\n \"stateChanges\": [\n \n ],\n \"mergeAudits\": [\n \n ]\n },\n {\n \"portalId\": 62515,\n \"companyId\": 418736767,\n \"isDeleted\": false,\n \"properties\": {\n \"hs_lastmodifieddate\": {\n \"value\": \"1498644245669\",\n \"timestamp\": 1498644245669,\n \"source\": \"CALCULATED\",\n \"sourceId\": null,\n \"versions\": [\n {\n \"name\": \"hs_lastmodifieddate\",\n \"value\": \"1498644245669\",\n \"timestamp\": 1498644245669,\n \"source\": \"CALCULATED\",\n \"sourceVid\": [\n \n ]\n }\n ]\n },\n \"domain\": {\n \"value\": \"hubspot.com\",\n \"timestamp\": 1490280388204,\n \"source\": \"API\",\n \"sourceId\": null,\n \"versions\": [\n {\n \"name\": \"domain\",\n \"value\": \"hubspot.com\",\n \"timestamp\": 1490280388204,\n \"source\": \"API\",\n \"sourceVid\": [\n \n ]\n }\n ]\n },\n \"name\": {\n \"value\": \"qweqwe2323\",\n \"timestamp\": 1490280388204,\n \"source\": \"API\",\n \"sourceId\": null,\n \"versions\": [\n {\n \"name\": \"name\",\n \"value\": \"qweqwe2323\",\n \"timestamp\": 1490280388204,\n \"source\": \"API\",\n \"sourceVid\": [\n \n ]\n }\n ]\n },\n \"createdate\": {\n \"value\": \"1490280388204\",\n \"timestamp\": 1490280388204,\n \"source\": \"API\",\n \"sourceId\": \"API\",\n \"versions\": [\n {\n \"name\": \"createdate\",\n \"value\": \"1490280388204\",\n \"timestamp\": 1490280388204,\n \"sourceId\": \"API\",\n \"source\": \"API\",\n \"sourceVid\": [\n \n ]\n }\n ]\n }\n },\n \"additionalDomains\": [\n \n ],\n \"stateChanges\": [\n \n ],\n \"mergeAudits\": [\n \n ]\n }\n ],\n \"hasMore\": true,\n \"offset\": {\n \"companyId\": 418736767,\n \"isPrimary\": true\n }\n}"
The domain to search for companies by.
Successful response - Deletes the exisiting company specified by :companyId
The response is of type object
.
Was this page helpful?