messages:create scope, the same one used for sending text. If your
key already sends messages, it already sends files.
Step 1: upload the file
1
Send the file as multipart/form-data
Two required fields:
file with the binary and fileType with the category.cURL
2
Save the _id from the response
The response carries the attachment record. The field that matters for step 2 is the
_id:fileType values
The
fileType from the upload must match the sending endpoint. Uploading as DOCUMENT and
trying to send through send-image doesn’t work.
Step 2: send to the conversation
The body is JSON, with the target conversation and themessage object:
message fields
Quoting a message
quoteSourceId expects the id of the message on the channel, not Nuvia’s _id. Sending the
_id quotes nothing and returns no error.
That value arrives in the
source_id field of every message returned by
GET /v1/messages/conversation/{id}. Read it from there and send it back in quoteSourceId. The
quoted message has to belong to the same conversation.
Limits
- Upload: up to 100 MB per file.
- WhatsApp: images up to 5 MB, audio and video up to 16 MB, documents up to 100 MB. The channel limit applies even if the upload accepted the file, so a 50 MB video uploads but doesn’t reach the contact.
- Formats: only those accepted by WhatsApp, listed in the table above.
Common errors
Next steps
API reference
All the sending endpoints, with parameters and responses.
Integration examples
Complete end-to-end use cases.