mirror of
https://github.com/chatwoot/chatwoot.git
synced 2026-06-04 21:02:35 +08:00
Updates the Create New Message API documentation to explain how to send file attachments with multipart form data. Closes #10472 Closes #12672 ## Why The endpoint already accepts attachment uploads, but the published API docs only described the JSON request body. That made it unclear that clients need to use multipart form data and send files through the `attachments[]` field. ## What changed - Adds `multipart/form-data` as a documented request body option for Create New Message. - Documents the `attachments` binary array and form encoding used by `attachments[]`. - Adds a multipart cURL request example for a message with an attachment. - Regenerates the Swagger JSON artifacts. ## Screenshots Create New Message API docs with the multipart cURL sample and `multipart/form-data` request sample selected: <img width="1702" height="1083" alt="create-message-attachment-docs-multipart" src="https://github.com/user-attachments/assets/5fef9082-6eb9-494d-91d1-8dc0b7880212" /> ## How to test 1. Open `/swagger`. 2. Navigate to Application -> Messages -> Create New Message. 3. Confirm the endpoint documents both `application/json` and `multipart/form-data`, including the attachment payload schema. |
||
|---|---|---|
| .. | ||
| definitions | ||
| parameters | ||
| paths | ||
| tag_groups | ||
| index.html | ||
| index.yml | ||
| swagger.json | ||