curl --request POST \
--url https://api.enviaai.app/v1/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instanceId": "<string>",
"name": "<string>",
"participants": [
{}
],
"description": "<string>"
}
'{
"success": true,
"data": {
"id": "[email protected]",
"name": "Projeto Alpha",
"participantsCount": 3,
"isAdmin": true
}
}
Crie um novo grupo no WhatsApp
curl --request POST \
--url https://api.enviaai.app/v1/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instanceId": "<string>",
"name": "<string>",
"participants": [
{}
],
"description": "<string>"
}
'{
"success": true,
"data": {
"id": "[email protected]",
"name": "Projeto Alpha",
"participantsCount": 3,
"isAdmin": true
}
}
const group = await client.groups.create({
instanceId: 'inst_abc123',
name: 'Projeto Alpha',
description: 'Grupo do projeto',
participants: [
'5511999999999',
'5511988888888'
]
});
console.log('Grupo criado:', group.id);
{
"success": true,
"data": {
"id": "[email protected]",
"name": "Projeto Alpha",
"participantsCount": 3,
"isAdmin": true
}
}