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

# Enviar convites



## OpenAPI

````yaml /api-reference/openapi.json post /api/management/invites
openapi: 3.0.0
info:
  title: Olie API
  version: 1.0.0
  description: >
    # Introdução 👋


    Olá! Esta é a documentação oficial da API da [olie.ai](https://olie.ai/).
    Aqui você encontra as referências e exemplos de uso dos nossos endpoints.


    Para uma visão completa, recomendamos fortemente que você leia a
    [documentação oficial](https://docs.olie.ai/api-reference/introduction). Lá
    estão detalhados tópicos essenciais como
    [autenticação](https://docs.olie.ai/api-reference/introduction/authentication),
    [estrutura de
    respostas](https://docs.olie.ai/api-reference/general/response-structure),
    [paginação](https://docs.olie.ai/api-reference/general/pagination) e outros
    guias de integração.


    No Postman, esta coleção foca nas informações específicas de cada requisição
    (endpoints, parâmetros e exemplos), servindo como apoio rápido para testes e
    desenvolvimento.
servers:
  - url: https://api.olie.ai
security:
  - BearerAuth: []
paths:
  /api/management/invites:
    post:
      tags:
        - invites
      summary: Enviar convites
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: >-
                Payload para criar um ou mais convites (um por e-mail), com
                papéis e permissões de acesso a funis.
              properties:
                emails:
                  type: array
                  description: >-
                    Lista de e-mails que receberão convite. Cada e-mail gera um
                    convite dentro da mesma requisição.
                  items:
                    type: string
                    format: email
                    description: Endereço de e-mail do convidado.
                role_ids:
                  type: array
                  description: >-
                    Lista de IDs de papéis (roles) que serão atribuídos ao
                    convidado ao aceitar o convite.
                  items:
                    type: integer
                    description: ID do papel (role) a ser associado ao convidado.
                funnel_access:
                  type: array
                  description: >-
                    Lista de permissões por funil que o convidado terá ao
                    aceitar o convite.
                  items:
                    type: object
                    description: >-
                      Configuração de acesso do convidado para um funil
                      específico.
                    properties:
                      project_funnel_id:
                        type: integer
                        description: ID do funil ao qual as permissões se aplicam.
                      index_all:
                        type: boolean
                        description: >-
                          Permite listar/visualizar todos os projetos do funil,
                          independentemente de atribuição ou autoria.
                      index_assigned:
                        type: boolean
                        description: >-
                          Permite listar/visualizar apenas os projetos do funil
                          atribuídos ao usuário.
                      index_created:
                        type: boolean
                        description: >-
                          Permite listar/visualizar apenas os projetos do funil
                          criados pelo usuário.
                      step_change:
                        type: boolean
                        description: Permite mover projetos de etapa dentro do funil.
            example:
              emails:
                - user3@example.com
                - user4@example.com
              role_ids:
                - 6
                - 1
              funnel_access:
                - project_funnel_id: 112
                  index_all: false
                  index_assigned: true
                  index_created: false
                  step_change: true
                - project_funnel_id: 42
                  index_all: false
                  index_assigned: false
                  index_created: true
                  step_change: true
                - project_funnel_id: 49
                  index_all: true
                  index_assigned: true
                  index_created: true
                  step_change: true
      responses:
        '201':
          description: Sucesso
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
              example: '*'
            Access-Control-Expose-Headers:
              schema:
                type: string
              example: '*'
            Cache-Control:
              schema:
                type: string
              example: no-cache, private
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: boolean
                  invites:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        frame_id:
                          type: string
                        email:
                          type: string
                          format: email
                        role_ids:
                          type: array
                          items:
                            type: integer
                        funnel_access:
                          type: array
                          items:
                            type: object
                            properties:
                              index_all:
                                type: boolean
                              step_change:
                                type: boolean
                              index_created:
                                type: boolean
                              index_assigned:
                                type: boolean
                              project_funnel_id:
                                type: integer
                        token:
                          type: string
                        updated_at:
                          type: string
                          format: date-time
                        created_at:
                          type: string
                          format: date-time
              example:
                response: true
                invites:
                  - id: 64
                    frame_id: 019c75de-532c-7047-9563-daf1448ca963
                    email: user4@example.com
                    role_ids:
                      - 7
                      - 1
                    funnel_access:
                      - project_funnel_id: 112
                        index_all: false
                        index_assigned: true
                        index_created: false
                        step_change: true
                      - project_funnel_id: 42
                        index_all: false
                        index_assigned: false
                        index_created: true
                        step_change: true
                      - project_funnel_id: 49
                        index_all: true
                        index_assigned: true
                        index_created: true
                        step_change: true
                    token: A45DA91B85AC7F67F5BA8F3CD0FC76E1
                    updated_at: '2026-04-29T14:06:40.000000Z'
                    created_at: '2026-04-29T14:06:40.000000Z'
                  - id: 65
                    frame_id: 019c75de-532c-7047-9563-daf1448ca963
                    email: user5@example.com
                    role_ids:
                      - 7
                      - 1
                    funnel_access:
                      - project_funnel_id: 112
                        index_all: false
                        index_assigned: true
                        index_created: false
                        step_change: true
                      - project_funnel_id: 42
                        index_all: false
                        index_assigned: false
                        index_created: true
                        step_change: true
                      - project_funnel_id: 49
                        index_all: true
                        index_assigned: true
                        index_created: true
                        step_change: true
                    token: DC40E84BF55B563D11D314D9BBB39FF2
                    updated_at: '2026-04-29T14:06:40.000000Z'
                    created_at: '2026-04-29T14:06:40.000000Z'
        '401':
          description: Não autorizado
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
              example: '*'
            Access-Control-Expose-Headers:
              schema:
                type: string
              example: '*'
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: boolean
                  message:
                    type: string
                  error:
                    type: string
              example:
                response: false
                message: unauthorized
                error: Unauthenticated.
        '422':
          description: Convite já enviado para este e-mail
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
              example: '*'
            Access-Control-Expose-Headers:
              schema:
                type: string
              example: '*'
            Cache-Control:
              schema:
                type: string
              example: no-cache, private
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: boolean
                  message:
                    type: string
                  error:
                    type: string
                  email:
                    type: string
                    format: email
              example:
                response: false
                message: invite_already_sent
                error: Invite already sent to this email for this frame
                email: user3@example.com
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````