Chat

Close a conversation

Closes the conversation: it accepts no more messages, and the summary follows as conversation.summary.ready and in GET /conversations/{id}. Without a customer message there is no summary. Closing an already closed conversation returns it unchanged. A conversation closes automatically after 30 minutes without messages.

post/conversations/{id}/close

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/conversations/{id}/close
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.hypamoon.com/oauth/authorize, token URL https://api.hypamoon.com/oauth/token, scopes: chat:write)

Path parameters

idstring uuid required

The id of the conversation.

Response

The conversation, closed.

idstring uuid required

The id of the conversation.

channel'chat' | 'widget' required

The channel: chat when your app started it with an API key, widget when a visitor started it in the chat widget on a website (public chat token).

status'open' | 'closed' required

open: takes messages. closed: takes no more messages; the summary follows.

referencestring nullable required

Your own id for this conversation, as you sent it.

metadataobject required

Your metadata, as you sent it. The assistant never sees it.

languagestring required

The language the assistant opened in (nl, en, de, fr or es). It replies in the customer's language when that is one of its languages.

turnsinteger required

Customer messages answered so far.

max_turnsinteger required

After this many turns the conversation closes (close_reason turn_limit).

created_atstring date-time required

When the conversation started.

last_message_atstring date-time nullable required

When the last message was sent.

closed_atstring date-time nullable required

When the conversation closed.

close_reason'closed' | 'inactive' | 'turn_limit' | 'null' nullable required

closed: POST /conversations/{id}/close. inactive: no message for 30 minutes. turn_limit: max_turns reached.

has_summaryboolean required

Whether the summary is ready. Fetch it with GET /conversations/{id}.

summary_ready_atstring date-time nullable required

When the summary was ready.

testboolean required

true for a conversation in test mode (hm_test_): real replies, free, with a low daily limit.

Changes

No recorded changes to this operation across all 1 revision of this API.