Use this endpoint to retrieve a single interaction by its numeric ID. The response follows the JSON:API specification.
Endpoint
GET https://{region}.engage.app/api/core/v1/interactions/{interactionId}Replace the placeholders:
{region}– the region in the URL you log in through, for exampleeu,euc,usorau.
{interactionId}– the numeric ID of the interaction (theidfield), for example4172453.
This endpoint only accepts the numeric interaction ID. It does not accept a UUID or quick reference. To look up an interaction by UUID, use the all interactions endpoint with the uuid filter:
GET https://{region}.engage.app/api/core/v1/interactions?uuid={interactionUuid}
This returns a list containing the matching interaction. See API: Retrieving All Interactions.
Authentication and headers
Every request needs these two headers:
Authorization: Bearer {your API token}
Accept: application/jsonThe token must belong to a user who has access to the Core API. You can only retrieve interactions that belong to that user's company.
Including related data
Add the include parameter with a comma-separated list to return related data, such as messages, tags or interaction data, alongside the interaction:
GET https://eu.engage.app/api/core/v1/interactions/4172453?include=messages,tags,interactionDataThe includes are the same as on the all interactions endpoint. For the full list, the fields each one returns, and how included data appears in the response, see API: Retrieving All Interactions.
Code examples: retrieving an interaction and matching up includes
Included data is not nested inside the interaction. The interaction's relationships only holds references (type and id), and the full records are in a separate top-level included array. To use the data, you match each reference to its record in included.
Both examples below follow the same steps:
- Request the interaction with the includes you need.
- Build a lookup of every record in
included, keyed bytypeandid.
- For each relationship, swap the references for the full records from the lookup.
A relationship to a single record, such as user or queue, holds one reference. A relationship to many records, such as messages or tags, holds a list. The examples handle both.
Node.js
This example uses the built-in fetch, available in Node.js 18 and later, so nothing needs installing.
const REGION = 'eu';
const API_TOKEN = process.env.TALKATIVE_API_TOKEN;
async function getInteraction(interactionId, includes = []) {
// 1. Request the interaction with the includes we need
const url = new URL(`https://${REGION}.engage.app/api/core/v1/interactions/${interactionId}`);
if (includes.length) url.searchParams.set('include', includes.join(','));
const res = await fetch(url, {
headers: {
Authorization: `Bearer ${API_TOKEN}`,
Accept: 'application/json',
},
});
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const body = await res.json();
// 2. Build a lookup of included records, keyed by "type:id"
const lookup = new Map();
for (const record of body.included ?? []) {
lookup.set(`${record.type}:${record.id}`, { id: record.id, ...record.attributes });
}
const resolve = (ref) => lookup.get(`${ref.type}:${ref.id}`) ?? null;
// 3. Swap each relationship's references for the full records
const interaction = { id: body.data.id, ...body.data.attributes };
for (const [name, rel] of Object.entries(body.data.relationships ?? {})) {
if (!('data' in rel)) continue; // not requested as an include
interaction[name] = Array.isArray(rel.data)
? rel.data.map(resolve) // many records (messages, tags...)
: rel.data ? resolve(rel.data) : null; // one record (user, queue...)
}
return interaction;
}
// Example: print the transcript and tags for an interaction
const interaction = await getInteraction(4172453, ['messages', 'tags', 'queue']);
console.log(`Interaction ${interaction.quick_ref} in queue ${interaction.queue?.label}`);
console.log('Tags:', interaction.tags?.map((t) => t.name).join(', '));
for (const msg of interaction.messages ?? []) {
console.log(`[${msg.created_at}] ${msg.sender_type}: ${msg.message}`);
}Save the file as get-interaction.mjs (the .mjs extension allows await at the top level), set your token and run it:
TALKATIVE_API_TOKEN=your-token node get-interaction.mjsPHP
This example uses PHP's built-in cURL extension, so it needs no extra packages.
<?php
const REGION = 'eu';
function getInteraction(int $interactionId, array $includes = []): array
{
// 1. Request the interaction with the includes we need
$url = 'https://' . REGION . ".engage.app/api/core/v1/interactions/{$interactionId}";
if ($includes) {
$url .= '?include=' . implode(',', $includes);
}
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('TALKATIVE_API_TOKEN'),
'Accept: application/json',
],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status !== 200) {
throw new RuntimeException("Request failed: {$status}");
}
$body = json_decode($response, true);
// 2. Build a lookup of included records, keyed by "type:id"
$lookup = [];
foreach ($body['included'] ?? [] as $record) {
$lookup["{$record['type']}:{$record['id']}"] = ['id' => $record['id']] + $record['attributes'];
}
$resolve = fn (array $ref) => $lookup["{$ref['type']}:{$ref['id']}"] ?? null;
// 3. Swap each relationship's references for the full records
$interaction = ['id' => $body['data']['id']] + $body['data']['attributes'];
foreach ($body['data']['relationships'] ?? [] as $name => $rel) {
if (!array_key_exists('data', $rel)) {
continue; // not requested as an include
}
if ($rel['data'] === null) {
$interaction[$name] = null;
} elseif (array_is_list($rel['data'])) {
$interaction[$name] = array_map($resolve, $rel['data']); // many records
} else {
$interaction[$name] = $resolve($rel['data']); // one record
}
}
return $interaction;
}
// Example: print the transcript and tags for an interaction
$interaction = getInteraction(4172453, ['messages', 'tags', 'queue']);
echo "Interaction {$interaction['quick_ref']} in queue " . ($interaction['queue']['label'] ?? 'unknown') . PHP_EOL;
echo 'Tags: ' . implode(', ', array_column($interaction['tags'] ?? [], 'name')) . PHP_EOL;
foreach ($interaction['messages'] ?? [] as $msg) {
echo "[{$msg['created_at']}] {$msg['sender_type']}: {$msg['message']}" . PHP_EOL;
}This example needs PHP 8.1 or later, for array_is_list. Run it with:
TALKATIVE_API_TOKEN=your-token php get-interaction.phpThe same approach works for the all interactions endpoint. There, data is a list of interactions, so run step 3 for each interaction in the list. All interactions on the page share the same included array.
Example response
{
"data": {
"type": "interaction",
"id": "4172453",
"attributes": {
"uuid": "ccf5f986-e0a7-435b-89ca-fe26b76b9744",
"quick_ref": "748896",
"customer_id": 3287854,
"queue_id": 3053,
"user_id": 3007,
"chat": true,
"voice": false,
"call_me": false,
"video": false,
"channel": "Web",
"email": false,
"qos": { ... },
"handled": true,
"ended": true,
"start_url": "https://www.example.com/contact",
"end_url": "https://www.example.com/contact",
"created_at": "2026-11-08T12:21:08Z",
"updated_at": "2026-11-08T12:35:55Z",
"accepted_at": "2026-11-08T12:21:12Z",
"ended_at": "2026-11-08T12:30:02Z",
"completed_at": "2026-11-08T12:35:55Z",
"finalized_at": "2026-11-08T12:35:55Z",
"cleaned_at": null,
"ended_by": "USER"
},
"links": {
"self": "https://eu.engage.app/api/core/v1/interaction/4172453"
},
"relationships": {
"user": { "links": { ... } },
"queue": { "links": { ... } },
"messages": { "links": { ... } },
...
}
}
}The relationships object lists each related resource. It only contains data for the includes you request. The attributes are described in API: Retrieving All Interactions.
Viewing customer data
The customer include never contains personal data such as a name or email address. It is an internal identifier that Talkative uses to link interactions from the same customer, using a web cookie or a phone number or social media identifier.
Customer details are only available if they were captured into interaction data, for example through a pre-chat form, a chatbot, or the JavaScript API. Use include=interactionData and read the values by their name.
Errors
Status | Meaning |
401 | The token is missing, invalid or expired. |
403 | The token's user doesn't have access to the Core API. |
404 | No interaction with this ID exists in your company, or a UUID was used instead of the numeric ID. |
429 | Rate limit exceeded (60 requests per minute). |