Nuance LabsDocs
ReferenceAPI overviewServer

End a conversation

POST
/conversation/{conversation_id}/end

Ends one of your organization's conversations the way it ends when the person hangs up, though for now the page's session.closed may name the reason error rather than close_requested. One that hasn't started ends at once; a running one ends within a few seconds, once the AI persona leaves, and its place counts until then. Answers with the conversation as it stands, so a running one can still say connected. One already over is left as it is. It has no body; send Content-Length: 0. Reaches only your organization's conversations: another's answers 404.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from your organization's API keys page on the platform, nk_…. Server only.

Path Parameters

conversation_id*string

The conversation's id.

Formatuuid

Response Body

Successful Response

application/json
  1. response

Where one of your conversations stands.

id*string

The conversation's id.

Formatuuid
status*ConversationStatus

Where the conversation is in its life.

Value in"created""ready""queued""admitted""connecting""connected""ended""failed""expired"
created_at*string

When it was created (UTC).

Formatdate-time
started_at*|

When the persona started it (UTC); null while it waits or joins, and for one that ended without running.

curl -X POST 'https://api.nuancelabs.ai/conversation/497f6eca-6276-4993-bfeb-53cbbbba6f08/end'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "created",  "created_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z"}