POST
/
send-message
/
image
cURL
curl --request POST \
  --url https://api.crunchz.app/api/send-message/image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "contact_id": "xxx@c.us",
  "caption": "Checkout this image, its hilarious!",
  "file": {
    "mimeType": "image/png",
    "filename": "filename.png",
    "url": "https://avatars.githubusercontent.com/u/29356430?v=4"
  },
  "reply_to": "message_id_here"
}'
{
  "success": true,
  "message": "<string>",
  "data": {
    "status": "<string>",
    "message": {
      "caption": "<string>",
      "image": "<string>",
      "details": {
        "mimetype": "<string>",
        "height": "<string>",
        "width": "<string>",
        "mediaKey": "<string>",
        "fileSha256": "<string>",
        "timestamp": "<string>"
      }
    },
    "timestamp": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
contact_id
string
required

Contact ID.

Required string length: 10 - 50
Example:

"xxx@c.us"

caption
string
required

Caption

Required string length: 1 - 1024
Example:

"Checkout this image, its hilarious!"

file
object
required
reply_to
string

Message ID to reply to (optional)

Required string length: 1 - 100
Example:

"message_id_here"

Response

ImageMessageResource

success
boolean
required

The success status of response.

message
string
required

The message of response.

data
object
required