POST
/api/groups
Creates a new WhatsApp group with a given name and a list of participants.
Create a new group
Creates a new WhatsApp group with a given name and a list of participants.
Parameters
Name | Type | Required | Description |
---|---|---|---|
name | string | Yes | The name of the group to be created. |
participants | string[] | No | An array of participant JIDs to add to the group. |
Code Examples
curl -X POST "https://www.wasenderapi.com/api/groups" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "My New Group", "participants": ["[email protected]", "[email protected]"]}'
Response Examples
[
{
"title": "Success Response",
"code": {
"success": true,
"data": {
"id": "[email protected]",
"owner": "[email protected]",
"subject": "My New Group",
"creation": 1678886400,
"participants": [
{
"id": "[email protected]",
"admin": "superadmin"
},
{
"id": "[email protected]",
"admin": null
},
{
"id": "[email protected]",
"admin": null
}
]
}
}
}
]