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

# Encerrar Sessão do Usuário

> Use este endpoint para encerrar a sessão do usuário e revogar tokens ativos, garantindo um logout seguro e completo da aplicação.



## OpenAPI

````yaml pt/openapi/v3-current/AM-auth.yaml post /v1/logout
openapi: 3.1.0
info:
  title: Plugin de Autenticação
  description: ''
  version: 2.6.7
servers:
  - url: https://auth.sandbox.lerian.net
security: []
tags:
  - name: API de Autenticação
  - name: API de MFA
  - name: API de Informações do Usuário
  - name: API de Autorização
paths:
  /v1/logout:
    post:
      tags:
        - API de Autenticação
      summary: Encerrar Sessão do Usuário
      description: >-
        Use este endpoint para encerrar a sessão do usuário e revogar tokens
        ativos, garantindo um logout seguro e completo da aplicação.
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id_token_hint:
                  description: >-
                    O identificador único de um token de autenticação anterior,
                    usado para identificar a sessão do usuário durante o logout.
                  type: string
                  example: 019c96a0-10ce-75fc-a273-dc799079a99c
              required:
                - id_token_hint
      responses:
        '204':
          description: Se a requisição for bem-sucedida, você receberá uma resposta vazia.
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0001:
                  $ref: '#/components/examples/Error0001'
                Error0003:
                  $ref: '#/components/examples/Error0003'
                Error0009:
                  $ref: '#/components/examples/Error0009'
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0007:
                  $ref: '#/components/examples/Error0007'
          headers: {}
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0008:
                  $ref: '#/components/examples/Error0008'
          headers: {}
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0005:
                  $ref: '#/components/examples/Error0005'
          headers: {}
      security: []
components:
  schemas:
    ErrorMessage:
      description: A mensagem de erro da resposta.
      type: object
      properties:
        code:
          type: string
          description: Um identificador único e estável para o erro.
        title:
          type: string
          description: Um breve resumo do problema.
        message:
          type: string
          description: Orientação detalhada para resolver o erro.
  examples:
    Error0001:
      summary: Missing Fields in Request
      value:
        code: AUT-0001
        title: Missing Fields in Request
        message: >-
          Your request is missing one or more required fields. Please refer to
          the documentation to ensure all necessary fields are included in your
          request.
    Error0003:
      summary: Unexpected Fields in the Request
      value:
        code: AUT-0003
        title: Unexpected Fields in the Request
        message: >-
          The request body contains more fields than expected. Please send only
          the allowed fields as per the documentation. The unexpected fields are
          listed in the fields object.
    Error0009:
      summary: Bad Request
      value:
        code: AUT-0009
        title: Bad Request
        message: >-
          The server could not understand the request due to malformed syntax.
          Please check the listed fields and try again.
    Error0007:
      summary: Invalid Token
      value:
        code: AUT-0007
        title: Invalid Token
        message: >-
          The provided token is expired, invalid or malformed. Please provide a
          valid token and try again.
    Error0008:
      summary: Permission Enforcement Error
      value:
        code: AUT-0008
        title: Permission Enforcement Error
        message: >-
          The enforcer is not configured properly. Please contact your
          administrator if you believe this is an error.
    Error0005:
      summary: Internal Server Error
      value:
        code: AUT-0005
        title: Internal Server Error
        message: >-
          The server encountered an unexpected error. Please try again later or
          contact support.

````