メインコンテンツへスキップ
GET
/
contacts
/
search
/
v1
/
external
/
lifecyclestages
Get Lifecycle Stage metrics for Contacts
curl --request GET \
  --url https://api.hubapi.com/contacts/search/v1/external/lifecyclestages
import requests

url = "https://api.hubapi.com/contacts/search/v1/external/lifecyclestages"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.hubapi.com/contacts/search/v1/external/lifecyclestages', 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/search/v1/external/lifecyclestages",
  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/contacts/search/v1/external/lifecyclestages"

	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/contacts/search/v1/external/lifecyclestages")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.hubapi.com/contacts/search/v1/external/lifecyclestages")

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
"[ { \"lifecycleStage\": \"hs_lifecyclestage_lead_date\", \"count\": 34657 }, { \"lifecycleStage\": \"hs_lifecyclestage_opportunity_date\", \"count\": 1 }, { \"lifecycleStage\": \"hs_lifecyclestage_marketingqualifiedlead_date\", \"count\": 3 }, { \"lifecycleStage\": \"hs_lifecyclestage_salesqualifiedlead_date\", \"count\": 0 }, { \"lifecycleStage\": \"hs_lifecyclestage_evangelist_date\", \"count\": 0 }, { \"lifecycleStage\": \"hs_lifecyclestage_customer_date\", \"count\": 242 }, { \"lifecycleStage\": \"hs_lifecyclestage_subscriber_date\", \"count\": 39 }, { \"lifecycleStage\": \"hs_lifecyclestage_other_date\", \"count\": 0 } ] Example with aggregation using hs_analytics_source:  [ { \"lifecycleStage\": \"hs_lifecyclestage_lead_date\", \"count\": 34657, \"aggregation\": { \"count\": 34657, \"aggregations\": { \"hs_analytics_source\": [ { \"key\": \"DIRECT_TRAFFIC\", \"count\": 30794 }, { \"key\": \"OFFLINE\", \"count\": 3822 }, { \"key\": \"PAID_SOCIAL\", \"count\": 18 } ] } } }, { \"lifecycleStage\": \"hs_lifecyclestage_opportunity_date\", \"count\": 1, \"aggregation\": { \"count\": 1, \"aggregations\": { \"hs_analytics_source\": [ { \"key\": \"OFFLINE\", \"count\": 1 } ] } } }, { \"lifecycleStage\": \"hs_lifecyclestage_marketingqualifiedlead_date\", \"count\": 3, \"aggregation\": { \"count\": 3, \"aggregations\": { \"hs_analytics_source\": [ { \"key\": \"DIRECT_TRAFFIC\", \"count\": 2 }, { \"key\": \"OFFLINE\", \"count\": 1 } ] } } }, { \"lifecycleStage\": \"hs_lifecyclestage_salesqualifiedlead_date\", \"count\": 0, \"aggregation\": { \"count\": 0, \"aggregations\": { \"hs_analytics_source\": [] } } }, { \"lifecycleStage\": \"hs_lifecyclestage_evangelist_date\", \"count\": 0, \"aggregation\": { \"count\": 0, \"aggregations\": { \"hs_analytics_source\": [] } } }, { \"lifecycleStage\": \"hs_lifecyclestage_customer_date\", \"count\": 242, \"aggregation\": { \"count\": 242, \"aggregations\": { \"hs_analytics_source\": [ { \"key\": \"OFFLINE\", \"count\": 169 }, { \"key\": \"DIRECT_TRAFFIC\", \"count\": 73 } ] } } }, { \"lifecycleStage\": \"hs_lifecyclestage_subscriber_date\", \"count\": 39, \"aggregation\": { \"count\": 39, \"aggregations\": { \"hs_analytics_source\": [ { \"key\": \"DIRECT_TRAFFIC\", \"count\": 26 }, { \"key\": \"OFFLINE\", \"count\": 13 } ] } } }, { \"lifecycleStage\": \"hs_lifecyclestage_other_date\", \"count\": 0, \"aggregation\": { \"count\": 0, \"aggregations\": { \"hs_analytics_source\": [] } } } ]"

クエリパラメータ

includeTotalContacts
string

A boolean to determine if the number of total contacts should be included in the response.

includeLastNewContactAt
string

A boolean to determine if the time stamp of the last contact created should be included in the response.

レスポンス

200 - application/json

Successful response - Returns the total number of contacts in the account and the date of the last contact add

The response is of type object.

最終更新日 2026年4月10日