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.
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.
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.
Make a continue link
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.
Anyone who holds the link can carry on as that visitor, until it expires or you end it. Give it only to that visitor.
| Name | Type | Description |
|---|---|---|
meeting_id | string | A 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. |
email | string | Instead of meeting_id: the visitor's email. Uses their newest meeting with an agent that can be continued. |
agent_id | string | With email: which agent's session to continue. With meeting_id: a check that the meeting was run by this agent. |
ttl_hours | number | How 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.
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}'{
"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"
}
}| Name | Type | Description |
|---|---|---|
url | string | The link to give the visitor: the agent's share link, with the token after #resume=. |
token | string | The token on its own, for when you build the address yourself. Shown only in this answer: Insurge keeps only a hash of it. |
expires_at | string | When the link stops working, in ISO 8601 UTC. |
meeting_id | string | The visitor's newest visit in this chain of continued sessions: the one the next session carries on from. |
lead_id | string | The visitor. Use it to end all their links. |
agent_id | string | The agent the link opens. |
progress | object | null | How far the visitor got, across every visit: sections_done, sections_total and next_section. |
When a link can't be made
These answers have a detail object with a code to branch on and a message:
{
"detail": {
"code": "already_completed",
"message": "The visitor finished this demo."
}
}| Status | code | When |
|---|---|---|
404 | no_meeting | No 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. |
409 | already_completed | The visitor's newest visit reached the end. There is nothing to continue. |
422 | test_meeting | The meeting was opened from a test link or a Preview. |
422 | anonymous_lead | The visitor never gave their email. |
422 | not_resumable | The agent isn't a Tour guide, Help desk or Training agent, or it is paused. |
422 | no_link | The 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.
End continue links
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.
| Name | Type | Description |
|---|---|---|
token | string | The token of one link: the token field, or the part of the url after #resume=. |
lead_id | string | The visitor: ends every one of their links. Ignored when token is given. |
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"}'{
"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.
| Status | When |
|---|---|
403 | The key doesn't have sessions:write. |
422 | The body has neither token nor lead_id. |