mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-29 18:22:53 +00:00
docs: Update conversation toggle API with snooze & pending (#12406)
## Changes - Update conversation toggle API with documentation of additional statuses and options which are supported - snoozed , snooze_until & pending fixes: https://github.com/chatwoot/chatwoot/issues/12137
This commit is contained in:
@@ -2,7 +2,13 @@ tags:
|
|||||||
- Conversations
|
- Conversations
|
||||||
operationId: toggle-status-of-a-conversation
|
operationId: toggle-status-of-a-conversation
|
||||||
summary: Toggle Status
|
summary: Toggle Status
|
||||||
description: Toggles the status of the conversation between open and resolved
|
description: |-
|
||||||
|
Toggle the status of a conversation. Pass `status` to explicitly set the
|
||||||
|
conversation state. Use `snoozed` along with `snoozed_until` to snooze a
|
||||||
|
conversation until a specific time. If `snoozed_until` is omitted, the
|
||||||
|
conversation is snoozed until the next reply from the contact. Regardless
|
||||||
|
of the value provided, snoozed conversations always reopen on the next
|
||||||
|
reply from the contact.
|
||||||
security:
|
security:
|
||||||
- userApiKey: []
|
- userApiKey: []
|
||||||
- agentBotApiKey: []
|
- agentBotApiKey: []
|
||||||
@@ -17,16 +23,36 @@ requestBody:
|
|||||||
properties:
|
properties:
|
||||||
status:
|
status:
|
||||||
type: string
|
type: string
|
||||||
enum: ['open', 'resolved', 'pending']
|
enum: ['open', 'resolved', 'pending', 'snoozed']
|
||||||
description: The status of the conversation
|
description: The status of the conversation
|
||||||
example: open
|
example: open
|
||||||
|
snoozed_until:
|
||||||
|
type: number
|
||||||
|
description: When status is `snoozed`, schedule the reopen time as a Unix timestamp in seconds.
|
||||||
|
If not provided, the conversation is snoozed until the next
|
||||||
|
customer reply. The conversation always reopens when the
|
||||||
|
customer replies.
|
||||||
|
example: 1757506877
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Success
|
description: Success
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/conversation_status_toggle'
|
type: object
|
||||||
|
properties:
|
||||||
|
meta:
|
||||||
|
type: object
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
success:
|
||||||
|
type: boolean
|
||||||
|
current_status:
|
||||||
|
type: string
|
||||||
|
enum: ['open', 'resolved', 'pending', 'snoozed']
|
||||||
|
conversation_id:
|
||||||
|
type: number
|
||||||
'404':
|
'404':
|
||||||
description: Conversation not found
|
description: Conversation not found
|
||||||
content:
|
content:
|
||||||
|
|||||||
@@ -4673,7 +4673,7 @@
|
|||||||
],
|
],
|
||||||
"operationId": "toggle-status-of-a-conversation",
|
"operationId": "toggle-status-of-a-conversation",
|
||||||
"summary": "Toggle Status",
|
"summary": "Toggle Status",
|
||||||
"description": "Toggles the status of the conversation between open and resolved",
|
"description": "Toggle the status of a conversation. Pass `status` to explicitly set the\nconversation state. Use `snoozed` along with `snoozed_until` to snooze a\nconversation until a specific time. If `snoozed_until` is omitted, the\nconversation is snoozed until the next reply from the contact. Regardless\nof the value provided, snoozed conversations always reopen on the next\nreply from the contact.",
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
"userApiKey": []
|
"userApiKey": []
|
||||||
@@ -4697,10 +4697,16 @@
|
|||||||
"enum": [
|
"enum": [
|
||||||
"open",
|
"open",
|
||||||
"resolved",
|
"resolved",
|
||||||
"pending"
|
"pending",
|
||||||
|
"snoozed"
|
||||||
],
|
],
|
||||||
"description": "The status of the conversation",
|
"description": "The status of the conversation",
|
||||||
"example": "open"
|
"example": "open"
|
||||||
|
},
|
||||||
|
"snoozed_until": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "When status is `snoozed`, schedule the reopen time as a Unix timestamp in seconds. If not provided, the conversation is snoozed until the next customer reply. The conversation always reopens when the customer replies.",
|
||||||
|
"example": 1757506877
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4713,7 +4719,32 @@
|
|||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/conversation_status_toggle"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"meta": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"payload": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"success": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"current_status": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"open",
|
||||||
|
"resolved",
|
||||||
|
"pending",
|
||||||
|
"snoozed"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"conversation_id": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3070,7 +3070,7 @@
|
|||||||
],
|
],
|
||||||
"operationId": "toggle-status-of-a-conversation",
|
"operationId": "toggle-status-of-a-conversation",
|
||||||
"summary": "Toggle Status",
|
"summary": "Toggle Status",
|
||||||
"description": "Toggles the status of the conversation between open and resolved",
|
"description": "Toggle the status of a conversation. Pass `status` to explicitly set the\nconversation state. Use `snoozed` along with `snoozed_until` to snooze a\nconversation until a specific time. If `snoozed_until` is omitted, the\nconversation is snoozed until the next reply from the contact. Regardless\nof the value provided, snoozed conversations always reopen on the next\nreply from the contact.",
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
"userApiKey": []
|
"userApiKey": []
|
||||||
@@ -3094,10 +3094,16 @@
|
|||||||
"enum": [
|
"enum": [
|
||||||
"open",
|
"open",
|
||||||
"resolved",
|
"resolved",
|
||||||
"pending"
|
"pending",
|
||||||
|
"snoozed"
|
||||||
],
|
],
|
||||||
"description": "The status of the conversation",
|
"description": "The status of the conversation",
|
||||||
"example": "open"
|
"example": "open"
|
||||||
|
},
|
||||||
|
"snoozed_until": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "When status is `snoozed`, schedule the reopen time as a Unix timestamp in seconds. If not provided, the conversation is snoozed until the next customer reply. The conversation always reopens when the customer replies.",
|
||||||
|
"example": 1757506877
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3110,7 +3116,32 @@
|
|||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/conversation_status_toggle"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"meta": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"payload": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"success": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"current_status": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"open",
|
||||||
|
"resolved",
|
||||||
|
"pending",
|
||||||
|
"snoozed"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"conversation_id": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user