> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oxenty.api.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Promover/Rebaixar

> Promove ou rebaixa participantes de um grupo

Gerencia o papel de participantes em um grupo (admin ou membro comum).

## Promover para Admin

<api method="POST" path="/api/groups/participants/promote" />

Promove um ou mais participantes para admin do grupo.

### Request Body

<ParamField body="sessionId" type="string" required>
  ID da sessão WhatsApp.
</ParamField>

<ParamField body="groupJid" type="string" required>
  JID do grupo.
</ParamField>

<ParamField body="participants" type="string[]" required>
  Array de JIDs dos participantes a promover.
</ParamField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X POST "https://api.oxenty.api.br/api/groups/participants/promote" \
    -H "X-API-Key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "sessionId": "550e8400-e29b-41d4-a716-446655440000",
      "groupJid": "123456789@g.us",
      "participants": ["5511999999999@s.whatsapp.net"]
    }'
  ```

  ```typescript TypeScript theme={"system"}
  await client.groups.promoteParticipants({
    sessionId: '550e8400-e29b-41d4-a716-446655440000',
    groupJid: '123456789@g.us',
    participants: ['5511999999999@s.whatsapp.net'],
  });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={"system"}
  {
    "success": true,
    "results": [
      {
        "jid": "5511999999999@s.whatsapp.net",
        "status": "promoted"
      }
    ]
  }
  ```
</ResponseExample>

***

## Rebaixar Admin

<api method="POST" path="/api/groups/participants/demote" />

Rebaixa admins para membros comuns.

```bash theme={"system"}
curl -X POST "https://api.oxenty.api.br/api/groups/participants/demote" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sessionId": "550e8400-e29b-41d4-a716-446655440000",
    "groupJid": "123456789@g.us",
    "participants": ["5511999999999@s.whatsapp.net"]
  }'
```

```json theme={"system"}
{
  "success": true,
  "results": [
    {
      "jid": "5511999999999@s.whatsapp.net",
      "status": "demoted"
    }
  ]
}
```

<Note>
  Você precisa ser admin do grupo para promover ou rebaixar participantes.
</Note>
