> ## 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.

# Preview an approval link

> What the public page shows the approver before the code: what is asked, by whom and until when. An unknown, used or expired link answers 401 alike.



## OpenAPI

````yaml openapi/en/control.json POST /v1/approvals/link/preview
openapi: 3.1.0
info:
  title: Niadra control API
  version: '1'
  description: >-
    Tenants, projects, sources, keys, people, configuration and usage. It never
    receives customer content.
servers:
  - url: https://control.api.niadra.com
security: []
paths:
  /v1/approvals/link/preview:
    post:
      tags:
        - accounts
      summary: Preview an approval link
      description: >-
        What is asked and by whom, before the code. 401 alike for an unknown,
        used or expired link.


        **Authentication.** No authentication.
      operationId: preview_approval_v1_approvals_link_preview_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalView'
          description: Successful Response
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security: []
components:
  schemas:
    LinkRequest:
      additionalProperties: false
      properties:
        token:
          maxLength: 128
          minLength: 20
          title: Token
          type: string
      required:
        - token
      title: LinkRequest
      type: object
    ApprovalView:
      additionalProperties: false
      description: >-
        What the public page shows the controller's approver before the code
        from the e-mail.
      properties:
        attempts_left:
          title: Attempts Left
          type: integer
        code_expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Code Expires At
        codes_left:
          title: Codes Left
          type: integer
        expires_at:
          format: date-time
          title: Expires At
          type: string
        kind:
          enum:
            - purposes
            - policy_loosening
            - retention
            - operators
            - transfer
            - access_review
            - emergency_access
            - ripd
          title: Kind
          type: string
        project_name:
          title: Project Name
          type: string
        requested_by:
          description: The tenant that asked, by name.
          title: Requested By
          type: string
      required:
        - kind
        - project_name
        - requested_by
        - expires_at
        - codes_left
        - attempts_left
      title: ApprovalView
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      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

````