Sending messages through WhatsApp API

Sending messages through WhatsApp API

Introduction

Message API calls are sent to the /v1/messages endpoint regardless of message type, but the content of the JSON message body differs for each type of message (text, image, etc.). See the following documentation for information regarding the type of messages you want to send:

Send a message

Make sure you meet the messaging prerequisites and query the /v1/contacts endpoint for each number you want to send a template to. Otherwise, you will experience "Resource not found - unknown contact" errors.

In order to check contact availability, you can make the next request:

  • URL: https://waba.mindbehind.com/v1/contacts
  • Method: POST
  • Headers:
    • Content-Type: should be "application/json" and it's required
    • MB-API-KEY: authorization key, and it's required
  • Body Parameters:


In order to send a message, just use the next request URL and the following body parameters.

  • URL: https://waba.mindbehind.com/v1/messages
  • Method: POST
  • Headers:
    • Content-Type: should be "application/json" and it's required
    • MB-API-KEY: authorization key, and it's required
  • Body Parameters:


While we are using the native WhatsApp API, you can check the request details and parameters from WhatsApp API documentation / Messaging.

You can also get more details about error messages from WhatsApp API documentation / Error Messages.


    • Related Articles

    • Use of WhatsApp sandbox API

      We provide a developer-friendly test environment, for anyone who wants to check out the usage of our WhatsApp API. The WhatsApp API allows for direct-like access to the WhatsApp Business API. Sandbox Base Path: https://waba-sandbox.mindbehind.com ...
    • WhatsApp Cloud API

      Currently, MindBehind has support for two types of WhatsApp accounts. On-Prem and Cloud API. Cloud API is a feature where Meta will be storing the WhatsApp account details and numbers, for user interested in using Cloud API number kindly register on ...
    • Integrating WhatsApp Business API with Dialogflow

      Personalized Dialogflow Assistant Dialogflow application is a Google framework that provides NLP / NLU (Natural Language Processing / Natural Language Understanding). Dialogflow enables you to create an Intelligent Assistant and manage what the ...
    • Authorizing requests to WhatsApp API

      Introduction Every request to the WhatsApp API needs to be authorized using an API Key authentication. Adding the MB-API-KEY in the header with your unique API Key as a value is enough to gain permission. Every API Key is connected with one phone ...
    • WhatsApp Business API: How to Migrate Your Phone Number from WhatsApp Business APP

      It's possible to migrate to WhatsApp Business API from WhatsApp Business APP. Here, you can find all the details that Facebook provides. This action is irreversible. The WhatsApp Business App that you own already cannot be used once migrated to ...