diff --git a/swagger/paths/application/conversation/toggle_priority.yml b/swagger/paths/application/conversation/toggle_priority.yml new file mode 100644 index 000000000..22a80c891 --- /dev/null +++ b/swagger/paths/application/conversation/toggle_priority.yml @@ -0,0 +1,28 @@ +tags: + - Conversations +operationId: toggle-priority-of-a-conversation +summary: Toggle Priority +description: Toggles the priority of conversation +security: + - userApiKey: [] + - agentBotApiKey: [] +parameters: + - name: data + in: body + required: true + schema: + type: object + required: + - priority + properties: + priority: + type: string + enum: ["urgent", "high", "medium", "low", "none"] + description: "The priority of the conversation" +responses: + 200: + description: Success + 404: + description: Conversation not found + 401: + description: Unauthorized diff --git a/swagger/paths/index.yml b/swagger/paths/index.yml index 6a42fc37e..c3e0f9d51 100644 --- a/swagger/paths/index.yml +++ b/swagger/paths/index.yml @@ -267,6 +267,12 @@ - $ref: '#/parameters/conversation_id' post: $ref: ./application/conversation/toggle_status.yml +/api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_priority: + parameters: + - $ref: '#/parameters/account_id' + - $ref: '#/parameters/conversation_id' + post: + $ref: ./application/conversation/toggle_priority.yml # Conversations Assignments diff --git a/swagger/swagger.json b/swagger/swagger.json index 62a7d673e..5ae02e056 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -2877,6 +2877,73 @@ } } }, + "/api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_priority": { + "parameters": [ + { + "$ref": "#/parameters/account_id" + }, + { + "$ref": "#/parameters/conversation_id" + } + ], + "post": { + "tags": [ + "Conversations" + ], + "operationId": "toggle-priority-of-a-conversation", + "summary": "Toggle Priority", + "description": "Toggles the priority of conversation", + "security": [ + { + "userApiKey": [ + + ] + }, + { + "agentBotApiKey": [ + + ] + } + ], + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "priority" + ], + "properties": { + "priority": { + "type": "string", + "enum": [ + "urgent", + "high", + "medium", + "low", + "none" + ], + "description": "The priority of the conversation" + } + } + } + } + ], + "responses": { + "200": { + "description": "Success" + }, + "404": { + "description": "Conversation not found" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, "/api/v1/accounts/{account_id}/conversations/{conversation_id}/assignments": { "parameters": [ {