Get a provider record journey
curl --request GET \
--url https://api.sapt.ai/projects/{projectId}/object-records:journey \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sapt.ai/projects/{projectId}/object-records:journey"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sapt.ai/projects/{projectId}/object-records:journey', 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.sapt.ai/projects/{projectId}/object-records:journey",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sapt.ai/projects/{projectId}/object-records:journey"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sapt.ai/projects/{projectId}/object-records:journey")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sapt.ai/projects/{projectId}/object-records:journey")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"record": {
"id": "<string>",
"typeSlug": "<string>",
"displayName": "<string>",
"externalId": "<string>",
"data": {},
"personRefId": "<string>",
"companyRefId": "<string>",
"amountCents": "<string>",
"currency": "<string>",
"status": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"providerExternalId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>"
},
"journey": {
"items": [
{
"id": "<string>",
"source": "ledger",
"kind": "web",
"type": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"title": "<string>",
"detail": {},
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "sent",
"channel": "<string>",
"direction": "inbound",
"recordId": "<string>",
"workflowId": "<string>",
"provenance": {
"workflowId": "<string>",
"runId": "<string>",
"stepIndex": 123,
"totalSteps": 123,
"campaignId": "<string>"
},
"cancel": {
"kind": "workflow_run_v2",
"id": "<string>"
}
}
],
"nextCursor": "<string>",
"header": {
"firstTouch": {
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_campaign": "<string>",
"utm_term": "<string>",
"utm_content": "<string>",
"gclid": "<string>",
"fbclid": "<string>",
"msclkid": "<string>",
"ttclid": "<string>",
"wbraid": "<string>",
"gbraid": "<string>",
"li_fat_id": "<string>",
"twclid": "<string>",
"epik": "<string>",
"dclid": "<string>",
"sapt_cid": "<string>",
"referrer": "<string>",
"landingPath": "<string>",
"userAgent": "<string>",
"ip": "<string>",
"fbc": "<string>",
"fbp": "<string>"
},
"lastTouch": {
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_campaign": "<string>",
"utm_term": "<string>",
"utm_content": "<string>",
"gclid": "<string>",
"fbclid": "<string>",
"msclkid": "<string>",
"ttclid": "<string>",
"wbraid": "<string>",
"gbraid": "<string>",
"li_fat_id": "<string>",
"twclid": "<string>",
"epik": "<string>",
"dclid": "<string>",
"sapt_cid": "<string>",
"referrer": "<string>",
"landingPath": "<string>",
"userAgent": "<string>",
"ip": "<string>",
"fbc": "<string>",
"fbp": "<string>"
},
"firstSeenAt": "2023-11-07T05:31:56Z",
"lastSeenAt": "2023-11-07T05:31:56Z",
"webSessions": 123,
"pageviews": 123,
"revenueCents": 123,
"orderCount": 123,
"totalTouches": 123,
"deviceCount": 123,
"identities": {
"email": "<string>",
"phone": "<string>",
"socials": [
"<string>"
]
}
}
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}CRM
Get a provider record journey
Resolve a typed CRM record by providerExternalId and return its paginated cross-channel journey with first-touch and last-touch attribution. For a cloned Close lead, use typeSlug=person and providerExternalId=close:lead:<lead_id>. Authenticate with Authorization: ApiKey <key> using a project service-account key scoped to crm_objects:read.
GET
/
projects
/
{projectId}
/
object-records:journey
Get a provider record journey
curl --request GET \
--url https://api.sapt.ai/projects/{projectId}/object-records:journey \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sapt.ai/projects/{projectId}/object-records:journey"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sapt.ai/projects/{projectId}/object-records:journey', 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.sapt.ai/projects/{projectId}/object-records:journey",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sapt.ai/projects/{projectId}/object-records:journey"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sapt.ai/projects/{projectId}/object-records:journey")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sapt.ai/projects/{projectId}/object-records:journey")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"record": {
"id": "<string>",
"typeSlug": "<string>",
"displayName": "<string>",
"externalId": "<string>",
"data": {},
"personRefId": "<string>",
"companyRefId": "<string>",
"amountCents": "<string>",
"currency": "<string>",
"status": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"providerExternalId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>"
},
"journey": {
"items": [
{
"id": "<string>",
"source": "ledger",
"kind": "web",
"type": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"title": "<string>",
"detail": {},
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "sent",
"channel": "<string>",
"direction": "inbound",
"recordId": "<string>",
"workflowId": "<string>",
"provenance": {
"workflowId": "<string>",
"runId": "<string>",
"stepIndex": 123,
"totalSteps": 123,
"campaignId": "<string>"
},
"cancel": {
"kind": "workflow_run_v2",
"id": "<string>"
}
}
],
"nextCursor": "<string>",
"header": {
"firstTouch": {
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_campaign": "<string>",
"utm_term": "<string>",
"utm_content": "<string>",
"gclid": "<string>",
"fbclid": "<string>",
"msclkid": "<string>",
"ttclid": "<string>",
"wbraid": "<string>",
"gbraid": "<string>",
"li_fat_id": "<string>",
"twclid": "<string>",
"epik": "<string>",
"dclid": "<string>",
"sapt_cid": "<string>",
"referrer": "<string>",
"landingPath": "<string>",
"userAgent": "<string>",
"ip": "<string>",
"fbc": "<string>",
"fbp": "<string>"
},
"lastTouch": {
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_campaign": "<string>",
"utm_term": "<string>",
"utm_content": "<string>",
"gclid": "<string>",
"fbclid": "<string>",
"msclkid": "<string>",
"ttclid": "<string>",
"wbraid": "<string>",
"gbraid": "<string>",
"li_fat_id": "<string>",
"twclid": "<string>",
"epik": "<string>",
"dclid": "<string>",
"sapt_cid": "<string>",
"referrer": "<string>",
"landingPath": "<string>",
"userAgent": "<string>",
"ip": "<string>",
"fbc": "<string>",
"fbp": "<string>"
},
"firstSeenAt": "2023-11-07T05:31:56Z",
"lastSeenAt": "2023-11-07T05:31:56Z",
"webSessions": 123,
"pageviews": 123,
"revenueCents": 123,
"orderCount": 123,
"totalTouches": 123,
"deviceCount": 123,
"identities": {
"email": "<string>",
"phone": "<string>",
"socials": [
"<string>"
]
}
}
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Authorizations
JWT token obtained from /api/auth/token endpoint. Token is verified using JWKS and must include a valid user identifier.
Path Parameters
Query Parameters
Required string length:
1 - 100Required string length:
1 - 500Maximum string length:
500Required range:
1 <= x <= 100Comma-separated journey kinds: web, communication, engagement, commerce, lifecycle, advertising, system.