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

# Abrir o documento

> O documento a decidir, depois do código: o resumo e, num relatório de impacto, o Markdown. Um código errado é 401 e conta; o quinto fecha o link.



## OpenAPI

````yaml openapi/pt/control.json POST /v1/approvals/link/open
openapi: 3.1.0
info:
  title: API de controle da Niadra
  version: '1'
  description: >-
    Tenants, projetos, fontes, chaves, pessoas, configuração e uso. Nunca recebe
    conteúdo de cliente.
servers:
  - url: https://control.api.niadra.com
security: []
paths:
  /v1/approvals/link/open:
    post:
      tags:
        - accounts
      summary: Abrir o documento
      description: >-
        O documento a decidir. Um código errado é 401 e conta; o quinto fecha o
        link.


        **Autenticação.** Sem autenticação.
      operationId: open_approval_v1_approvals_link_open_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CodeRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalDocument'
          description: Resposta de sucesso.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: O pedido não bate com o contrato.
      security: []
components:
  schemas:
    CodeRequest:
      additionalProperties: false
      properties:
        code:
          maxLength: 12
          minLength: 4
          title: Code
          type: string
        token:
          maxLength: 128
          minLength: 20
          title: Token
          type: string
      required:
        - token
        - code
      title: CodeRequest
      type: object
    ApprovalDocument:
      additionalProperties: false
      description: O que o aprovador decide, depois do código.
      properties:
        approval_id:
          format: uuid
          title: Approval Id
          type: string
        document_hash:
          title: Document Hash
          type: string
        kind:
          enum:
            - purposes
            - policy_loosening
            - retention
            - operators
            - transfer
            - access_review
            - emergency_access
            - ripd
          title: Kind
          type: string
        markdown:
          anyOf:
            - type: string
            - type: 'null'
          description: O relatório de impacto, em `ripd`.
          title: Markdown
        project_name:
          title: Project Name
          type: string
        summary:
          additionalProperties: true
          title: Summary
          type: object
      required:
        - approval_id
        - kind
        - project_name
        - document_hash
      title: ApprovalDocument
      type: object
    Problem:
      additionalProperties: false
      description: >-
        Detalhes do problema no formato da RFC 9457; `code` vem do catálogo de
        erros versionado.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object

````