API reference
End a voice call
Hang up. Optional: a call also ends when you leave the room, after a minute of silence, at its time or character cap, or when you start another.
Needs scope voice:call.
bearerAuthorizationBearer <JWT>An access token from the identity provider: a person's, or a customer's from the client credentials grant with an API key (developers.inorbit.hr). The gateway verifies it; the audience is iohr-api.
session_id*stringThe call's id, from Start a voice call.
iohr.voice.v1.EndSessionRequest; path variables override their fields
application/json- body
iohr.voice.v1.EndSessionRequest
account_id?stringsession_id?stringiohr.voice.v1.EndSessionResponse
application/json- response
iohr.voice.v1.EndSessionResponse
session?iohr.voice.v1.Session
import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try { const { value } = await api.voice.endSession("<session_id>", {}); console.log(value);} catch (e) { if (!(e instanceof ApiError)) throw e; console.error(`${e.code}: ${e.problem} (request id ${e.raw.requestId})`); process.exitCode = 1;}npm install @inorbithr/sdk. Calls the package's public surface; an operation newer than your package needs the next release or a client generated for your account. The SDKs.
{ "session": { "account_id": "string", "characters": 0, "duration_ms": "string", "end_reason": "string", "ended_at": "string", "handoffs": 0, "max_characters": 0, "max_seconds": 0, "room": "string", "session_id": "string", "started_at": "string", "state": "string", "thread_id": "string", "turns": 0 }}