Skip to Content
Insurge AIDocs
Developer guides

API reference

Authenticate server requests and read leads, meetings, transcripts, and CRM sync results.

Developer guide
Markdown

Use the Insurge API to read leads, meeting briefs, transcripts, and CRM sync results from your own server. Use webhooks if you want Insurge to send events to you instead. Connecting HubSpot or Salesforce in the dashboard does not need this API.

Create and protect an API key

Sign in to the Insurge dashboard as a workspace admin, then open Settings → Developers and select Create key. Name the key, choose its scopes, and choose an expiry: 90 days, 1 year (the default), or Never. Copy the secret: it is shown once and starts with insurge_live_.

Store the key in your server's secret manager, for example as INSURGE_API_KEY. Never put it in an embed tag, browser JavaScript, a mobile app, or a public repository. If a key leaks, revoke it in the dashboard and create a new one.

Send the key on every request in either header:

  • Authorization: Bearer <key>
  • X-Api-Key: <key>

If both are sent, the Authorization header is used. The key decides the workspace; an X-Tenant-Id header does not change it, and a dashboard sign-in cookie does not authenticate these endpoints.

This request uses the X-Api-Key header to list meetings:

curl --fail-with-body \
  -H "X-Api-Key: $INSURGE_API_KEY" \
  'https://api.insurgeai.com/api/v1/meetings'
{"meetings": [], "count": 0}

Base URL and first request

The base URL is https://api.insurgeai.com/api/v1. This request lists up to 100 meetings in the key's workspace:

curl --fail-with-body \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  'https://api.insurgeai.com/api/v1/meetings?limit=100&offset=0'

The response has a meetings array and count, the number of items in this response (not the workspace total). An empty list is a valid response:

{"meetings": [], "count": 0}

Scopes

Give each key only the access it needs. A key created without choosing scopes gets the three read scopes marked as default. Every other scope must be chosen by name: transcripts are what visitors said word for word, recordings hold their screen and voice, CRM writes push data into your CRM, and continue links open a visitor's demo as that visitor.

ScopeAllowsDefault
leads:readList and fetch leadsYes
meetings:readList meetings and fetch briefs, without transcriptsYes
integrations:readRead CRM connection status and the sync logYes
transcripts:readFetch a meeting's full transcriptNo
integrations:writeRun a CRM sync for one meetingNo
recordings:readList, describe, and download meeting recordingsNo
recordings:deleteDelete Insurge's copy of a recordingNo
sessions:writeCreate and end continue links for visitors who left a demo part wayNo

Endpoints

Paths are relative to https://api.insurgeai.com/api/v1. Replace your_meeting_id and your_lead_id with IDs returned by the API.

MethodPathScopeReturns
GET/leadsleads:readleads and count
GET/leads/{lead_id}leads:readlead and that lead's meetings
GET/meetingsmeetings:readmeetings and count
GET/meetings/{meeting_id}meetings:readmeeting, recording, lead, qualification, summary, follow_up_requested, follow_up, progress, resumed_from_meeting_id, resumable
GET/meetings/{meeting_id}/transcripttranscripts:readmeeting_id and transcript
GET/recordingsrecordings:readrecordings, count, and next_cursor
GET/meetings/{meeting_id}/recordingrecordings:readmeeting_id and recording
GET/meetings/{meeting_id}/recording.mp4recordings:readThe recording file (MP4)
DELETE/meetings/{meeting_id}/recordingrecordings:deletemeeting_id and the deleted recording
POST/resume-linkssessions:writeA continue link: url, token, expires_at, and the meeting it carries on
DELETE/resume-linkssessions:writerevoked, the number of links ended
GET/integrations/statusintegrations:readHubSpot and Salesforce connection status
GET/integrations/sync-logintegrations:readlog and count
POST/integrations/sync/{meeting_id}integrations:writeCRM sync results for the meeting

Meetings opened from a test link or a Preview are not part of the API: they are never listed, and every meeting endpoint returns 404 for them.

