Upload whatsapp attachment

Uploads a whatsapp attachment. Resulting attachmentId may be used when sending whatsapp messages


Endpoint

POST /converged/whatsapp/attachment
Top

Request Parameter

Form Data

Name Description
file

The file to upload.

Top

Example

When uploading an attachment the Content-Type must be set to multipart/form-data, the file itself needs to be attached to the requests body part.

Content-Type: multipart/form-data; boundary=16850818731872656777342329226
Authorization: Bearer ACCESS_TOKEN

-----------------------------16850818731872656777342329226

Content-Disposition: form-data; name="file"; filename="image.jpg"
Content-Type: image/jpeg


...(bytes of the image)...

-----------------------------16850818731872656777342329226--

Accepted File Types / Sizes

Images
  • .jpg – 2 MB
  • .jpeg – 2 MB
  • .png – 2 MB
Audio
  • .aac – 10 MB
  • .mp3 – 10 MB
Video
  • .mp4 – 10 MB
Top

Response

HTTP Status Code Description Reponse
200

OK

AttachmentResponse
401

Unauthorized

AttachmentResponse

Property Type Description Example
statusCode integer

Status code

2000

statusMessage string

Description of the response status code.

OK

attachmentId integer

the attachment id

20

Top

Status Codes

statusCode status statusMessage
2000 OK OK
4034 INVALID_ATTACHMENT Invalid Attachment.
Top