Developers / Agents

End a live session

POST https://api.echonova.ai/v1/agents/{agentId}/sessions/{sessionId}/end

Ends the session and closes its room. Ending a session that already ended answers 200 with its final status. Needs the agents:talk scope on the key.

Headers

Authorization string Required

Bearer, a space, then your API key, which starts with ek_. Create keys in the portal under Developers, API Keys.

Path parameters

agentId string Required

The agent id, as GET /v1/agents returned it.

sessionId string Required

The session id, as the start call returned it.

Response

200 application/json Every response uses this envelope.

data object

The result.

success boolean

true for a successful call.

statusCode integer

Repeats the HTTP status.

errorMessage string or null

null on success.

Errors

Same envelope, with success false and data null. All errors

POST /v1/agents/{agentId}/sessions/{sessionId}/end

curl -X POST "https://api.echonova.ai/v1/agents/{agentId}/sessions/{sessionId}/end" \
  -H "Authorization: Bearer YOUR_API_KEY"

{
  "data": {
    "id": "6651a1b2c3d4e5f6a7b8c9d0",
    "agentId": "6650a1b2c3d4e5f6a7b8c9d0",
    "channel": "voice",
    "status": "active",
    "startedAt": "2026-11-07T10:00:00.000Z",
    "endedAt": null
  },
  "success": true,
  "statusCode": 200,
  "errorMessage": null
}