List leads

GET /leads returns leads newest-seen first. Query parameters:

ParameterDefaultMeaning
limit100Number of leads, from 1 to 500
offset0Number of leads to skip
qnoneSearch name, email, company, and form answers
statusnoneLead stage, such as qualified
scorenonehot, warm, or cold
include_anonymousfalseAlso list anonymous visitors, whose emails end in @anonymous.invalid

An unknown status or score value returns an empty list rather than an error. This requests the first 50 qualified leads:

curl --fail-with-body \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  'https://api.insurgeai.com/api/v1/leads?status=qualified&limit=50'
{"leads": [], "count": 0}

Fetch a lead

GET /leads/{lead_id} returns the lead and its 100 most recent meetings, newest first, in the same format as GET /meetings. To page through more, use GET /meetings?lead_id=. A missing lead, or one in another workspace, returns 404.

curl --fail-with-body \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  'https://api.insurgeai.com/api/v1/leads/your_lead_id'

This sample is shortened; real records have more fields:

{
  "lead": {
    "id": "your_lead_id",
    "email": "jane@example.com",
    "name": "Jane Example",
    "company": "Example Co",
    "role": "Operations lead",
    "first_seen_at": 1795427405.8,
    "last_seen_at": 1795427405.8,
    "meeting_count": 1,
    "lead_score": "hot",
    "status": "engaged",
    "custom_fields": {"team_size": "11-50"},
    "language": null
  },
  "meetings": [
    {
      "id": "your_meeting_id",
      "lead_id": "your_lead_id",
      "agent_id": "product-tour",
      "status": "completed",
      "started_at": 1795427412.3,
      "ended_at": 1795427987.6,
      "duration_s": 575.3,
      "requested_follow_up": 1
    }
  ]
}

List meetings and paginate

GET /meetings returns meetings newest-started first. Meetings of anonymous visitors are included. Query parameters:

ParameterDefaultMeaning
limit100Number of meetings, from 1 to 500
offset0Number of meetings to skip
lead_idnoneOnly this lead's meetings
agent_idnoneOnly this agent's meetings
statusnoneMeeting status, such as completed
scorenoneThe lead's score: hot, warm, or cold
sincenoneMeetings that started at or after this time, in Unix seconds
untilnoneMeetings that started before this time, in Unix seconds

To page, increase offset by limit for each request and stop when a response has fewer items than limit. New meetings can arrive while you page, so store records by id and ignore repeats. This requests the second page of 50:

curl --fail-with-body \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  'https://api.insurgeai.com/api/v1/meetings?limit=50&offset=50'
{"meetings": [], "count": 0}

Fetch a brief or transcript

GET /meetings/{meeting_id} returns meeting, recording, lead, qualification, summary, follow_up_requested, follow_up, progress, resumed_from_meeting_id, and resumable: the same fields, with the same meaning, as a meeting webhook's data before its transcript. It does not include the transcript, timeline events, token usage, or cost. Check summary.status before reading the brief; it can be pending, ready, failed, or skipped.

  • recording describes the meeting's recording; its status is none when the meeting was not recorded (see Download and delete recordings).
  • progress is how far the visitor got through the agent's brief, merged across every visit when they came back through a continue link. It has sections_done (the sections they moved past, by title), sections_total, and next_section (where a continue link would carry on; null when everything is done). For a brief without a clear numbered outline, sections_total and next_section are null and sections_done holds the agent's own short names for what it covered. progress is null when nothing was recorded. meeting.progress is the same, for this visit alone.
  • resumed_from_meeting_id is the meeting this one carried on from, or null.
  • resumable is true when you can create a continue link for this meeting: it is the visitor's newest visit, they left before the end, they gave their email, and the agent is a Tour guide, Help desk, or Training agent that is switched on.
curl --fail-with-body \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  'https://api.insurgeai.com/api/v1/meetings/your_meeting_id'

A shortened response for a meeting whose brief is not written yet:

