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

# Criar Magic Link

> Cria um Magic Link e envia para o aluno por e-mail

O Magic Link é uma URL única que permite o aluno acessar sua área de membros sem digitar senha.

<Note>O Magic Link expira após 24 horas.</Note>

**Não é permitido gerar Magic Links para contas administrativas.**


## OpenAPI

````yaml POST /magic-link
openapi: 3.1.0
info:
  title: OpenAPI Insight Academy
  description: Insight Academy Platform API
  version: 1.0.0
  contact:
    email: ti@whydea.com.br
    name: Insight Academy
  license:
    name: MIT
servers:
  - url: https://api.plataformainsight.com.br/v1
    description: ''
security:
  - bearerAuth: []
tags: []
paths:
  /magic-link:
    post:
      summary: Criar Magic Link
      description: Cria um Magic Link e envia para o aluno por e-mail
      operationId: postMagicLink
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMagicLinkRequestBody'
              type: object
      responses:
        '201':
          description: ''
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
                type: object
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
                type: object
components:
  schemas:
    CreateMagicLinkRequestBody:
      type: object
      properties:
        email:
          type: string
          description: Email do aluno
        redirectUrl:
          type: string
          description: URL de redirecionamento após o login
      required:
        - email
    BadRequestResponse:
      type: object
      properties:
        status:
          type: string
          examples:
            - error
        message:
          type: string
          examples:
            - Bad request
    UnauthorizedResponse:
      type: object
      properties:
        status:
          type: string
          examples:
            - error
        message:
          type: string
          examples:
            - Unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````