Create a new contact
curl --request POST \
--url https://api.hubapi.com/contacts/v1/contact \
--header 'Content-Type: application/json' \
--data '
{
"properties": [
{
"property": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.hubapi.com/contacts/v1/contact"
payload = { "properties": [
{
"property": "<string>",
"value": "<string>"
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({properties: [{property: '<string>', value: '<string>'}]})
};
fetch('https://api.hubapi.com/contacts/v1/contact', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hubapi.com/contacts/v1/contact",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'properties' => [
[
'property' => '<string>',
'value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/contacts/v1/contact"
payload := strings.NewReader("{\n \"properties\": [\n {\n \"property\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hubapi.com/contacts/v1/contact")
.header("Content-Type", "application/json")
.body("{\n \"properties\": [\n {\n \"property\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/contacts/v1/contact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"properties\": [\n {\n \"property\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body"{ \"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 }"v1
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.
POST
/
contacts
/
v1
/
contact
Create a new contact
curl --request POST \
--url https://api.hubapi.com/contacts/v1/contact \
--header 'Content-Type: application/json' \
--data '
{
"properties": [
{
"property": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.hubapi.com/contacts/v1/contact"
payload = { "properties": [
{
"property": "<string>",
"value": "<string>"
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({properties: [{property: '<string>', value: '<string>'}]})
};
fetch('https://api.hubapi.com/contacts/v1/contact', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hubapi.com/contacts/v1/contact",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'properties' => [
[
'property' => '<string>',
'value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/contacts/v1/contact"
payload := strings.NewReader("{\n \"properties\": [\n {\n \"property\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hubapi.com/contacts/v1/contact")
.header("Content-Type", "application/json")
.body("{\n \"properties\": [\n {\n \"property\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/contacts/v1/contact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"properties\": [\n {\n \"property\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body"{ \"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
Body
application/json
Response
200 - application/json
Successful response - This endpoint is used to update an existing contact in HubSpot
The response is of type object.
Last modified on March 30, 2026
Was this page helpful?