feat: Conversation update API for sla_policy_id (#8973)
- Add an endpoint for updating conversation attributes (priority / sla_policy_id ) - Swagger spec - minor chores around the conversation API/spec Fixes: https://linear.app/chatwoot/issue/CW-2100/feat-backend-api-to-update-the-sla-of-a-conversation
This commit is contained in:
29
swagger/paths/application/conversation/update.yml
Normal file
29
swagger/paths/application/conversation/update.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
tags:
|
||||
- Conversations
|
||||
operationId: update-conversation
|
||||
summary: Update Conversation
|
||||
description: Update Conversation Attributes
|
||||
security:
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
priority:
|
||||
type: string
|
||||
enum: ["urgent", "high", "medium", "low", "none"]
|
||||
description: "The priority of the conversation"
|
||||
sla_policy_id:
|
||||
type: number
|
||||
description: "The ID of the SLA policy (Available only in Enterprise edition)"
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
404:
|
||||
description: Conversation not found
|
||||
401:
|
||||
description: Unauthorized
|
||||
@@ -339,6 +339,8 @@
|
||||
- $ref: '#/parameters/conversation_id'
|
||||
get:
|
||||
$ref: ./application/conversation/show.yml
|
||||
patch:
|
||||
$ref: ./application/conversation/update.yml
|
||||
/api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_status:
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
|
||||
@@ -3319,6 +3319,64 @@
|
||||
"description": "Access denied"
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"tags": [
|
||||
"Conversations"
|
||||
],
|
||||
"operationId": "update-conversation",
|
||||
"summary": "Update Conversation",
|
||||
"description": "Update Conversation Attributes",
|
||||
"security": [
|
||||
{
|
||||
"userApiKey": [
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"agentBotApiKey": [
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"priority": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"urgent",
|
||||
"high",
|
||||
"medium",
|
||||
"low",
|
||||
"none"
|
||||
],
|
||||
"description": "The priority of the conversation"
|
||||
},
|
||||
"sla_policy_id": {
|
||||
"type": "number",
|
||||
"description": "The ID of the SLA policy (Available only in Enterprise edition)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success"
|
||||
},
|
||||
"404": {
|
||||
"description": "Conversation not found"
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_status": {
|
||||
|
||||
Reference in New Issue
Block a user