Sending File Through Chatwoot Client API

TLDR Зокирбеков Хожиакбарбек asked how to send files through Client API. sojan_official suggested sending the file as multipart form data.

Photo of Зокирбеков Хожиакбарбек
Зокирбеков Хожиакбарбек
Tue, 24 Jan 2023 09:43:27 UTC

Hello everyone, How does contact send file by Client API. I saw that, there is create method (https://app.chatwoot.com/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages) and request is { "content": "string", "echo_id": "string" } But I don't see field for file

Photo of sojan_official
sojan_official
Wed, 25 Jan 2023 10:43:37 UTC

You have to send the attachment file as multipart form data. the param structure is same as mentioned here : https://github.com/chatwoot/chatwoot/discussions/1809#discussioncomment-1211845

Photo of Зокирбеков Хожиакбарбек
Зокирбеков Хожиакбарбек
Tue, 31 Jan 2023 11:25:37 UTC

Thanks for answer