Skip to content

Question: How to send attachment messages using Chatwoot API #1809

Locked Answered by sojan-official
NitinNR asked this question in Q&A
Discussion options

You must be logged in to vote

POST multipart/form-data request to /accounts/{account_id}/conversations/{id}/messages with attachments[] field

Creating an attachment message

Postman link: https://www.postman.com/chatwoot/workspace/chatwoot-apis/request/162770-e22922ab-27e5-4d82-a672-a52f6555ed21

headers

body

curl

curl --location --request POST 'http://localhost:3000/api/v1/accounts/1/conversations/2/messages' \
--header 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundary' \
--header 'api_access_token: uBJjA56hAuS6fWEt6V1XRei8' \
--form 'attachments[]=@"K6aITBLXf/chatwoot.png"'

PHP

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('http://localhost:3000/api/v1/…

Replies: 6 comments 9 replies

Comment options

You must be logged in to vote
1 reply
@NitinNR
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@hartois
Comment options

@NitinNR
Comment options

@NitinNR
Comment options

@hartois
Comment options

Comment options

You must be logged in to vote
2 replies
@dorain47
Comment options

@sojan-official
Comment options

Answer selected by sojan-official
Comment options

You must be logged in to vote
1 reply
@sojan-official
Comment options

Comment options

You must be logged in to vote
1 reply
@sojan-official
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants