Create automated WhatsApp Group meeting events using the API

Improve engagement and invite your audience and customers to join live voice or video meeting calls on a future date directly from WhatsApp, with participants' attendance confirmation

Wassenger
8 min readOct 4, 2024

--

WhatsApp is evolving once again, and this time it’s all about making event planning seamless for businesses. The new Group Events feature initially rolling out in WhatsApp Communities offers a powerful way for companies, teams, and organizations to plan and organize virtual or in-person events directly within group chats.

Now, thanks to Wassenger, automating event creation has never been easier. Whether you’re organizing team meetings, hosting webinars, or planning customer appreciation days, Wassenger helps you set up and manage WhatsApp Group Events effortlessly. Events are pinned to the group’s info page, where participants can see who’s attending, and get all the details at a glance ensuring no message gets lost in the chat.

Businesses across industries can benefit from this feature. Schools can automate the scheduling of parent-teacher conferences, retail brands can create recurring product launch events, and service providers can easily set up workshops.

With Wassenger automating the process, WhatsApp’s Group Events feature becomes a game-changer for business efficiency, helping you stay connected and organized while improving engagement. Ready to transform your event management? Let Wassenger and WhatsApp simplify and elevate your event planning today!

🤩 🤖 Wassenger is a complete API solution for WhatsApp. Sign up for a 7-day free trial and get started in minutes!

Superpower your WhatsApp communication with Team-optimized features and automations using Wassenger

Requirements

  • To have a WhatsApp number already linked to the platform and online.
  • Group WhatsApp ID (WID) that you can find in two ways:

How to obtain the Group WhatsApp ID

You can obtain the Group WhatsApp ID by using one of these methods:

  1. Web: go to number’s settings > Groups > Copy the Group WID.
  2. API: query the available groups in your number using this endpoint.

API endpoint

We will use the following API endpoint to create a new event:

Prepare the request

Target API URL using the POST method

https://api.wassenger.com/v1/messages

Required HTTPS headers > Obtain your API key here

Content-Type: application/json
Token: $API_TOKEN

Use the body in JSON format to send the new event

{
"group": "$GROUP_ID@g.us",
"event": {
"name": "Quarterly Business Strategy Meeting",
"description": "A meeting to discuss and plan the next quarter's business strategy and key objectives.",
"date": "2024-09-15T10:00:00Z",
"location": "Head Office",
"call": "video"
}
}

🖥️ Looking for a code example? Go to the API live tester and get ready-to-use code examples in 15+ programming languages, including Python, JavaScript, PHP, C#, Java, Ruby, Go, Powershell, cURL and more.

Send events using code

Explore how to use the code in your browser without installing any software.

Also, you can find different languages you can test on Replit.com:

# Examples requires to have installed requests Python package.
# Install it by running: pip install requests

import requests

url = "https://api.wassenger.com/v1/messages"

payload = {
"group": "$GROUP_ID@g.us",
"event": {
"name": "Sales meeting",
"description": "This is a sample meeting event description, up to 2048 characters",
"location": "London HQ",
"call": "video",
"date": "2024-09-23T13:01:17.020Z"
}
}
headers = {
"Content-Type": "application/json",
"Token": "API TOKEN GOES HERE"
}

response = requests.post(url, json=payload, headers=headers, params=querystring)

print(response.json())
// Examples requires you to have installed node-fetch Node.js package.
// Install it by running: npm install --save node-fetch or yarn add node-fetch

const fetch = require('node-fetch');

const url = 'https://api.wassenger.com/v1/messages';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json', Token: 'API TOKEN GOES HERE'},
body: '{"group":"$GROUP_ID@g.us","event":{"name":"Sales meeting","description":"This is a sample meeting event description, up to 2048 characters","location":"London HQ","call":"video","date":"2024-09-23T13:01:17.020Z"}}'
};

try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const axios = require('axios').default;

