Skip to Content
InsurgeDocumentation

Continue links API

Make a private link that lets a visitor carry on a session they left part way, and end links before they expire.

Developers
Markdown

A continue link opens an agent's session for one visitor, already knowing who they are and how far they got last time. Your server makes it with POST /api/v1/resume-links and ends it with DELETE /api/v1/resume-links. Both need a key with the sessions:write scope (Create continue links in the dashboard), which a new key doesn't have.

How the visitor lands, what the agent does and how to keep links safe are in Continue links.

Insurge turns this on for your workspace

The link opens your agent's page, and that page has to be set up to read it. Until Insurge has set it up for your workspace, a continue link opens the agent's usual start, as a new session. Ask your Insurge contact before you build on continue links.

POST /api/v1/resume-links makes a new link each time you call it. Call it from your server, when the visitor is back and you know who they are.

This opens a visitor's session

Anyone who holds the link can carry on as that visitor, until it expires or you end it. Give it only to that visitor.

NameTypeDescription
meeting_idstringA meeting of the visitor, from meeting.ended or the API. If they have since carried on from it through a continue link, the link carries on from that newest visit, even if you give the older one.
emailstringInstead of meeting_id: the visitor's email. Uses their newest meeting with an agent that can be continued.
agent_idstringWith email: which agent's session to continue. With meeting_id: a check that the meeting was run by this agent.
ttl_hoursnumberHow long the link works, in hours, from 1 to 720 (30 days).Default: 168 (7 days)

Give meeting_id or email. When you give both, meeting_id is used.

Make a continue link
curl -X POST 'https://api.insurgeai.com/api/v1/resume-links' \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"meeting_id": "your_meeting_id", "ttl_hours": 72}'
200 OK
{
  "url": "https://acme.insurgeai.com/s/Ab3dE6gH#resume=BwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSY",
  "token": "BwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSY",
  "expires_at": "2026-12-08T11:03:10Z",
  "meeting_id": "4e1d8a2c7b5f4c3a9e6d1b8f2a7c5e30",
  "lead_id": "c41e7b2a9d3f4e6a8b1c5d7f9e2a4b6c",
  "agent_id": "product-tour",
  "progress": {
    "sections_done": [
      "Workspace",
      "Pipelines"
    ],
    "sections_total": 4,
    "next_section": "Alerts"
  }
}
NameTypeDescription
urlstringThe link to give the visitor: the agent's share link, with the token after #resume=.
tokenstringThe token on its own, for when you build the address yourself. Shown only in this answer: Insurge keeps only a hash of it.
expires_atstringWhen the link stops working, in ISO 8601 UTC.
meeting_idstringThe visitor's newest visit in this chain of continued sessions: the one the next session carries on from.
lead_idstringThe visitor. Use it to end all their links.
agent_idstringThe agent the link opens.
progressobject | nullHow far the visitor got, across every visit: sections_done, sections_total and next_section.

These answers have a detail object with a code to branch on and a message:

409 Conflict
{
  "detail": {
    "code": "already_completed",
    "message": "The visitor finished this demo."
  }
}
StatuscodeWhen
404no_meetingNo meeting with that id; no visitor with that email; the visitor has no meeting with an agent that can be continued; or the meeting wasn't run by the agent_id you gave.
409already_completedThe visitor's newest visit reached the end. There is nothing to continue.
422test_meetingThe meeting was opened from a test link or a Preview.
422anonymous_leadThe visitor never gave their email.
422not_resumableThe agent isn't a Tour guide, Help desk or Training agent, or it is paused.
422no_linkThe agent has no live share link to open. Make one and try again.

A body without meeting_id or email, or a ttl_hours outside 1 to 720, answers 422 with the validation shape instead.

DELETE /api/v1/resume-links ends links before they expire: one link by its token, or every link of one visitor. An ended link stops working at once.

NameTypeDescription
tokenstringThe token of one link: the token field, or the part of the url after #resume=.
lead_idstringThe visitor: ends every one of their links. Ignored when token is given.
End every link of one visitor
curl -X DELETE 'https://api.insurgeai.com/api/v1/resume-links' \
  -H "Authorization: Bearer $INSURGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lead_id": "your_lead_id"}'
200 OK
{
  "revoked": 1
}

revoked is how many links were ended. Links that had already expired count; links ended before don't. 0 is not an error: there was nothing left to end, so it is safe to call again.

StatusWhen
403The key doesn't have sessions:write.
422The body has neither token nor lead_id.

On this page