{
  "meeting": {"id": "your_meeting_id", "lead_id": "your_lead_id", "agent_id": "product-tour", "status": "completed"},
  "lead": {"id": "your_lead_id", "email": "jane@example.com", "name": "Jane Example"},
  "qualification": null,
  "summary": null,
  "follow_up_requested": null,
  "follow_up": null,
  "recording": {"status": "none", "content_type": null, "size_bytes": null, "sha256": null, "completed_at": null, "expires_at": null, "deleted_at": null, "deleted_by": null, "download_path": null},
  "progress": {"sections_done": ["Getting started"], "sections_total": 4, "next_section": "Reports"},
  "resumed_from_meeting_id": null,
  "resumable": true
}

The webhooks guide shows a complete brief and explains follow_up and summary.answers.

Fetch the whole conversation with a key that has transcripts:read:

curl --fail-with-body \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  'https://api.insurgeai.com/api/v1/meetings/your_meeting_id/transcript'
{
  "meeting_id": "your_meeting_id",
  "transcript": [
    {"at": 0.0, "speaker": "agent", "text": "Welcome to the demo."},
    {"at": 6.4, "speaker": "visitor", "text": "Show me billing."}
  ]
}

at is seconds from the start of the conversation, to 0.1 s. A line also has spoken when the voice said something different from the written text, such as a translation. System notes and tool results are left out. Unlike a webhook, this endpoint never shortens long transcripts.

Check CRM connections and sync results

GET /integrations/status reports whether HubSpot and Salesforce are configured and connected, without any OAuth secrets.

curl --fail-with-body \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  'https://api.insurgeai.com/api/v1/integrations/status'

A workspace with neither CRM connected; configured can be true when Insurge has set up the CRM app:

{
  "hubspot": {"configured": true, "connected": false},
  "salesforce": {
    "configured": false,
    "app": {"registered": false, "source": null},
    "connected": false
  }
}

GET /integrations/sync-log lists recent CRM sync results; limit defaults to 50, up to 200.

curl --fail-with-body \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  'https://api.insurgeai.com/api/v1/integrations/sync-log?limit=50'
{"log": [], "count": 0}

POST /integrations/sync/{meeting_id} runs the CRM sync for one meeting again. Use it only when you mean to: it can write to a connected CRM.

curl --fail-with-body -X POST \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  'https://api.insurgeai.com/api/v1/integrations/sync/your_meeting_id'

For a meeting in a workspace with no CRM connected, the response is:

{"synced": [], "results": {}, "errors": []}

Check results and errors even when the status is 200: one CRM can fail while the request succeeds.

Download and delete recordings

Use these endpoints to keep meeting recordings in your own storage: download each recording, check it, then delete Insurge's copy. A recording is an MP4 of the screen the visitor saw, with the agent's voice and the visitor's microphone. Insurge deletes its copy anyway at the end of its retention period (expires_at), so download before then. The recording.ready webhook tells you when a recording can be downloaded, so you do not need to poll.

GET /recordings lists recorded meetings, oldest first, with a key that has recordings:read:

curl --fail-with-body \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  'https://api.insurgeai.com/api/v1/recordings?limit=100'
{
  "recordings": [
    {
      "meeting_id": "your_meeting_id",
      "lead_id": "your_lead_id",
      "agent_id": "product-tour",
      "channel": "web",
      "started_at": 1764750000.0,
      "ended_at": 1764750260.4,
      "duration_s": 260.4,
      "recording": {
        "status": "completed",
        "content_type": "video/mp4",
        "size_bytes": 48211934,
        "sha256": "9f2c4a7e0b1d3f5a6c8e9b0d2f4a6c8e0b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a",
        "completed_at": 1764750331.0,
        "expires_at": 1767342331.0,
        "deleted_at": null,
        "deleted_by": null,
        "download_path": "/api/v1/meetings/your_meeting_id/recording.mp4"
      }
    }
  ],
  "count": 1,
  "next_cursor": null
}
ParameterDefaultMeaning
limit100Number of recordings, from 1 to 500
statuscompletedcompleted, processing, failed, expired, deleted, or all; separate several with commas
sincenoneMeetings that started at or after this time, in Unix seconds
untilnoneMeetings that started before this time, in Unix seconds
cursornoneThe next_cursor from the previous page

