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

# Set Info Admin Only

> Configure if only admins can edit group information

## Description

This endpoint allows configuring if only admins can edit group information (name, description, picture).

## URL Parameters

<ParamField path="session" type="string" required>
  WhatsApp unique session ID
</ParamField>

<ParamField path="id" type="string" required>
  ID of the group in format `120363XXXXX@g.us`
</ParamField>

## Body

```json theme={null}
{
  "locked": true
}
```

### Body Parameters

| Property | Type      | Required | Description                                                                  |
| -------- | --------- | -------- | ---------------------------------------------------------------------------- |
| `locked` | `boolean` | ✅ Yes    | `true` to restrict editing to admins only, `false` to allow all participants |

## Response

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true,
    "message": "Configuration updated successfully"
  }
  ```
</ResponseExample>

## Status Codes

* `200` - Configuration updated successfully
* `400` - Invalid parameters
* `401` - Unauthorized
* `403` - No permission (admins only)
* `404` - Group not found

## Usage Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT https://api.wappfy.com.br/api/my-session/groups/120363XXXXX@g.us/settings/security/info-admin-only \
    -H "Content-Type: application/json" \
    -d '{
      "locked": true
    }'
  ```

  ```javascript JavaScript theme={null}
  const session = 'my-session';
  const groupId = '120363XXXXX@g.us';
  const response = await fetch(`https://api.wappfy.com.br/api/${session}/groups/${groupId}/settings/security/info-admin-only`, {
    method: 'PUT',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      locked: true
    })
  });
  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  session = 'my-session'
  group_id = '120363XXXXX@g.us'
  response = requests.put(
    f'https://api.wappfy.com.br/api/{session}/groups/{group_id}/settings/security/info-admin-only',
    json={'locked': True}
  )
  data = response.json()
  print(data)
  ```
</CodeGroup>


## OpenAPI

````yaml viewer-en.json put /api/{session}/groups/{id}/settings/security/info-admin-only
openapi: 3.1.0
info:
  title: Wappfy - WhatsApp HTTP API
  version: '2.0'
  contact: {}
servers:
  - url: https://{host}
    description: Customizable Server
    variables:
      host:
        default: api.wappfy.com.br
        description: Server URL (e.g., api.wappfy.com.br or your-server.com)
security:
  - api_key: []
tags:
  - name: 🖥️ Sessions
    description: Control WhatsApp sessions (accounts)
  - name: 🔑 Auth
    description: Authentication
  - name: 🆔 Profile
    description: Your profile information
  - name: 🖼️ Screenshot
    description: Get WhatsApp screenshot and display QR code
  - name: 📤 Chatting
    description: Conversation methods
  - name: 📢 Channels
    description: Channels (newsletters) methods
  - name: 🟢 Status
    description: Status (aka stories) methods
  - name: 💬 Chats
    description: Conversations methods
  - name: 👤 Contacts
    description: |-
      Contacts methods.<br>
                      Use phone number (without +) or phone number and `@c.us` at the end as `contactId`.<br>
                      E.g: `12312312310` OR `12312312310@c.us`<br>
  - name: 👥 Groups
    description: Groups methods.<br>
  - name: ✅ Presence
    description: Presence information
  - name: 📅 Events
    description: Event Message
  - name: 🏷️ Labels
    description: Labels - available only for WhatsApp Business accounts
  - name: 🔍 Observability
    description: Other methods
  - name: 🗄️ Storage
    description: Storage methods
externalDocs:
  description: Wappfy - WhatsApp API
  url: https://docs.wappfy.com.br/
paths:
  /api/{session}/groups/{id}/settings/security/info-admin-only:
    put:
      tags:
        - 👥 Groups
      summary: Update group admins only info settings
      description: >-
        You can allow only admins to edit group info (title, description,
        photo). The {session} parameter must be the session.
      operationId: GroupsController_setInfoAdminOnly
      parameters:
        - name: id
          required: true
          in: path
          description: ID do Grupo
          example: 123123123@g.us
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SettingsSecurityChangeInfo'
      responses:
        '200':
          description: ''
      security:
        - api_key: []
components:
  schemas:
    SettingsSecurityChangeInfo:
      type: object
      properties:
        adminsOnly:
          type: boolean
          default: true
      required:
        - adminsOnly
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: apikey
      description: Your Wappfy API key (get it at dash.wappfy.com.br)

````