I can't delete nested groups

Hello! I’m trying to delete nested groups but I get an error. My code is:

deleteNestedGroups = async (groupId: string, idsToDelete: string[]) => {
        const url = `${baseGroupsUrl}/${groupId}/nested`;
        const res = await axios
                    data: idsToDelete,
                    headers: {
                        Authorization: `Bearer ${this.accessToken}`
        return res.status === 204;

The error is:

statusCode: 400
error: “Bad Request”
message: “Cannot read property ‘indexOf’ of undefined”

The string array is OK but I don’t know what is the issue.


Hi @osvald0,

Welcome to the Community!

I just tested this code and it seems to be working okay. You’re sending the idsToDelete in this format? ['1234567-7894-456-1234-123456789']

Let me know,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.