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

# Criar grupo

> O endpoint `/group` permite a criação de um novo grupo na plataforma Interacto. Este endpoint requer a especificação dos participantes do grupo e o nome do grupo que está sendo criado.



## OpenAPI

````yaml POST /group
openapi: 3.0.1
info:
  title: Interacto API
  description: API for Interacto messaging platform
  version: 1.0.0
servers:
  - url: https://api.interacto.io
security:
  - apiKeyAuth: []
paths:
  /group:
    post:
      summary: Create a new group
      description: Creates a new group with specified participants
      parameters:
        - in: header
          name: Instance-Id
          required: true
          schema:
            type: string
          description: Unique identifier for the instance
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateGroup'
      responses:
        '201':
          description: Group created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKeyAuth: []
components:
  schemas:
    CreateGroup:
      type: object
      required:
        - name
        - participants
      properties:
        name:
          type: string
          description: Name of the group
          example: My Cool Group
        participants:
          type: array
          description: List of participant phone numbers
          items:
            type: string
          example:
            - '551199999999'
            - '551188888888'
    GroupResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the created group
          example: 66c266130c991c46299dedf8
        wpId:
          type: string
          description: Id do seu grupo no Whatsapp
          example: 120363321438738644@g.us
        instanceId:
          type: string
          description: Id da instancia onde o seu grupo foi criado
          example: 66a09db606fd14660c8fc1d0
        name:
          type: string
          description: Nome que voce deu ao seu grupo
          example: My Cool Group
        image:
          type: string
          description: Url da imagem do seu grupo
          example: ''
        participants:
          type: array
          description: Participantes que estao no seu grupo
          example:
            - '551199999999'
            - '551188888888'
        admins:
          type: array
          description: Admistradores que voce delegou
          example: []
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: Authorization
      in: header
      description: API Key needed to access the endpoints

````