2020-03-11 10:49:13 +00:00
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- Messages
|
|
|
|
operationId: listAllMessages
|
|
|
|
summary: Get messages
|
|
|
|
description: List all messages of a conversation
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
type: number
|
|
|
|
description: ID of the conversation
|
|
|
|
required: true
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Success
|
|
|
|
type: array
|
|
|
|
description: Array of messages
|
|
|
|
schema:
|
|
|
|
allOf:
|
|
|
|
- $ref: '#/definitions/generic_id'
|
|
|
|
- $ref: '#/definitions/message'
|
|
|
|
404:
|
|
|
|
description: Conversation not found
|
|
|
|
403:
|
|
|
|
description: Access denied
|
|
|
|
|
|
|
|
post:
|
|
|
|
tags:
|
|
|
|
- Messages
|
|
|
|
operationId: conversationNewMessage
|
|
|
|
summary: Create New Message
|
|
|
|
description: All the agent replies are created as new messages through this endpoint
|
2020-06-25 18:05:16 +00:00
|
|
|
security:
|
|
|
|
- userApiKey: []
|
|
|
|
- agentBotApiKey: []
|
2020-03-11 10:49:13 +00:00
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
type: number
|
|
|
|
description: ID of the conversation
|
|
|
|
required: true
|
|
|
|
- name: data
|
|
|
|
in: body
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/conversation_message_create'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Success
|
|
|
|
schema:
|
|
|
|
allOf:
|
|
|
|
- $ref: '#/definitions/generic_id'
|
|
|
|
- $ref: '#/definitions/message'
|
|
|
|
404:
|
|
|
|
description: Conversation not found
|
|
|
|
403:
|
|
|
|
description: Access denied
|