To page, pass next_cursor back as cursor; it is null on the last page. Pages stay correct while you delete recordings you have already copied. A cursor this API did not return gives 400.

recording.status is processing, completed, failed, expired, or deleted (none for a meeting that was not recorded). Only a completed recording has a download_path. expires_at is when Insurge deletes its copy; it is null when no retention period applies or once the recording is gone.

GET /meetings/{meeting_id}/recording returns meeting_id and that meeting's recording:

curl --fail-with-body \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  'https://api.insurgeai.com/api/v1/meetings/your_meeting_id/recording'
{
  "meeting_id": "your_meeting_id",
  "recording": {
    "status": "completed",
    "content_type": "video/mp4",
    "size_bytes": 48211934,
    "sha256": "9f2c4a7e0b1d3f5a6c8e9b0d2f4a6c8e0b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a",
    "completed_at": 1764750331.0,
    "expires_at": 1767342331.0,
    "deleted_at": null,
    "deleted_by": null,
    "download_path": "/api/v1/meetings/your_meeting_id/recording.mp4"
  }
}

Download the file:

curl --fail-with-body \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  -o recording.mp4 \
  'https://api.insurgeai.com/api/v1/meetings/your_meeting_id/recording.mp4'
  • The response is the whole file (200), or exactly the Range you ask for (206). Add -C - to curl to continue a broken transfer.
  • X-Content-SHA256 and ETag carry the file's SHA-256, which is also recording.sha256. Recordings made before 30 Nov 2026 have no stored digest (sha256 is null).
  • A workspace can have at most 4 downloads open at once; a fifth gets 429 with Retry-After. A client that takes more than two minutes to accept a 4 MB chunk is disconnected; continue with a Range request.

Once you have checked your copy, delete Insurge's with a key that has recordings:delete. Pass the SHA-256 of your file (for example from sha256sum recording.mp4) as sha256, so nothing is deleted unless it matches:

curl --fail-with-body -X DELETE \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  'https://api.insurgeai.com/api/v1/meetings/your_meeting_id/recording?sha256=your_file_sha256'
{
  "meeting_id": "your_meeting_id",
  "recording": {
    "status": "deleted",
    "content_type": null,
    "size_bytes": 48211934,
    "sha256": "9f2c4a7e0b1d3f5a6c8e9b0d2f4a6c8e0b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a",
    "completed_at": 1764750331.0,
    "expires_at": null,
    "deleted_at": 1764752000.0,
    "deleted_by": {"kind": "api_key", "id": "your_key_id"},
    "download_path": null
  }
}

The recording now has status deleted, no download_path, and deleted_by naming your key. The meeting, its transcript, and its brief stay. Deleting cannot be undone.

  • 412: the sha256 does not match Insurge's copy, or the recording has no stored digest. Nothing was deleted.
  • 409: the recording is still being processed. Wait for recording.ready.
  • 404: the meeting has no recording, or is not in your workspace.
  • 503: storage could not delete it. Nothing changed; try again.
  • Deleting again, or deleting a recording that already expired, returns 200 with the same result and changes nothing.