const options = {
method: 'POST',
url: 'https://api.wassenger.com/v1/messages',
headers: {'Content-Type': 'application/json', Token: 'API TOKEN GOES HERE'},
data: {
group: '$GROUP_ID@g.us',
event: {
name: 'Quarterly Business Strategy Meeting',
description: 'A meeting to discuss and plan the next quarter\'s business strategy and key objectives.',
date: '2024-09-15T10:00:00Z',
location: 'Head Office - Conference Room 3A',
call: 'video'
}
}
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wassenger.com/v1/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'group' => '$GROUP_ID@g.us',
'event' => [
'name' => 'Quarterly Business Strategy Meeting',
'description' => 'A meeting to discuss and plan the next quarter\'s business strategy and key objectives.',
'date' => '2024-09-15T10:00:00Z',
'location' => 'Head Office - Conference Room 3A',
'call' => 'video'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Token: API TOKEN GOES HERE"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
// Examples requires to have installed pecl_http package, a simple and elegant HTTP client for PHP.
// Install it by running: pecl install pecl_http
// More information: https://pecl.php.net/package/pecl_http/3.2.0

<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append(json_encode([
'group' => '$GROUP_ID@g.us',
'event' => [
'name' => 'Quarterly Business Strategy Meeting',
'description' => 'A meeting to discuss and plan the next quarter\'s business strategy and key objectives.',
'date' => '2024-09-15T10:00:00Z',
'location' => 'Head Office - Conference Room 3A',
'call' => 'video'
]
]));
$request->setRequestUrl('https://api.wassenger.com/v1/messages');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
'Content-Type' => 'application/json',
'Token' => 'API TOKEN GOES HERE'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();

🤩 🤖 Wassenger is a complete API solution for WhatsApp. Sign up for a 7-day free trial and get started in minutes!

// This code requires you to have installed RestSharp package.
// Documentation: https://restsharp.dev
// Installation: https://www.nuget.org/packages/RestSharp

var client = new RestClient("https://api.wassenger.com/v1/messages");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Token", "API TOKEN GOES HERE");
request.AddParameter("application/json", "{\"group\":\"$GROUP_ID@g.us\",\"event\":{\"name\":\"Quarterly Business Strategy Meeting\",\"description\":\"A meeting to discuss and plan the next quarter's business strategy and key objectives.\",\"date\":\"2024-09-15T10:00:00Z\",\"location\":\"Head Office - Conference Room 3A\",\"call\":\"video\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
// This code uses the built-in HttpClient package in the .NET framework.
// Documentation: https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=net-6.0

using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://api.wassenger.com/v1/messages"),
Headers =
{
{ "Token", "API TOKEN GOES HERE" },
},
Content = new StringContent("{\"group\":\"$GROUP_ID@g.us\",\"event\":{\"name\":\"Quarterly Business Strategy Meeting\",\"description\":\"A meeting to discuss and plan the next quarter's business strategy and key objectives.\",\"date\":\"2024-09-15T10:00:00Z\",\"location\":\"Head Office - Conference Room 3A\",\"call\":\"video\"}}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
// This code requires you to have installed Unirest package.
// Documentation: https://kong.github.io/unirest-java/#requests
// Installation: http://kong.github.io/unirest-java/

HttpResponse<String> response = Unirest.post("https://api.wassenger.com/v1/messages")
.header("Content-Type", "application/json")
.header("Token", "API TOKEN GOES HERE")
.body("{\"group\":\"$GROUP_ID@g.us\",\"event\":{\"name\":\"Quarterly Business Strategy Meeting\",\"description\":\"A meeting to discuss and plan the next quarter's business strategy and key objectives.\",\"date\":\"2024-09-15T10:00:00Z\",\"location\":\"Head Office - Conference Room 3A\",\"call\":\"video\"}}")
.asString();

Need more? Explore all our WhatsApp Group events examples and go all in!

🤩 🤖 Wassenger is a complete communication platform and API solution for WhatsApp. Explore more than 100+ API use cases and automate anything on WhatsApp by signing up for a free trial and getting started in minutes!

Live testing using the API

Explore our API live tester

FAQs

How do group members interact with an event once it’s created?

Once an event is created, it will be shared in the group chat. Members can tap the message to respond and view event details such as time, location, and description.

Can events have co-hosts?

No, events can only be hosted by the event creator. Co-hosting is not currently supported.

Can I create events in advance if disappearing messages are turned on?

No, if disappearing messages are enabled, you might not be able to create events in advance. To use the full calendar functionality, it’s recommended to turn off disappearing messages.

Can I invite people who are not in the group to the event?

No, you can only invite group members to the event. It’s not possible to forward the event to another chat or invite non-group members.

Can new members see events created before they joined the group?

No, new members cannot see events that were created before they joined the group. To include them in the event, the original event must be deleted, and a new event should be created.

How to send messages to multiple phone numbers

You have to send multiple API requests, one per target phone number.

For instance, if you want to send a message to 10 phone numbers, you should send 10 independent HTTPS requests to the API.

There is no option to send multiple messages in a single API request.

How to validate if a phone number can receive WhatsApp messages

You can validate if a given phone number is linked to a WhatsApp account and can receive messages.

The API provides an endpoint that can validate whether a given phone number exists in WhatsApp or not.

The only requirement is to have at least one WhatsApp number connected to the platform in your current account.

For more details, please check out the API endpoint documentation here.

Before you check if a phone number exists on WhatsApp, you can also validate and normalize the format of a list of phone numbers by using the numbers validator API endpoint. This endpoint only validates the correct E164 format, but it does not check whether the phone number effectively exists on WhatsApp.

Note: The number of WhatsApp check validations is limited per month based on your subscription plan. Please check out the pricing table for more details about the limits.

Looking for more answers? Check out the extended FAQs.

Further useful resources

API Documentation

For more details about the endpoint API, please check the documentation where you will find all the details about the accepted request params, possible success or error responses and ready-to-use code examples in multiple programming languages:

https://app.wassenger.com/docs/#tag/Messages/operation/createMessage

🤩 🤖 Wassenger is a complete API solution for WhatsApp. Sign up for a 7-day free trial and get started in minutes!

--

--

Wassenger
Wassenger

Written by Wassenger

WhatsApp API + Team Chat + CRM + AI Assistant Solution for smart Businesses and Teams. Automate and work more productively with your clients on WhatsApp!

No responses yet