Creating WhatsApp Groups
POST/api/v2/instance/:instanceId/group
This route enables the creation of new groups on WhatsApp, where members can come together to exchange messages and share information. When creating a group, it's necessary to provide a mandatory subject for identification, as well as the option to add an optional description that provides more context about the group's purpose.
Request
Path Parameters
instanceId stringrequired
ID of the instance.
- application/json
Body
required
create
(object required):participants
(array of strings, required): A list containing the phone numbers of members who will be included in the group.subject
(string, required): The title or subject of the group, which must be provided during creation.description
(string, optional): An optional description that offers a more detailed view of the group.
create object
participants string[]required
Default value: 5531900000000,5512911111111
subject Subject
Required to group created.
description Description
Responses
- 201
- 400
- 401
- 500
GroupCreateResponse
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
id stringrequired
owner stringrequired
subject stringrequired
subjectOwner string
subjectTime number
creation string
leave number
desc string
descOwner string
descId string
restrict boolean
announce boolean
size number
participants object[]required
id stringrequired
name string
notify string
verifiedName string
imgUrl string
status string
isAdmin boolean
isSuperAdmin boolean
admin string
Default value: admin | superadmin
ephemeralDuration number
inviteCode string
{
"id": "string",
"owner": "string",
"subject": "string",
"subjectOwner": "string",
"subjectTime": 0,
"creation": "string",
"leave": 0,
"desc": "string",
"descOwner": "string",
"descId": "string",
"restrict": true,
"announce": true,
"size": 0,
"participants": [
{
"id": "string",
"name": "string",
"notify": "string",
"verifiedName": "string",
"imgUrl": "string",
"status": "string",
"isAdmin": true,
"isSuperAdmin": true,
"admin": "admin | superadmin"
}
],
"ephemeralDuration": 0,
"inviteCode": "string"
}
BadRequestException
- application/json
- Schema
- Example (from schema)
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
UnauthorizedException
- application/json
- Schema
- Example (from schema)
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
InternalServerErrorException
- application/json
- Schema
- Example (from schema)
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
Loading...