Send Media Message

Used to send a media message on the WhatsApp channel.

Body

Parameter
Required
Values / Type
Notes

message_type

Yes

document, image, template

client

Yes

String

Mandatory, ID of the client to whom the message is sent.

media.file_url

Yes

String

Mandatory forr message_type:document and message_type:image.

media.filename

No*

String

Mandatory only if message_type:document and message_type:image. File extension is always required.

delay

No*

String

Delay in sending the message. The valid format is described in the table below.

Delay Format

Description

Example

1 year

1y

3 months

3M

2 weeks

2w

200 days

200d

14 hours

14h

60 seconds

60s

Endpoint

POST: https://api.pingup.ai/ext/v2/{businessname}}messages

Request

curl --location 'https://api.pingup.ai/ext/v2/{businessname}/messages' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SECRET_KEY' \
--data '{
    "message_type": "image",
    "client": "client_id or client_phone are required ",
    
    "client_phone": "39 321123213",
    "client_name": "Jon Doe",
    
    "media": {
        "file_url": "https://media.etihub.it/lorecate/7961a729-70f4-4a23-8a01-0f470de87f69.jpg",
        "filename": "file.jpg"
    },
    "delay": "1m" 
}'

Response

The value message_id will be sent in the callback to recognize whether a message has been received/read or has failed.

{
  "success": true|false,
  "data": {
      "message_id": "message_id"
  }
}

Last updated