Prynt Replay docs

Replay in your own admin

Your support or success team sees what a customer did without leaving your back office: their sessions by company or by user, played in place.

How it works

  1. The browser tags each session with identify(userId, { accountId }) (how).
  2. Your backend lists sessions with your secret key: GET /v1/replay/sessions?accountId=….
  3. When someone clicks a session, your backend asks for a player link (POST /v1/replay/sessions/<id>/embed) and your page shows it in an <iframe>.

The secret key (sk_live_…) stays on your server. Create it in the console under API Keys.

1. List a customer's sessions

curl "https://api.pryntid.com/v1/replay/sessions?website=example.com&accountId=company_17&days=30" \
  -H "Authorization: Bearer sk_live_YOUR_SECRET_KEY"
{
  "recordings": [
    { "id": 4821, "startedAt": "2026-11-11T14:02:10Z", "durationMs": 312000, "pages": 7,
      "entryPath": "/dashboard", "userId": "user_42", "accountId": "company_17",
      "device": "desktop", "browser": "Chrome", "errors": 1, "rageClicks": 3, "frustrationScore": 41 }
  ],
  "total": 1, "page": 1, "pageSize": 25
}

Filters: accountId, userId, days (up to your plan's retention), page, hasErrors=1, hasRage=1, minFrustration, path, device, country, sort (newest, oldest, longest, errors, frustration). 25 per page.

2. Get a player link

curl -X POST https://api.pryntid.com/v1/replay/sessions/4821/embed \
  -H "Authorization: Bearer sk_live_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"minutes": 15, "atMs": 0}'

# 201 {"token": "…", "url": "https://app.pryntid.com/embed/replay/…?t=0", "expiresAt": "…"}
  • minutes: 1 to 60, default 15. Ask for it right before showing the player.
  • atMs: where playback starts.
  • The token is returned once and stored only as a hash. It opens that one recording, read-only.
  • The player shows the recording, its pages and markers, but not who the visitor was: you already have that in your admin.

3. Show it

<!-- Your admin page: ask YOUR backend for the url right before showing it -->
<iframe src="{{ player.url }}" title="Session replay"
        style="width:100%;height:720px;border:0;border-radius:12px"
        referrerpolicy="no-referrer" sandbox="allow-scripts allow-same-origin"></iframe>

If your admin sends a Content-Security-Policy, allow the player:

Content-Security-Policy: frame-src 'self' https://app.pryntid.com

Backend examples

Node / Express

// Node / Express — your admin's backend
const PRYNT = 'https://api.pryntid.com';
const auth = { Authorization: `Bearer ${process.env.PRYNT_SECRET_KEY}`, 'Content-Type': 'application/json' };

app.get('/admin/companies/:id/sessions', requireAdmin, async (req, res) => {
  const q = new URLSearchParams({ website: 'example.com', accountId: req.params.id, days: '30' });
  const r = await fetch(`${PRYNT}/v1/replay/sessions?${q}`, { headers: auth });
  res.status(r.status).json(await r.json());
});

app.post('/admin/sessions/:id/player', requireAdmin, async (req, res) => {
  const r = await fetch(`${PRYNT}/v1/replay/sessions/${Number(req.params.id)}/embed`, {
    method: 'POST', headers: auth, body: JSON.stringify({ minutes: 15 }),
  });
  res.status(r.status).json(await r.json());   // { url, expiresAt }
});

Python / Flask

# Python / Flask — your admin's backend
import os, requests
PRYNT = 'https://api.pryntid.com'
AUTH = {'Authorization': f"Bearer {os.environ['PRYNT_SECRET_KEY']}"}

@app.get('/admin/companies/<company_id>/sessions')
@admin_required
def company_sessions(company_id):
    r = requests.get(f'{PRYNT}/v1/replay/sessions', headers=AUTH, timeout=8,
                     params={'website': 'example.com', 'accountId': company_id, 'days': 30})
    return r.json(), r.status_code

@app.post('/admin/sessions/<int:rec_id>/player')
@admin_required
def session_player(rec_id):
    r = requests.post(f'{PRYNT}/v1/replay/sessions/{rec_id}/embed', headers=AUTH, json={'minutes': 15}, timeout=8)
    return r.json(), r.status_code

PHP

<?php // PHP — your admin's backend
function prynt(string $method, string $path, array $body = null): array {
    $ch = curl_init('https://api.pryntid.com' . $path);
    curl_setopt_array($ch, [
        CURLOPT_CUSTOMREQUEST => $method, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 8,
        CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('PRYNT_SECRET_KEY'), 'Content-Type: application/json'],
        CURLOPT_POSTFIELDS => $body === null ? null : json_encode($body),
    ]);
    $out = json_decode(curl_exec($ch), true);
    curl_close($ch);
    return $out ?? [];
}

$sessions = prynt('GET', '/v1/replay/sessions?' . http_build_query(['website' => 'example.com', 'accountId' => $companyId]));
$player   = prynt('POST', "/v1/replay/sessions/{$recordingId}/embed", ['minutes' => 15]);   // ['url' => …]

Good to know

  • Only /embed/replay/… pages can be framed; the rest of the console can't.
  • Each link creation is in your audit log (replay.embed.create).
  • Recordings past your plan's retention return 404.
  • Test keys see test-environment sessions only.

Next: API reference

Updated 2026-11-11 · API reference