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

# List accesses

> Returns the installation's accesses in order of arrival to Federal Access (`received_at`), paged with a cursor. Requires the `accesses:read` scope. To sync without missing accesses, follow the Sync accesses guide.



## OpenAPI

````yaml https://apex.federalaccess.cl/public/v1/openapi.yaml get /public/v1/accesses
openapi: 3.0.1
info:
  title: Federal Access Public API
  version: v1
  description: >
    Public API for third-party integrations with Federal Access.


    **Authentication.** Send your API key as `Authorization: Bearer <key>`. Each
    endpoint requires a scope, named in its description.


    **Errors.** Errors share one JSON envelope: `{ "error": { "code", "message",
    "request_id", "details" } }`. `details` appears only on some errors. Unknown
    paths answer 404 with code `not_found`, and malformed request bodies answer
    400 with code `bad_request`.


    **Rate limiting.** Requests are rate-limited per installation. Going over
    the limit answers 429 with a `Retry-After` header.
servers:
  - url: https://apex.federalaccess.cl
    description: Production
security: []
paths:
  /public/v1/accesses:
    get:
      tags:
        - Accesses
      summary: List accesses
      description: >-
        Returns the installation's accesses in order of arrival to Federal
        Access (`received_at`), paged with a cursor. Requires the
        `accesses:read` scope. To sync without missing accesses, follow the Sync
        accesses guide.
      operationId: listAccesses
      parameters:
        - name: cursor
          in: query
          required: false
          description: >-
            Opaque cursor: the `next_cursor` of the previous response. Without
            it, the list starts at the beginning of the history. Send the same
            filters for the whole traversal.
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: >-
            Page size. Default 500, maximum 1000 (larger values are capped to
            1000)
          schema:
            type: integer
        - name: occurred_from
          in: query
          required: false
          description: >-
            Inclusive lower bound of `occurred_at` (ISO 8601 date or date-time).
            Without a time zone, it's read in America/Santiago.
          schema:
            type: string
        - name: occurred_to
          in: query
          required: false
          description: >-
            Exclusive upper bound of `occurred_at` (ISO 8601 date or date-time).
            Without a time zone, it's read in America/Santiago.
          schema:
            type: string
        - name: site_ids[]
          in: query
          required: false
          schema:
            type: array
            items:
              type: integer
          explode: true
          description: Only accesses of these sites (up to 500 ids)
        - name: direction
          in: query
          required: false
          schema:
            type: string
            enum:
              - entry
              - exit
          description: Only accesses in this direction
        - name: visitor_type
          in: query
          required: false
          schema:
            type: string
            enum:
              - member
              - habitual
              - invite
              - occasional
          description: Only accesses of this kind of visitor
      responses:
        '200':
          description: A page of accesses
          content:
            application/json:
              example:
                data:
                  - id: 9001
                    occurred_at: '2026-03-10T12:00:00.000-03:00'
                    received_at: '2026-03-10T12:00:02.123-03:00'
                    direction: entry
                    visitor_type: member
                    access_type: vehicular
                    visitor_name: Ana Pérez
                    license_plate: ABCD12
                    site:
                      id: 7
                      name: Depto 101
                    user_id: 55
                    invitation_id: null
                    passengers:
                      - first_name: Luis
                        last_name: Soto
                    source:
                      type: lpr
                      id: 3
                      name: Lector portón
                    free_access: false
                    mfa: false
                has_more: false
                next_cursor: eyJ2IjoxLCJpZCI6OTAwMX0
              schema:
                $ref: '#/components/schemas/AccessListResponse'
        '400':
          description: >-
            Invalid parameter: a malformed cursor, limit, date, site id,
            direction or visitor type
          content:
            application/json:
              example:
                error:
                  code: invalid_parameter
                  message: 'direction must be one of: entry, exit'
                  request_id: 7f3c1d2e-4b5a-4c6d-8e9f-0a1b2c3d4e5f
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            Unauthorized. Every authentication failure answers this same
            response.
          headers:
            WWW-Authenticate:
              schema:
                type: string
                example: Bearer realm="public_api"
              description: Always present on a 401
          content:
            application/json:
              example:
                error:
                  code: unauthorized
                  message: Invalid or missing API key.
                  request_id: 7f3c1d2e-4b5a-4c6d-8e9f-0a1b2c3d4e5f
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Forbidden: the API key lacks the `accesses:read` scope, or the
            installation is inactive
          content:
            application/json:
              examples:
                missing_scope:
                  summary: The key lacks the required scope
                  value:
                    error:
                      code: forbidden
                      message: >-
                        Forbidden. The API key lacks the required scope:
                        accesses:read.
                      request_id: 7f3c1d2e-4b5a-4c6d-8e9f-0a1b2c3d4e5f
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    AccessListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Access'
        has_more:
          type: boolean
          description: >-
            `true`: more accesses are available now, keep paging. `false`: none
            for now; repeat the request later with the same `next_cursor`.
        next_cursor:
          type: string
          description: >-
            Always present. Send it as `cursor` in the next request. It can
            advance on an empty page, so always store the latest one. Only use
            cursors issued by the API.
      required:
        - data
        - has_more
        - next_cursor
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: unauthorized
              description: Stable, machine-readable error code
            message:
              type: string
              example: Invalid or missing API key.
              description: Human-readable message
            request_id:
              type: string
              example: 7f3c1d2e-4b5a-4c6d-8e9f-0a1b2c3d4e5f
              description: The request's X-Request-Id, useful when contacting support
            details:
              type: object
              additionalProperties: true
              example:
                retry_after: 600
              description: Extra information, present only on some errors
          required:
            - code
            - message
            - request_id
      required:
        - error
    Access:
      type: object
      properties:
        id:
          type: integer
          example: 9001
          description: Access identifier
        occurred_at:
          type: string
          format: date-time
          description: When the access happened at the gate
        received_at:
          type: string
          format: date-time
          description: >-
            When the access reached the cloud. The list is ordered by this
            arrival, not by occurred_at
        direction:
          type: string
          enum:
            - entry
            - exit
          description: Direction of the access
        visitor_type:
          type: string
          enum:
            - member
            - habitual
            - invite
            - occasional
          description: Kind of person that accessed
        access_type:
          type: string
          enum:
            - vehicular
            - pedestrian
          description: Vehicular when there is a license plate
        visitor_name:
          type: string
          nullable: true
          description: Name of the person, null when it cannot be resolved
        license_plate:
          type: string
          nullable: true
          example: ABCD12
          description: License plate, if vehicular
        site:
          type: object
          nullable: true
          description: Site visited, null for accesses without a site
          properties:
            id:
              type: integer
              example: 7
              description: Site identifier
            name:
              type: string
              example: Depto 101
              description: Site name
          required:
            - id
            - name
        user_id:
          type: integer
          nullable: true
          description: Identifier of the user, for members and habitual visitors
        invitation_id:
          type: integer
          nullable: true
          description: Identifier of the invitation used, if any
        passengers:
          type: array
          description: Passengers of the access
          items:
            type: object
            properties:
              first_name:
                type: string
                nullable: true
                description: Passenger first name
              last_name:
                type: string
                nullable: true
                description: Passenger last name
            required:
              - first_name
              - last_name
        source:
          type: object
          nullable: true
          description: Device or button that registered the access
          properties:
            type:
              type: string
              enum:
                - qr
                - faceid
                - lpr
                - pda_button
                - client_button
                - other
              description: Kind of source; `other` for a kind this version does not know
            id:
              type: integer
              example: 3
              description: Source identifier
            name:
              type: string
              example: Lector portón
              description: Source name
          required:
            - type
            - id
            - name
        free_access:
          type: boolean
          description: Whether the access did not require a site
        mfa:
          type: boolean
          description: Whether the access used multi-factor authentication
      required:
        - id
        - occurred_at
        - received_at
        - direction
        - visitor_type
        - access_type
        - visitor_name
        - license_plate
        - site
        - user_id
        - invitation_id
        - passengers
        - source
        - free_access
        - mfa
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'API key sent as `Authorization: Bearer <key>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.