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

# Emergency access

> A role on one of the project's spaces for the caller, at once, for at most four hours, with a reason; the controller is told by e-mail and can end it by the link. The next token carries it.



## OpenAPI

````yaml openapi/en/control.json POST /v1/projects/{project_id}/emergency-access
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/projects/{project_id}/emergency-access:
    post:
      tags:
        - accounts
      summary: Emergency access
      description: >-
        A role on one of the project's spaces for the caller, at once, for at
        most four hours, with a reason;

        the controller is told by e-mail and can end it by the link. The next
        token carries it.


        **Authentication.** Person token issued by the control plane
        (`Authorization: Bearer <JWT>`), with the role the operation needs.
      operationId: emergency_access_v1_projects__project_id__emergency_access_post
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            format: uuid
            title: Project Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmergencyAccessRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmergencyAccess'
          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:
    EmergencyAccessRequest:
      additionalProperties: false
      properties:
        minutes:
          maximum: 240
          minimum: 1
          title: Minutes
          type: integer
        reason:
          maxLength: 1000
          minLength: 3
          title: Reason
          type: string
        role:
          enum:
            - security
            - integration
            - review
            - analysis
          title: Role
          type: string
        space_id:
          format: uuid
          title: Space Id
          type: string
      required:
        - space_id
        - role
        - reason
        - minutes
      title: EmergencyAccessRequest
      type: object
    EmergencyAccess:
      additionalProperties: false
      properties:
        approval_id:
          format: uuid
          title: Approval Id
          type: string
        role:
          title: Role
          type: string
        space_id:
          format: uuid
          title: Space Id
          type: string
        until:
          format: date-time
          title: Until
          type: string
        user_id:
          format: uuid
          title: User Id
          type: string
      required:
        - approval_id
        - user_id
        - space_id
        - role
        - until
      title: EmergencyAccess
      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

````