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

# Request an approval

> An approval request to the project's controller: a single-use link goes to its DPO's e-mail, and the answer never carries it. The kinds: purposes, policy loosening, retention, operators, transfer, access review and impact report.



## OpenAPI

````yaml openapi/en/control.json POST /v1/approvals
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:
    post:
      tags:
        - accounts
      summary: Request an approval
      description: >-
        Sends the controller's DPO a single-use link; the answer never carries
        it.


        **Authentication.** Person token issued by the control plane
        (`Authorization: Bearer <JWT>`), with the role the operation needs.
      operationId: request_approval_v1_approvals_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApprovalCreate'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Approval'
          description: Successful Response
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - personToken: []
components:
  schemas:
    ApprovalCreate:
      additionalProperties: false
      properties:
        kind:
          enum:
            - purposes
            - policy_loosening
            - retention
            - operators
            - transfer
            - access_review
            - ripd
          title: Kind
          type: string
        project_id:
          format: uuid
          title: Project Id
          type: string
        subject_ref:
          description: >-
            What is approved: a pending diff's id (`purposes`,
            `policy_loosening`, `retention`), `add:<role>:<entity id>` or
            `end:<party id>` (`operators`), the new operator's tenant id
            (`transfer`), a purpose (`ripd`); ignored for `access_review`.
          maxLength: 512
          minLength: 1
          title: Subject Ref
          type: string
      required:
        - project_id
        - kind
        - subject_ref
      title: ApprovalCreate
      type: object
    Approval:
      additionalProperties: false
      description: >-
        An approval asked of the project's controller. The link goes only to its
        DPO's e-mail.
      properties:
        approval_id:
          format: uuid
          title: Approval Id
          type: string
        decided_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Decided At
        document_hash:
          description: SHA-256 of the canonical JSON of what the controller approves.
          title: Document Hash
          type: string
        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_id:
          format: uuid
          title: Project Id
          type: string
        requested_at:
          format: date-time
          title: Requested At
          type: string
        status:
          enum:
            - pending
            - approved
            - rejected
            - expired
          title: Status
          type: string
        subject_ref:
          title: Subject Ref
          type: string
      required:
        - approval_id
        - project_id
        - kind
        - subject_ref
        - status
        - document_hash
        - requested_at
        - expires_at
      title: Approval
      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
  securitySchemes:
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````