Create group

Create a new WhatsApp group with specified name and participants.

POST
https://api.wawp.net/v2/groups?instance_id=123456789&access_token=123456789&name=New+Project&participants=%5B%7B%22id%22%3A%221234567890%40c.us%22%7D%5D

Authentication Required

Login to swap the placeholders with your real Instance ID and Access Token.

Log In
Test /v2/groups/create endpoint
POST
POST

No query parameters required

This endpoint doesn't expect data in the URL.

Best practices

  • Always store the returned @g.us ID immediately.

  • Send a welcome message explaining the group's purpose as soon as it is created.

  • Limit initial participants to known contacts to avoid spam reports.

Request Parameters

Configure the parameters required to interact with this endpoint. All query and body arguments are listed below with their details.

Request Body

Sent as a JSON object
string

Your unique WhatsApp Instance ID

Example:
string

Your API Access Token

Example:
string

Name of the group

Example:
array

List of participant JIDs to add to the group

Example:

Request Samples

Use these ready-to-go code snippets to integrate our API into your project quickly and efficiently. Choose your preferred language and library.

1const baseUrl = "https://api.wawp.net";
2const endpoint = "/v2/groups";
3const params = new URLSearchParams({
4 "instance_id": "123456789",
5 "access_token": "123456789"
6}).toString();
7const body = {
8 "name": "New Project",
9 "participants": [
10 {
11 "id": "1234567890@c.us"
12 }
13 ]
14};
15
16fetch(`${baseUrl}${endpoint}${params ? '?' + params : ''}`, {
17 method: "POST",
18 headers: { "Content-Type": "application/json" },
19 body: JSON.stringify(body)
20})
21 .then(async (response) => {
22 if (response.ok) {
23 const data = await response.json();
24 console.log("Success:", data);
25 return data;
26 }
27
28 // Error Handling
29 if (response.status === 401) {
30 console.error("Error 401: Unauthorized - Invalid or Missing Access Token");
31 }
32 if (response.status === 400) {
33 console.error("Error 400: Bad Request - Invalid Parameter Format");
34 }
35 if (response.status === 500) {
36 console.error("Error 500: Internal Server Error - Unexpected Failure");
37 }
38
39 const errorText = await response.text();
40 console.error(`Error ${response.status}: ${errorText}`);
41 })
42 .catch((error) => console.error("Network Error:", error));
Interactive Samples
Ln 42, Col 1javascript

Expected Responses

Explore all possible responses and outcomes from the server. We have documented each status code with data examples to make success and error handling easier.

Group created successfully
Bad Request - Invalid Parameter Format
Unauthorized - Invalid or Missing Access Token
Internal Server Error - Unexpected Failure
Previous TopicGet All List groups
Next TopicJoin group / Get join info

Command Palette

Search for a command to run...