curl -X POST https://api.livchat.ai/v1/messages/send/document \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "5511999999999",
"document": "https://example.com/file.pdf",
"fileName": "invoice.pdf"
}'
const response = await fetch("https://api.livchat.ai/v1/messages/send/document", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
phone: "5511999999999",
document: "https://example.com/file.pdf",
fileName: "invoice.pdf",
}),
});
{
"success": true,
"code": 200,
"data": {
"details": "Sent",
"id": "3EB04A45DCA355D01DB68C"
}
}
Messages
Send Document
Send a document file to a WhatsApp number
POST
/
v1
/
messages
/
send
/
document
curl -X POST https://api.livchat.ai/v1/messages/send/document \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "5511999999999",
"document": "https://example.com/file.pdf",
"fileName": "invoice.pdf"
}'
const response = await fetch("https://api.livchat.ai/v1/messages/send/document", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
phone: "5511999999999",
document: "https://example.com/file.pdf",
fileName: "invoice.pdf",
}),
});
{
"success": true,
"code": 200,
"data": {
"details": "Sent",
"id": "3EB04A45DCA355D01DB68C"
}
}
Send a document file (PDF, DOCX, etc.).
Request Body
string
required
Recipient phone number in international format
string
required
Document URL or base64-encoded data in data URI format (
data:application/octet-stream;base64,...)string
Display filename for the document (e.g.,
invoice.pdf)string
Optional caption for the document
Supported Formats
PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, TXT, ZIP, RAR, and more.Maximum file size: 100MB
curl -X POST https://api.livchat.ai/v1/messages/send/document \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "5511999999999",
"document": "https://example.com/file.pdf",
"fileName": "invoice.pdf"
}'
const response = await fetch("https://api.livchat.ai/v1/messages/send/document", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
phone: "5511999999999",
document: "https://example.com/file.pdf",
fileName: "invoice.pdf",
}),
});
{
"success": true,
"code": 200,
"data": {
"details": "Sent",
"id": "3EB04A45DCA355D01DB68C"
}
}