Chatwoot/swagger/paths/application/conversation/messages/create_attachment.yml
Jan-David e500d1216b
Fix: Make swagger doc compliant to OpenAPI (#3394)
This fixes issues in the swagger.json file. The motivation to do so is to be able to generate API clients using https://openapi-generator.tech Doing so will require further changes to the api spec, but this seems like a good first step since it is now "valid" according to editor.swagger.io and openapi-generator validate.

Fixes #2806
2021-11-17 18:55:15 +05:30

48 lines
1.3 KiB
YAML

post:
tags:
- Messages
operationId: conversationNewMessageAttachment
summary: Create New Message Attachment
description: Create an attachment message. Refer to this discussion if you have any further doubts. https://github.com/chatwoot/chatwoot/discussions/1809#discussioncomment-1211845
consumes:
- multipart/form-data
security:
- userApiKey: []
- agentBotApiKey: []
parameters:
- $ref: '#/parameters/account_id'
- $ref: '#/parameters/conversation_id'
required: true
- in: formData
name: content
type: string
description: The content of the message
required: true
- in: formData
name: message_type
type: string
enum: ['outgoing', 'incoming']
- in: formData
name: private
type: boolean
description: Flag to identify if it is a private note
- in: formData
name: attachments[]
type: array
description: The files to be uploaded.
items:
type: string
format: binary
responses:
200:
description: Success
schema:
allOf:
- $ref: '#/definitions/generic_id'
- $ref: '#/definitions/message'
404:
description: Conversation not found
403:
description: Access denied