POST
/
messages
/
send
curl --request POST \
  --url https://shortext.ny-corp.io/api/messages/send \
  --header 'Content-Type: application/json' \
  --data '{
  "channel": "whatsapp",
  "contact": {
    "phone": "1234567890",
    "profile": {
      "lastname": "Yoan",
      "firstname": "André",
      "email": "celia@home.io",
      "address": "Place to be",
      "preferred_language": "en"
    }
  },
  "from": "1234567890",
  "message": {
    "type": "text",
    "content": {
      "text": "Ceci est un message texte.",
      "preview_url": true
    }
  }
}'
{
  "status": "success",
  "message_id": "abc123",
  "recipient": {
    "phone_number": "1234567890"
  },
  "data": {
    "sent_at": "2024-10-05T10:01:00Z",
    "delivered_at": "2024-10-05T10:05:00Z",
    "read_at": "2024-10-05T10:07:00Z"
  }
}

Text messages are messages containing only a text body and an optional link preview.

text-message

Text Message

You can have the WhatsApp client attempt to render a preview of the first URL in the body text string, if it contains one. URLs must begin with http:// or https://. If multiple URLs are in the body text string, only the first URL will be rendered.

If omitted, or if unable to retrieve a link preview, a clickable link will be rendered instead.

Body

application/json
channel
enum<string>
required
Available options:
whatsapp
contact
object
required
from
string
required

the id of the sender business number

Example:

"1234567890"

message
object
required

Response

200 - application/json
ButtonReplyMessage sent successfully
status
string
Example:

"success"

message_id
string
Example:

"abc123"

recipient
object
data
object