Close conversation
POST
https://api.flownally.com/v1/conversations/{id}:closeCloses 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 from the customer or a teammate
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. - Unassigned: 7 days after the latest successful reply from a teammate or from the WhatsApp Business app on your number if the customer hasn't written since. Replies from chatbots, journeys, campaigns, API keys or connected inboxes don't count, and a session waiting for a teammate's reply isn't closed automatically.
deliveryStatus is sent, delivered or read.Authorization
Required scopes
- conversation:close
Allowed roles
- owner
- admin
- agent
Close a conversation in scope.
Parameters
- Name
id- Type
- path · string
- required
Conversation ID.
Body parameters
Send a application/json body. The body is optional.
- Name
expectedContext- Type
- InboxActionContext
Responses
- 200Conversation closedapplication/json
- defaultErrorapplication/json
Related schemas
Generated from the API spec.