deleted_by.kind is api_key (with the key's ID), user (a workspace admin deleted it from the meeting's page in the dashboard, with the person's ID), insurge (Insurge support, no ID), or retention (it expired; status is then expired).

Continue a visitor's demo

A visitor who left a Tour guide, Help desk, or Training session part way can carry on where they left off. Your server creates a private continue link with a key that has sessions:write, then puts it where the visitor will find it, such as your own page or an email:

curl --fail-with-body -X POST \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"email":"jane@example.com","agent_id":"product-tour"}' \
  'https://api.insurgeai.com/api/v1/resume-links'
{
  "url": "https://demo.insurgeai.com/s/your_share_code#resume=your_resume_token",
  "token": "your_resume_token",
  "expires_at": "2026-12-10T10:00:00+00:00",
  "meeting_id": "your_meeting_id",
  "lead_id": "your_lead_id",
  "agent_id": "product-tour",
  "progress": {"sections_done": ["Getting started"], "sections_total": 4, "next_section": "Reports"}
}
  • Body: meeting_id, or email with an optional agent_id (that visitor's newest meeting, with that agent if given). ttl_hours sets how long the link works, from 1 to 720 hours; the default is 168 (7 days). The link can be opened any number of times until then.
  • The address is the agent's live sharing link, on your workspace's own link address if it has one, with #resume=<token> added. If you build the address yourself, such as your own iframe src, add resume=<token> to the fragment and keep any other fragment parameters, for example #inline=1&resume=<token>.
  • Which visit: the link always carries on the visitor's newest visit, even when you pass an older meeting, and progress covers every visit.
  • Scope: the link is tied to your workspace, the agent, and the visitor. Opened on another agent's page or another workspace's, it does not work. Insurge stores only a hash of the token.
  • What the visitor sees: no visitor form, a "welcome back" with a short recap, then the next section. The visit is a new meeting whose resumed_from_meeting_id is the previous one.
  • Not a login: the resumed session is not signed in to any account the visitor made last time, so anything that needs their account asks them to verify again.

Errors have {"detail": {"code": …, "message": …}}:

StatuscodeMeaning
404no_meetingNo such meeting, or no meeting for that email
409already_completedThe visitor's newest visit already finished the demo
422test_meetingThe meeting came from a test link or a Preview
422anonymous_leadThe visitor never gave their email
422not_resumableThe agent is a Presenter or Copilot, or is switched off
422no_linkThe agent has no live sharing link

To act when someone leaves part way, listen for a meeting.ended webhook with resumable: true.

End links before they expire, either one link by its token (the part after #resume=) or every live link of one visitor:

curl --fail-with-body -X DELETE \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"lead_id":"your_lead_id"}' \
  'https://api.insurgeai.com/api/v1/resume-links'
{"revoked": 1}

Send {"token": "your_resume_token"} to end a single link. revoked is the number of live links ended; 0 is not an error. Only your workspace's links are affected. A visitor who opens an ended link sees that it no longer works.

Errors and rate limits

Check the HTTP status before using a response. Error bodies have a detail field; a 422 can list several problems. Recording and continue-link errors with their own meanings are listed in those sections.

StatusMeaningWhat to do
400A cursor this API did not returnStart again without cursor
401The key is missing, wrong, expired, or revokedCheck the key and its expiry
403The key does not have the scope this endpoint needsCreate a key with that scope
404The record does not exist, is in another workspace, or is a test meetingCheck the ID
409, 412A recording is not ready, or its sha256 did not matchSee Download and delete recordings
422A parameter or body is invalid, such as limit=1000, or a continue link cannot be createdFix the value using the tables above
429The key has used up its request allowance, or 4 recording downloads are already openWait the number of seconds in Retry-After
5xxA server or upstream problemRetry reads with backoff; check the CRM before repeating a sync, and the recording before repeating a delete

Each key can make 60 requests per minute, with bursts of up to 120. Insurge may change this limit; always honour Retry-After rather than hard-coding it. Requests that fail with 403 count towards the limit. A 429 response includes Retry-After; wait that long before retrying.

What this API does not do

Create and revoke API keys, connect CRMs, and manage webhook endpoints in the dashboard; those actions need a signed-in workspace admin, not an API key. A workspace admin can also delete a recording from the meeting's page in the dashboard. Live meeting control and real-time streams are not part of this API.

Continue with webhook delivery and signature checks, or put an agent on your website.

On this page