curl --request POST \
--url https://api.hubapi.com/companies/v2/companies/ \
--header 'Content-Type: application/json' \
--data '
{
"properties": [
{
"name": "<string>",
"value": "<string>"
}
]
}
'[
{
"properties": [
{
"name": "name",
"value": "A company name"
},
{
"name": "description",
"value": "A company description"
}
]
},
{
"sourceId": "API",
"timestamp": 1485550052985,
"versions": [
{
"name": "createdate",
"sourceId": "API",
"timestamp": 1485550052985,
"value": "1485550052985",
"source": "API",
"sourceVid": []
}
],
"value": "1485550052985",
"source": "API"
},
{
"sourceId": null,
"timestamp": 1485550052985,
"versions": [
{
"timestamp": 1485550052985,
"sourceVid": [],
"name": "name",
"value": "A company name",
"source": "API"
}
],
"value": "A company name",
"source": "API"
},
{
"sourceId": null,
"timestamp": 1485550052985,
"versions": [
{
"timestamp": 1485550052985,
"sourceVid": [],
"name": "description",
"value": "A company description",
"source": "API"
}
],
"value": "A company description",
"source": "API"
}
]Create a company record for a given account. Properties are specified in the request body via the properties field.
curl --request POST \
--url https://api.hubapi.com/companies/v2/companies/ \
--header 'Content-Type: application/json' \
--data '
{
"properties": [
{
"name": "<string>",
"value": "<string>"
}
]
}
'[
{
"properties": [
{
"name": "name",
"value": "A company name"
},
{
"name": "description",
"value": "A company description"
}
]
},
{
"sourceId": "API",
"timestamp": 1485550052985,
"versions": [
{
"name": "createdate",
"sourceId": "API",
"timestamp": 1485550052985,
"value": "1485550052985",
"source": "API",
"sourceVid": []
}
],
"value": "1485550052985",
"source": "API"
},
{
"sourceId": null,
"timestamp": 1485550052985,
"versions": [
{
"timestamp": 1485550052985,
"sourceVid": [],
"name": "name",
"value": "A company name",
"source": "API"
}
],
"value": "A company name",
"source": "API"
},
{
"sourceId": null,
"timestamp": 1485550052985,
"versions": [
{
"timestamp": 1485550052985,
"sourceVid": [],
"name": "description",
"value": "A company description",
"source": "API"
}
],
"value": "A company description",
"source": "API"
}
]Scope requirements
A list of properties for the new company.
Show child attributes
Successful response
The response is of type object.