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

# Access history

> Who changed the access of a person, what and why.



## OpenAPI

````yaml openapi/en/control.json GET /v1/users/{user_id}/history
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/users/{user_id}/history:
    get:
      summary: Access history
      description: >-
        What changed in the person's access, newest first: invitations, roles,
        deactivation, second factor

        resets and what the tenant's SSO did at a sign-in, with who and why.


        **Authentication.** Person token issued by the control plane
        (`Authorization: Bearer <JWT>`), with the role the operation needs.
      operationId: access_history_v1_users__user_id__history_get
      parameters:
        - in: path
          name: user_id
          required: true
          schema:
            format: uuid
            title: User Id
            type: string
          example: 0192f0a0-4e5f-7061-9c72-8d9e0f1a2b35
        - in: query
          name: limit
          required: false
          schema:
            default: 50
            maximum: 200
            minimum: 1
            title: Limit
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AccessChangeOut'
                title: Response Access History V1 Users  User Id  History Get
                type: array
              example:
                - change_id: 0192f8e5-93a4-75b6-8fc7-3c4d5e6f7a91
                  kind: deactivated
                  at: '2026-09-24T18:00:00Z'
                  user_id: 0192f0a0-4e5f-7061-9c72-8d9e0f1a2b35
                  actor_id: 0192f0a0-4e5f-7061-9c72-8d9e0f1a2b34
                  reason: Left the company on 2026-09-24
                  detail: {}
                - change_id: 0192f7b2-6071-7283-9e94-0f1a2b3c4d56
                  kind: roles_changed
                  at: '2026-09-10T14:00:00Z'
                  user_id: 0192f0a0-4e5f-7061-9c72-8d9e0f1a2b35
                  actor_id: 0192f0a0-4e5f-7061-9c72-8d9e0f1a2b34
                  reason: Rui now also reviews samples in production
                  detail:
                    before:
                      - role: security
                        space_id: null
                        source_ids: []
                    after:
                      - role: security
                        space_id: null
                        source_ids: []
                      - role: review
                        space_id: 0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23
                        source_ids: []
          description: The changes, newest first.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - personToken: []
components:
  schemas:
    AccessChangeOut:
      additionalProperties: false
      properties:
        actor_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: >-
            Who made the change; null when the tenant's identity provider made
            it at a sign-in.
          title: Actor Id
        at:
          format: date-time
          title: At
          type: string
        change_id:
          format: uuid
          title: Change Id
          type: string
        detail:
          additionalProperties: true
          title: Detail
          type: object
        kind:
          $ref: '#/components/schemas/AccessChangeKind'
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        user_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: User Id
      required:
        - change_id
        - kind
        - at
        - user_id
        - actor_id
        - reason
        - detail
      title: AccessChangeOut
      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
    AccessChangeKind:
      enum:
        - invited
        - invitation_accepted
        - roles_changed
        - deactivated
        - reactivated
        - second_factor_reset
        - sso_person_created
        - sso_roles_synced
        - sso_saved
        - sso_removed
      title: AccessChangeKind
      type: string
  securitySchemes:
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````