/conversations/{id}:closeClose conversation
Closes the conversation's open session and returns the updated conversation. Returns `404` when the conversation has no open session, and `409` with code `messaging_inbox_context_changed` when `expectedContext` no longer matches the conversation. A closed session is never reopened: the next message starts a new session in the same conversation. Sessions also close automatically, depending on who owns them: - Chatbot, API key (`service_account`) or connected inbox (`inbox`): 1 hour after the owner's latest successful reply if the customer hasn't written since; otherwise 7 days after the customer's latest message. - Human agent (`user`): 7 days after the latest successful agent reply if the customer hasn't written since. A session waiting for an agent's reply isn't closed automatically. - Journey: 7 days after the journey's latest successful message while the customer hasn't replied. - Unassigned sessions aren't closed automatically. A reply counts as successful once its `deliveryStatus` is `sent`, `delivered` or `read`.
Authorization
Scheme
- bearerAuth
Required scopes
- conversation:close
Allowed roles
- owner
- admin
- agent
Close a conversation in scope.
Parameters
- Name
id- Type
- path string
- Description
- Required parameter.
Request body
- Name
application/json- Type
- CloseConversationRequest
- Description
- Optional body.
Responses
- 200
Conversation closed
- application/json ConversationDetail
- default
Error
- application/json ProblemDetails