Sign in
Docs
API referenceVoice

API reference

End a voice call

Have a token? Manage tokens in the console
POST
/v1/voice/sessions/{session_id}/end

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.

Authorization

bearer
headerAuthorizationBearer <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.

Path Parameters

session_id*string

The call's id, from Start a voice call.

Request Body

iohr.voice.v1.EndSessionRequest; path variables override their fields

application/json
  1. body

iohr.voice.v1.EndSessionRequest

account_id?string
session_id?string

Response Body

iohr.voice.v1.EndSessionResponse

application/json
  1. 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.

Example Response
{  "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  }}