# 1. List conversationscurl -X GET "https://api.wirebox.sh/api/v1/imessage/conversations?status=active" \ -H "Authorization: Bearer $WIREBOX_API_KEY"# 2. Disconnect a conversationcurl -X POST "https://api.wirebox.sh/api/v1/imessage/conversations/conv_01J8ABC123XYZ/disconnect" \ -H "Authorization: Bearer $WIREBOX_API_KEY"
from wirebox import Wireboxwith Wirebox() as wb: # List active conversations res = wb.imessage.conversations.list(status="active", limit=10) for c in res.conversations: print(f"[{c.id}] @{c.agent_handle} <-> {c.participant_id}") # Disconnect session wb.imessage.conversations.disconnect("conv_01J8ABC123XYZ")
import { Wirebox } from "@wirebox-sh/sdk";const wb = new Wirebox();// List active conversationsconst res = await wb.imessage.conversations.list({ status: "active", limit: 10 });for (const c of res.conversations) { console.log(`[${c.id}] @${c.agent_handle} <-> ${c.participant_id}`);}// Disconnect sessionawait wb.imessage.conversations.disconnect("conv_01J8ABC123XYZ");
List stateful iMessage conversation sessions, inspect active participants, and disconnect sessions.
GET
/
api
/
v1
/
imessage
/
conversations
# 1. List conversationscurl -X GET "https://api.wirebox.sh/api/v1/imessage/conversations?status=active" \ -H "Authorization: Bearer $WIREBOX_API_KEY"# 2. Disconnect a conversationcurl -X POST "https://api.wirebox.sh/api/v1/imessage/conversations/conv_01J8ABC123XYZ/disconnect" \ -H "Authorization: Bearer $WIREBOX_API_KEY"
from wirebox import Wireboxwith Wirebox() as wb: # List active conversations res = wb.imessage.conversations.list(status="active", limit=10) for c in res.conversations: print(f"[{c.id}] @{c.agent_handle} <-> {c.participant_id}") # Disconnect session wb.imessage.conversations.disconnect("conv_01J8ABC123XYZ")
import { Wirebox } from "@wirebox-sh/sdk";const wb = new Wirebox();// List active conversationsconst res = await wb.imessage.conversations.list({ status: "active", limit: 10 });for (const c of res.conversations) { console.log(`[${c.id}] @${c.agent_handle} <-> ${c.participant_id}`);}// Disconnect sessionawait wb.imessage.conversations.disconnect("conv_01J8ABC123XYZ");
To explicitly terminate an active conversation session and end routing to the agent:
POST https://api.wirebox.sh/api/v1/imessage/conversations/{id}/disconnect
# 1. List conversationscurl -X GET "https://api.wirebox.sh/api/v1/imessage/conversations?status=active" \ -H "Authorization: Bearer $WIREBOX_API_KEY"# 2. Disconnect a conversationcurl -X POST "https://api.wirebox.sh/api/v1/imessage/conversations/conv_01J8ABC123XYZ/disconnect" \ -H "Authorization: Bearer $WIREBOX_API_KEY"
from wirebox import Wireboxwith Wirebox() as wb: # List active conversations res = wb.imessage.conversations.list(status="active", limit=10) for c in res.conversations: print(f"[{c.id}] @{c.agent_handle} <-> {c.participant_id}") # Disconnect session wb.imessage.conversations.disconnect("conv_01J8ABC123XYZ")
import { Wirebox } from "@wirebox-sh/sdk";const wb = new Wirebox();// List active conversationsconst res = await wb.imessage.conversations.list({ status: "active", limit: 10 });for (const c of res.conversations) { console.log(`[${c.id}] @${c.agent_handle} <-> ${c.participant_id}`);}// Disconnect sessionawait wb.imessage.conversations.disconnect("conv_01J8ABC123XYZ");