curl --request POST \
--url https://api.hubapi.com/contacts/v1/contact \
--header 'Content-Type: application/json' \
--data '
{
"properties": [
{
"property": "<string>",
"value": "<string>"
}
]
}
'"{ \"properties\": [ { \"property\": \"email\", \"value\": \"testingapis@hubspot.com\" }, { \"property\": \"firstname\", \"value\": \"Adrian\" }, { \"property\": \"lastname\", \"value\": \"Mott\" }, { \"property\": \"website\", \"value\": \" }, { \"property\": \"company\", \"value\": \"HubSpot\" }, { \"property\": \"phone\", \"value\": \"555-122-2323\" }, { \"property\": \"address\", \"value\": \"25 First Street\" }, { \"property\": \"city\", \"value\": \"Cambridge\" }, { \"property\": \"state\", \"value\": \"MA\" }, { \"property\": \"zip\", \"value\": \"02139\" } ] } Returns an HTTP 200 response on success, with the response body containing the details of the new contact record: { \"identity-profiles\": [ { \"identities\": [ { \"timestamp\": 1331075050646, \"type\": \"EMAIL\", \"value\": \"fumanchu@hubspot.com\" }, { \"timestamp\": 1331075050681, \"type\": \"LEAD_GUID\", \"value\": \"22a26060-c9d7-44b0-9f07-aa40488cfa3a\" } ], \"vid\": 61574 } ], \"properties\": { \"website\": { \"value\": \"http: //hubspot.com\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"http: //hubspot.com\", \"source-type\": \"API\", \"source-id\": null } ] }, \"city\": { \"value\": \"Cambridge\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"Cambridge\", \"source-type\": \"API\", \"source-id\": null } ] }, \"firstname\": { \"value\": \"Adrian\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"Adrian\", \"source-type\": \"API\", \"source-id\": null } ] }, \"zip\": { \"value\": \"02139\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"02139\", \"source-type\": \"API\", \"source-id\": null } ] }, \"lastname\": { \"value\": \"Mott\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"Mott\", \"source-type\": \"API\", \"source-id\": null } ] }, \"company\": { \"value\": \"HubSpot\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"HubSpot\", \"source-type\": \"API\", \"source-id\": null } ] }, \"phone\": { \"value\": \"555-122-2323\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"555-122-2323\", \"source-type\": \"API\", \"source-id\": null } ] }, \"state\": { \"value\": \"MA\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"MA\", \"source-type\": \"API\", \"source-id\": null } ] }, \"address\": { \"value\": \"25FirstStreet\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"25FirstStreet\", \"source-type\": \"API\", \"source-id\": null } ] }, \"email\": { \"value\": \"fumanchu@hubspot.com\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"fumanchu@hubspot.com\", \"source-type\": \"API\", \"source-id\": null } ] } }, \"form-submissions\": [ ], \"vid\": 61574 }"Create a new contact
The create a new contact endpoint is used to create a new contact in HubSpot. The new contact will be assigned a unique ID (vid), which can be used to look it up later. Use case for this endpoint: This endpoint can be used to perform a one-time sync of new contacts from an external system into HubSpot. Need to create or update multiple contacts? Try the Batch endpoint. Note: This endpoint is designed for offline contacts and does not support lead tracking. If your contacts come through online forms, use the form submission endpoint.
curl --request POST \
--url https://api.hubapi.com/contacts/v1/contact \
--header 'Content-Type: application/json' \
--data '
{
"properties": [
{
"property": "<string>",
"value": "<string>"
}
]
}
'"{ \"properties\": [ { \"property\": \"email\", \"value\": \"testingapis@hubspot.com\" }, { \"property\": \"firstname\", \"value\": \"Adrian\" }, { \"property\": \"lastname\", \"value\": \"Mott\" }, { \"property\": \"website\", \"value\": \" }, { \"property\": \"company\", \"value\": \"HubSpot\" }, { \"property\": \"phone\", \"value\": \"555-122-2323\" }, { \"property\": \"address\", \"value\": \"25 First Street\" }, { \"property\": \"city\", \"value\": \"Cambridge\" }, { \"property\": \"state\", \"value\": \"MA\" }, { \"property\": \"zip\", \"value\": \"02139\" } ] } Returns an HTTP 200 response on success, with the response body containing the details of the new contact record: { \"identity-profiles\": [ { \"identities\": [ { \"timestamp\": 1331075050646, \"type\": \"EMAIL\", \"value\": \"fumanchu@hubspot.com\" }, { \"timestamp\": 1331075050681, \"type\": \"LEAD_GUID\", \"value\": \"22a26060-c9d7-44b0-9f07-aa40488cfa3a\" } ], \"vid\": 61574 } ], \"properties\": { \"website\": { \"value\": \"http: //hubspot.com\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"http: //hubspot.com\", \"source-type\": \"API\", \"source-id\": null } ] }, \"city\": { \"value\": \"Cambridge\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"Cambridge\", \"source-type\": \"API\", \"source-id\": null } ] }, \"firstname\": { \"value\": \"Adrian\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"Adrian\", \"source-type\": \"API\", \"source-id\": null } ] }, \"zip\": { \"value\": \"02139\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"02139\", \"source-type\": \"API\", \"source-id\": null } ] }, \"lastname\": { \"value\": \"Mott\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"Mott\", \"source-type\": \"API\", \"source-id\": null } ] }, \"company\": { \"value\": \"HubSpot\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"HubSpot\", \"source-type\": \"API\", \"source-id\": null } ] }, \"phone\": { \"value\": \"555-122-2323\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"555-122-2323\", \"source-type\": \"API\", \"source-id\": null } ] }, \"state\": { \"value\": \"MA\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"MA\", \"source-type\": \"API\", \"source-id\": null } ] }, \"address\": { \"value\": \"25FirstStreet\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"25FirstStreet\", \"source-type\": \"API\", \"source-id\": null } ] }, \"email\": { \"value\": \"fumanchu@hubspot.com\", \"versions\": [ { \"timestamp\": 1331075050646, \"selected\": false, \"source-label\": null, \"value\": \"fumanchu@hubspot.com\", \"source-type\": \"API\", \"source-id\": null } ] } }, \"form-submissions\": [ ], \"vid\": 61574 }"Scope requirements
Scope requirements
Parámetros de ruta
The VID of the specific contact you want to update.
Cuerpo
List of contact properties to update.
Show child attributes
Show child attributes
Respuesta
Successful response - This endpoint is used to update an existing contact in HubSpot
The response is of type object.