curl 'https://api.contactship.ai/v1/contacts/CONTACT_ID/call-history' \
-H 'x-api-key: YOUR_API_KEY'
const response = await fetch(
`https://api.contactship.ai/v1/contacts/${encodeURIComponent(contactId)}/call-history`,
{ headers: { 'x-api-key': apiKey } },
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const { data } = await response.json();
const calls = data.call_history?.calls ?? [];
console.log(calls);
{
"statusCode": 123,
"data.contact": {},
"data.call_history": {},
"data.call_history.call_attempts": 123,
"data.call_history.last_call": {},
"data.call_history.calls": [
{}
]
}Contactos
Get Contact Call History
Retrieve a contact and its call-history summary using the contact ID.
GET
/
v1
/
contacts
/
{contactId}
/
call-history
curl 'https://api.contactship.ai/v1/contacts/CONTACT_ID/call-history' \
-H 'x-api-key: YOUR_API_KEY'
const response = await fetch(
`https://api.contactship.ai/v1/contacts/${encodeURIComponent(contactId)}/call-history`,
{ headers: { 'x-api-key': apiKey } },
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const { data } = await response.json();
const calls = data.call_history?.calls ?? [];
console.log(calls);
{
"statusCode": 123,
"data.contact": {},
"data.call_history": {},
"data.call_history.call_attempts": 123,
"data.call_history.last_call": {},
"data.call_history.calls": [
{}
]
}Retrieve the contact and its call history within the organization associated with your API key. To start from a phone number, resolve the contact ID first.
This route does not expose date, direction, or status query filters. Use List calls when you need those filters.
Check the API key and selected organization if the contact cannot be found. A successful response confirms the lookup; it does not imply that every call has a recording or completed analysis.
string
requerido
Your organization API key.
string
requerido
The contact UUID.
Response
The response uses the standardstatusCode and data envelope.
number
HTTP status of the successful request.
object
The contact associated with this history.
object
The history summary, containing
call_attempts, last_call, and calls.number
Number of recorded call attempts.
object
Most recent call when history is available.
object[]
Recorded calls. Fields include
direction, status, duration (string), from, call_record, start_at, finished_at, price, price_unit, call_analysis, type, created_at, and chat_history. Recording, analysis, and timing values depend on the call; handle unavailable values before rendering them.curl 'https://api.contactship.ai/v1/contacts/CONTACT_ID/call-history' \
-H 'x-api-key: YOUR_API_KEY'
const response = await fetch(
`https://api.contactship.ai/v1/contacts/${encodeURIComponent(contactId)}/call-history`,
{ headers: { 'x-api-key': apiKey } },
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const { data } = await response.json();
const calls = data.call_history?.calls ?? [];
console.log(calls);
