Get Contacts at a Company
curl --request GET \
--url https://api.hubapi.com/companies/v2/companies/{companyId}/contactsimport requests
url = "https://api.hubapi.com/companies/v2/companies/{companyId}/contacts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hubapi.com/companies/v2/companies/{companyId}/contacts', 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/companies/v2/companies/{companyId}/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/companies/v2/companies/{companyId}/contacts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hubapi.com/companies/v2/companies/{companyId}/contacts")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/companies/v2/companies/{companyId}/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"contacts": [
{
"identities": [
{
"vid": 23511,
"identity": [
{
"value": "rswanson@parksrec.com",
"type": "EMAIL",
"timestamp": 1394223876431
},
{
"value": "1a658c50-fc00-47b5-b920-3079c03b6369",
"type": "LEAD_GUID",
"timestamp": 1394223876535
}
],
"linkedvid": []
},
{
"vid": 23510,
"identity": [
{
"value": "rswan@parksandrec.com",
"type": "EMAIL",
"timestamp": 1394222641382
},
{
"value": "d98d7590-ad15-463e-aa9d-f7070199d913",
"type": "LEAD_GUID",
"timestamp": 1394222641428
}
],
"linkedvid": []
}
],
"properties": [
{
"name": "lastname",
"value": "Swanson",
"sourceVid": []
},
{
"name": "firstname",
"value": "Ron",
"sourceVid": []
},
{
"name": "lastmodifieddate",
"value": "1403134876842",
"sourceVid": []
}
],
"listMembership": [],
"vid": 23511,
"portalid": 62515,
"isContact": true,
"vids": [],
"imports": [],
"publicToken": "AO_T-mO3IQOR49eMkLukTZMtEMbVMbpeRbF6gREcu9lpDKiAGqI36EAIqORKFd2LFN11x-YmQs5DsUGlFH8hsXWR9T0Aj85_Tp0e76Pmzze2P6XmxfrgevzJHWSo4ENDRRObVX1N5wFO",
"canonicalVid": 23511,
"mergeAudit": [
{
"canonicalVid": 23511,
"vidToMerge": 23510,
"timestamp": 1403130666794,
"userId": 100291,
"entityId": "",
"numPropertiesMoved": 39,
"email": "rswan@parksandrec.com",
"firstName": "Ron",
"lastName": "Swanson"
}
],
"mergedVids": [
23511,
23510
]
}
],
"vidOffset": 23511,
"hasMore": false
}v2
Get contacts at a company
Returns all of the contacts who have a specified ID in the associatedCompanyId contact property. Returns 20 contacts by default. You can get up to 100 contacts per request using the count parameter. You can use the vidoffset field returned in the results with the vidOffset parameter to get the next set of results.
GET
/
companies
/
v2
/
companies
/
{companyId}
/
contacts
Get Contacts at a Company
curl --request GET \
--url https://api.hubapi.com/companies/v2/companies/{companyId}/contactsimport requests
url = "https://api.hubapi.com/companies/v2/companies/{companyId}/contacts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hubapi.com/companies/v2/companies/{companyId}/contacts', 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/companies/v2/companies/{companyId}/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/companies/v2/companies/{companyId}/contacts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hubapi.com/companies/v2/companies/{companyId}/contacts")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/companies/v2/companies/{companyId}/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"contacts": [
{
"identities": [
{
"vid": 23511,
"identity": [
{
"value": "rswanson@parksrec.com",
"type": "EMAIL",
"timestamp": 1394223876431
},
{
"value": "1a658c50-fc00-47b5-b920-3079c03b6369",
"type": "LEAD_GUID",
"timestamp": 1394223876535
}
],
"linkedvid": []
},
{
"vid": 23510,
"identity": [
{
"value": "rswan@parksandrec.com",
"type": "EMAIL",
"timestamp": 1394222641382
},
{
"value": "d98d7590-ad15-463e-aa9d-f7070199d913",
"type": "LEAD_GUID",
"timestamp": 1394222641428
}
],
"linkedvid": []
}
],
"properties": [
{
"name": "lastname",
"value": "Swanson",
"sourceVid": []
},
{
"name": "firstname",
"value": "Ron",
"sourceVid": []
},
{
"name": "lastmodifieddate",
"value": "1403134876842",
"sourceVid": []
}
],
"listMembership": [],
"vid": 23511,
"portalid": 62515,
"isContact": true,
"vids": [],
"imports": [],
"publicToken": "AO_T-mO3IQOR49eMkLukTZMtEMbVMbpeRbF6gREcu9lpDKiAGqI36EAIqORKFd2LFN11x-YmQs5DsUGlFH8hsXWR9T0Aj85_Tp0e76Pmzze2P6XmxfrgevzJHWSo4ENDRRObVX1N5wFO",
"canonicalVid": 23511,
"mergeAudit": [
{
"canonicalVid": 23511,
"vidToMerge": 23510,
"timestamp": 1403130666794,
"userId": 100291,
"entityId": "",
"numPropertiesMoved": 39,
"email": "rswan@parksandrec.com",
"firstName": "Ron",
"lastName": "Swanson"
}
],
"mergedVids": [
23511,
23510
]
}
],
"vidOffset": 23511,
"hasMore": false
}Scope requirements
Scope requirements
クエリパラメータ
This is used to get the next page of results. Each request will return an offset in the response, and you'd use that offset in the URL of your next request to get the next page of results.
Specifies the number of companies to be returned.
Only return companies modified or created after timestamp x. x must be a UNIX formatted timestamp in milliseconds.
レスポンス
200 - application/json
Successful response
The response is of type object.
最終更新日 2026年4月10日
⌘I