Skip to content

UpdateGroupName#

Beta version

The functionality is in beta. Features may change and may also work unstably.

Test

The method changes the name of a group chat.

The method uses the limits on the number of requests per second.

Request#

To change the name of a group, you have to execute a request at:

POST
{{apiUrl}}/waInstance{{idInstance}}/updateGroupName/{{apiTokenInstance}}

For apiUrl, idInstance and apiTokenInstance request parameters, refer to the Before you start section.

Request parameters#

Parameter Type Mandatory Description
chatId string Yes The identifier of the group chat
groupName string Yes The new name of the group. The maximum length is 100 characters

Request body example#

{
    "chatId": "340282366841710300949128174631143137232",
    "groupName": "The new name"
}

Response#

Response parameters#

Field Type Description
updateGroupName boolean The flag of the group name being changed

Response body example#

{
    "updateGroupName": true
}

UpdateGroupName errors#

For a list of errors common to all methods, refer to the Common errors section

HTTP code Error ID Description
400 Bad Request
Validation failed
Validation error
400 Validation failed. Details:
'groupName' is required
The name of the group is not passed
400 Validation failed. Details:
'groupName' is not allowed to be empty
An empty name of the group is passed
400 Validation failed. Details:
'groupName' length must be less than or equal to 100 characters long
The name is longer than 100 characters
200 "updateGroupName": false The name is not changed: Instagram rejected the request.
Possible reasons:
- the group is not found
- the instance account has no rights for this action in the group

Request examples#

import requests

url = "{{apiUrl}}/waInstance{{idInstance}}/updateGroupName/{{apiTokenInstance}}"

payload = {
    "chatId": "340282366841710300949128174631143137232",
    "groupName": "The new name"
}
headers = {'Content-Type': 'application/json'}

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

print(response.text.encode('utf8'))
curl --location '{{apiUrl}}/waInstance{{idInstance}}/updateGroupName/{{apiTokenInstance}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "chatId": "340282366841710300949128174631143137232",
    "groupName": "The new name"
}'