WAPIM Cloud API Docs
  • Quick Start
  • Device
    • Get QR
    • Get Device Info
  • Events & Notifications
    • Websocket and Webhook
      • Websocket (Realtime)
      • Webhook
  • Messages
    • Send Messages
      • Text Message
      • Image Message
      • Video Message
      • Document Message
      • Location Message
      • Contact Message
    • Delete Message (Everyone)
    • Forward Message
  • Misc
    • Get WhatsApp Profile Names
    • Get Contacts
    • Get Stories
    • Get Profile Picture
    • Check WhatsApp Number
    • Get Blocked Numbers
    • Be Online
    • Be Offline
  • Chats
    • Get Chat List
    • Get Messages Of Chat
    • Archive Chat
    • Set Profile Name
    • Delete Chat
    • Pin Chat
    • Unpin Chat
    • Clear Chat
    • Mark As Read Chat
    • Mark As Unread Chat
    • Mute Chat
    • Unmute Chat
    • Unarchive Chat
  • Groups
    • Get Groups
    • Get Group
Powered by GitBook
On this page
  1. Messages
  2. Send Messages

Contact Message

Contact endpoint, will support sending with vcard format in the future.

Send Contact Message

POST https://api.wapim.io/api/v1/whatsapp/message/contact

Headers

Name
Type
Description

Token*

YOUR_WAPIM_TOKEN

Request Body

Name
Type
Description

phone_number*

String

Recipient Phone Number or Group ID

contact_name*

String

Contact name

reply_to

String

Message ID To Reply

contact_number*

String

Contact Number

{
    "status": true,
    "code": 200,
    "phone_number": "*****",
    "message_id": "3EB05F28F824A6F6D9E9",
    "req_id": "11b80f89-fff7-487c-b33f-047daff89af6"
}
{
    "status": false,
    "code": 400,
    "message": "Bad Request",
    "error": {
        "Send Contact": [
            "Malformed or missing phone id or contact_name!"
        ]
    }
}
curl
    -X POST https://api.wapim.io/api/v1/whatsapp/message/contact
    -H 'Token: YOUR_WAPIM_TOKEN'
    -d '{"phone_number": "PHONENUMBER_OR_GROUPID", "contact_name": "Twilio", "contact_number": "14155238886"}'
const axios = require('axios');

axios
  .post(
    'https://api.wapim.io/api/v1/whatsapp/message/contact',
    {
     phone_number: 'PHONENUMBER_OR_GROUPID',
     contact_name: 'Twilio', 
     contact_number: '14155238886'
    },
    {
     headers: {
      token: 'YOUR_WAPIM_TOKEN',
     }
    }
  )
  .then(response => console.log(response.data))
  .catch(error => console.log(error.response.data))
PreviousLocation MessageNextDelete Message (Everyone)

Last updated 2 years ago