Chore: Document Conversation APIs in swagger (#552)
* Added the documentation for the conversation APIs - 8 endpoints * Added descriptions for the existing endpoints * Added new resource models and updated some parts of the contact API
This commit is contained in:
50
swagger/paths/conversation/labels.yml
Normal file
50
swagger/paths/conversation/labels.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
get:
|
||||
tags: [Conversation]
|
||||
summary: List Labels
|
||||
description: Lists all the labels of a conversation
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: id of the conversation
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/conversation_labels'
|
||||
404:
|
||||
description: Conversation not found
|
||||
403:
|
||||
description: Access denied
|
||||
|
||||
post:
|
||||
tags: [Conversation]
|
||||
summary: Add Label
|
||||
description: Creates a new label and associates it with the conversation
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: id of the conversation
|
||||
required: true
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
labels:
|
||||
type: array
|
||||
description: 'array of labels'
|
||||
properties:
|
||||
type: string
|
||||
responses:
|
||||
204:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/conversation_labels'
|
||||
404:
|
||||
description: Conversation not found
|
||||
403:
|
||||
description: Access denied
|
||||
Reference in New Issue
Block a user