Thumbnail
WhatsApp Business API | Self-Service

Managing and maintaining your WhatsApp Business Account is easy with tyntec’s self-service, such as our Profile API and webhook API.

 

 

WhatsApp Self Service

WhatsApp Profile API

The WhatsApp Profile API is a self-service API, allowing you to change your core company details for your WhatsApp Business Account (WABA). In your WhatsApp profile, you’ll be able to update:

  • Company logo (deletion also possible)
  • Public URL for company logo
  • About information
  • Company description
  • e-mail and contact information
  • Company address
  • Vertical/industry
  • Websites

In addition, the Profile API supports patching of single / specific information if needed.

With this API, our customers with an activated WhatsApp Business Account can change/update their information in an automated manner.

How to Get Your Current Profile

curl https://api.tyntec.com/chat-api/v2/channels/whatsapp/phone-numbers/<PHONENUMBER>/settings/profile -H 'apikey: <APIKEY>'

Response

{
    "address": "Hofmannstrasse 25 - 27, 81379 Munich, Germany",
    "description": "tyntec WhatsApp Business API Demo",
    "email": "support@tyntec.com",
    "vertical": "Professional Services",
    "websites": [
        "https://tyntec.com"
    ],
    "about": "Hey there! I am using WhatsApp."
}

How to Update Your Complete Profile

curl –XPATCH https://api.tyntec.com/chat-api/v2/channels/whatsapp/phone-numbers/<PHONENUMBER>/settings/profile -H 'apikey: <APIKEY>'  -d ‘
{
    "address": "Hofmannstrasse 25 - 27, 81379 Munich, Germany",
    "description": "tyntec WhatsApp Business API Demo",
    "email": "support@tyntec.com",
    "vertical": "Professional Services",
    "websites": [
        "https://tyntec.com"
    ],
    "about": "Hey there! I am using WhatsApp."
}

Response: 204 No-Content

Update a Part of the Profile

curl –XPATCH https://api.tyntec.com/chat-api/v2/channels/whatsapp/phone-numbers/<PHONENUMBER>/settings/profile -H 'apikey: <APIKEY>'  -d ‘
{
    "email": "support@tyntec.com",
    "vertical": "Professional Services",
    "websites": [
        "https://tyntec.com", “https://api.tyntec.com/reference”
    ]
}

Response: 204 No-Content

Webhook API

The webhook self-service API allows you to specify applications with webhooks.

In this first version, only a default application per API key is supported, without the possibilities to specify callbacks per WhatsApp Phone Number.

The requests :

The events supported :

"MoMessage",              

"MessageStatus::accepted",

"MessageStatus::delivered",

"MessageStatus::seen",

"MessageStatus::failed",

"MessageStatus::channelFailed",

"MessageStatus::deleted",

"WhatsAppGroupEvent::userJoined",

"WhatsAppGroupEvent::userLeft",

"WhatsAppGroupEvent::subjectChanged",

"WhatsAppGroupEvent::descriptionChanged"

Please note that the patch operation must define all events, any missing will be removed.

How to specify applications with webhooks

{
        "webhooks": [
               {
                "events": [
                    "MoMessage"
                ],
                "callbackUrl": "<webhook URL to receive MoMessage>"
            },
            {
                "events": [
                    "MessageStatus::accepted",
                    "MessageStatus::delivered",
                    "MessageStatus::seen",
                    "MessageStatus::failed",
                    "MessageStatus::channelFailed",
                    "MessageStatus::deleted"
                ],
                "callbackUrl": "<webhook URL to receive MessageStatus>"
            },
            {
                "events": [
                    "WhatsAppGroupEvent::userJoined",
                    "WhatsAppGroupEvent::userLeft",
                    "WhatsAppGroupEvent::subjectChanged",
                    "WhatsAppGroupEvent::descriptionChanged"
                ],
                "callbackUrl": "<webhook URL to receive WhatsAppGroupEvent>"
            }
        ]
    }