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

# List IAM access logs

> Lists the organization's requests that IAM allowed or denied, oldest first, with the action each needed, the decision, the reason, and the roles behind it. Requests IAM does not decide are not listed. The organization owner's requests appear only when IAM refuses them, and an organization that has not enabled IAM has entries only for the seven actions a signed-in user always keeps, apart from requests sent into it from a manager organization.

A request sent into a managed organization with `X-Managed-Account-Id` is decided for its sender but listed in the managed organization's access logs, with the managed organization's ID as `user_id`. For such a request, the sender's organization lists only a refused `managed_account.impersonate`.

The time range runs from `start_time` to `end_time` and spans at most 14 days. `end_time` defaults to now, and `start_time` to 14 days before `end_time`. Pages hold up to 500 entries, 249 by default. Pass `metadata.cursors.after` as `page[after]` to get the next page.

Only the organization owner can call this endpoint. Its action is `iam_access_logs.read`. Other users and service account tokens get `403`.



## OpenAPI

````yaml /openapi/source/external/iam/iam.json get /iam/access_logs
openapi: 3.1.0
info:
  title: Telnyx API
  version: 1.0.0
  description: >-
    Identity and Access Management (IAM) decides what the users and service
    accounts of an organization may do. The organization writes roles of allow
    and deny statements over actions, gives the roles to users and service
    accounts with grants, and enables IAM so that the grants decide. This API
    manages roles and their statements, grants, the IAM setting, service
    accounts and their tokens, and the organization's API keys and their scopes.
    It also reads the action catalog, explains and simulates decisions, and
    lists access logs.


    Only the organization owner can call these endpoints. Any other user, and
    any service account token, gets `403`. Each endpoint declares an action,
    named in its description. Once IAM is enabled, a scope on one of the owner's
    API keys narrows that key, so the key can call an endpoint only when its
    scope allows the endpoint's action.


    See [IAM](https://developers.telnyx.com/docs/iam) for how decisions are
    made.
  contact:
    email: support@telnyx.com
  x-latency-category: interactive
  x-endpoint-cost: light
servers:
  - url: https://api.telnyx.com/v2
    description: Telnyx API v2
security:
  - bearerAuth: []
tags:
  - name: IAM Roles
    description: >-
      Named sets of statements that the organization gives to users and service
      accounts with grants.
  - name: IAM Role Statements
    description: The statements of a role, each allowing or denying a list of actions.
  - name: IAM Grants
    description: Which users and service accounts hold which roles.
  - name: IAM Actions
    description: The catalog of actions that routes declare and statements allow or deny.
  - name: IAM Settings
    description: Whether the organization has enabled IAM.
  - name: IAM Service Accounts
    description: Principals for workloads, such as servers, pipelines, and integrations.
  - name: IAM Service Account Tokens
    description: The credentials a service account authenticates with.
  - name: IAM API Keys
    description: The API keys of every user of the organization, the owner's included.
  - name: IAM API Key Scopes
    description: Statements on one API key that narrow what it may do.
  - name: IAM Decisions
    description: >-
      What IAM decides for a principal, explained or simulated without changing
      anything.
  - name: IAM Access Logs
    description: >-
      The requests IAM allowed or denied, with the reasons and the roles behind
      them.
paths:
  /iam/access_logs:
    get:
      tags:
        - IAM Access Logs
      summary: List IAM access logs
      description: >-
        Lists the organization's requests that IAM allowed or denied, oldest
        first, with the action each needed, the decision, the reason, and the
        roles behind it. Requests IAM does not decide are not listed. The
        organization owner's requests appear only when IAM refuses them, and an
        organization that has not enabled IAM has entries only for the seven
        actions a signed-in user always keeps, apart from requests sent into it
        from a manager organization.


        A request sent into a managed organization with `X-Managed-Account-Id`
        is decided for its sender but listed in the managed organization's
        access logs, with the managed organization's ID as `user_id`. For such a
        request, the sender's organization lists only a refused
        `managed_account.impersonate`.


        The time range runs from `start_time` to `end_time` and spans at most 14
        days. `end_time` defaults to now, and `start_time` to 14 days before
        `end_time`. Pages hold up to 500 entries, 249 by default. Pass
        `metadata.cursors.after` as `page[after]` to get the next page.


        Only the organization owner can call this endpoint. Its action is
        `iam_access_logs.read`. Other users and service account tokens get
        `403`.
      operationId: ListIamAccessLogs
      parameters:
        - name: start_time
          in: query
          required: false
          description: >-
            The start of the time range, in ISO 8601. Defaults to 14 days before
            `end_time`.
          schema:
            type: string
            format: date-time
          example: '2026-11-25T00:00:00Z'
        - name: end_time
          in: query
          required: false
          description: The end of the time range, in ISO 8601. Defaults to now.
          schema:
            type: string
            format: date-time
          example: '2026-11-26T00:00:00Z'
        - name: filter[decision]
          in: query
          required: false
          description: Keeps the allowed or the refused requests.
          schema:
            type: string
            enum:
              - allow
              - deny
          example: deny
        - name: filter[decision_reason]
          in: query
          required: false
          description: >-
            Keeps the entries with these reasons. One value, or several
            separated by commas.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: false
          example:
            - action_not_granted
        - name: filter[action]
          in: query
          required: false
          description: >-
            Keeps the entries for these actions. One value, or several separated
            by commas.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: false
          example:
            - number.delete
        - name: filter[role_id]
          in: query
          required: false
          description: >-
            Keeps the entries where these roles allowed or denied the request.
            One value, or several separated by commas.
          schema:
            type: array
            items:
              type: string
              format: uuid
          style: form
          explode: false
          example:
            - 8c4a9715-0246-4c6f-9eca-390e13bd8af0
        - name: filter[user_id]
          in: query
          required: false
          description: >-
            Keeps the requests of these users. One value, or several separated
            by commas.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: false
          example:
            - b1d7e2c4-9a3f-4e58-8c61-0f2a7d5e9b13
        - name: filter[service_account_id]
          in: query
          required: false
          description: >-
            Keeps the requests of these service accounts. One value, or several
            separated by commas.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: false
          example:
            - e6cd1ff6-6e3a-4ff3-88d5-2234142c1df2
        - name: filter[cred_id]
          in: query
          required: false
          description: >-
            Keeps the requests made with these credentials, such as an API key
            ID. One value, or several separated by commas.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: false
          example:
            - KEY019A6C2E5B7D4F1A8C3E9B0D2F4A6C8E
        - name: filter[request_id]
          in: query
          required: false
          description: >-
            Keeps the entries of these requests. One value, or several separated
            by commas.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: false
          example:
            - 7a2c9e41-0b6d-4f83-b5e1-2d9c8a6f3b07
        - name: page[size]
          in: query
          required: false
          description: The number of entries per page.
          schema:
            type: integer
            minimum: 1
            maximum: 500
            default: 249
        - name: page[after]
          in: query
          required: false
          description: The cursor of the next page, from `metadata.cursors.after`.
          schema:
            type: string
      responses:
        '200':
          description: One page of entries.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IamAccessLogsListResponse'
              example:
                data:
                  - id: 019ab4c2-7e1d-7f3a-9b2c-5d8e0f1a2b3c
                    timestamp: '2026-11-25T09:12:44.512Z'
                    request_id: 4d0b8e6a-5c1f-4e3b-9a72-8f6d1c3e5a90
                    method: POST
                    path: /v2/number_orders
                    action: number_order.create
                    decision: allow
                    decision_reason: action_allowed
                    allowed_role_ids:
                      - 8c4a9715-0246-4c6f-9eca-390e13bd8af0
                    denied_role_ids: []
                    user_id: 6e9d4c3a-2f8b-4a71-9c05-3b8e1f2d7a64
                    service_account_id: e6cd1ff6-6e3a-4ff3-88d5-2234142c1df2
                    cred_type: sat
                    cred_id: SAT01A1D0299A618C233DCFFB31B8490913
                    ip_ingress: 203.0.113.24
                    record_type: iam_access_log
                  - id: 019ab4c5-1f02-7a6b-8c3d-4e5f60718293
                    timestamp: '2026-11-25T09:30:02.087Z'
                    request_id: 7a2c9e41-0b6d-4f83-b5e1-2d9c8a6f3b07
                    method: DELETE
                    path: /v2/phone_numbers/1293384261075731499
                    action: number.delete
                    decision: deny
                    decision_reason: action_not_granted
                    allowed_role_ids: []
                    denied_role_ids: []
                    user_id: b1d7e2c4-9a3f-4e58-8c61-0f2a7d5e9b13
                    service_account_id: null
                    cred_type: apikey
                    cred_id: KEY019A6C2E5B7D4F1A8C3E9B0D2F4A6C8E
                    ip_ingress: 198.51.100.7
                    record_type: iam_access_log
                metadata:
                  cursors:
                    after: null
        '401':
          $ref: '#/components/responses/IamUnauthorized'
        '403':
          description: >-
            The caller is not the organization owner, or the scope of the
            owner's API key does not allow `iam_access_logs.read`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IamErrors'
              examples:
                not_owner:
                  summary: The caller is not the organization owner
                  value:
                    errors:
                      - code: '10010'
                        title: Authorization failed
                        detail: >-
                          You do not have permission to perform the requested
                          action on the specified resource or resources.
                        source:
                          pointer: /
                        meta:
                          url: >-
                            https://developers.telnyx.com/docs/overview/errors/10010
                key_scope:
                  summary: The scope of the owner's API key does not allow the action
                  value:
                    errors:
                      - code: '10010'
                        title: Authorization failed
                        detail: >-
                          the credential's scope does not allow
                          iam_access_logs.read
                        source:
                          pointer: /
                        meta:
                          url: >-
                            https://developers.telnyx.com/docs/overview/errors/10010
        '422':
          description: >-
            The time range is too long or reversed, or a paging or filter
            parameter is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IamErrors'
              examples:
                range:
                  summary: The time range spans more than 14 days
                  value:
                    errors:
                      - code: '10027'
                        title: Unprocessable Entity
                        detail: >-
                          The maximum time range permitted is 14 days. Number of
                          days in given range: 30
                        source:
                          pointer: /end_time
                          value: '2026-11-26T00:00:00Z'
                        meta:
                          url: >-
                            https://developers.telnyx.com/docs/overview/errors/10027
                page_size:
                  summary: '`page[size]` is out of range'
                  value:
                    errors:
                      - code: '10033'
                        title: Value outside of range
                        detail: >-
                          The 'size' parameter must be less than or equal to
                          500.
                        source:
                          pointer: /page/size
                          value: 1000
                        meta:
                          url: >-
                            https://developers.telnyx.com/docs/overview/errors/10033
        '503':
          description: Access logs are temporarily unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IamErrors'
              example:
                errors:
                  - code: '10037'
                    title: Service unavailable
                    detail: Access logs are unavailable.
                    source:
                      pointer: /iam/access_logs
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10037
components:
  schemas:
    IamAccessLogsListResponse:
      type: object
      required:
        - data
        - metadata
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/IamAccessLog'
        metadata:
          type: object
          required:
            - cursors
          properties:
            cursors:
              type: object
              required:
                - after
              properties:
                after:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Pass it as `page[after]` to get the next page. `null` when
                    the page holds fewer entries than `page[size]`.
    IamErrors:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/IamError'
    IamAccessLog:
      type: object
      required:
        - id
        - timestamp
        - request_id
        - method
        - path
        - action
        - decision
        - decision_reason
        - allowed_role_ids
        - denied_role_ids
        - user_id
        - service_account_id
        - cred_type
        - cred_id
        - ip_ingress
        - record_type
      properties:
        id:
          type: string
          description: The entry's ID.
        timestamp:
          type: string
          format: date-time
          description: When the request was decided.
        request_id:
          type:
            - string
            - 'null'
          description: The request's `x-request-id`.
        method:
          type: string
          description: The HTTP method of the request.
        path:
          type: string
          description: The path of the request.
        action:
          type:
            - string
            - 'null'
          description: The action the request's route declares.
        decision:
          type: string
          enum:
            - allow
            - deny
          description: Whether the request was allowed or refused.
        decision_reason:
          type: string
          description: >-
            Why, as a code, such as `action_allowed`, `action_denied`,
            `action_not_granted`, `credential_scope_denied`, or
            `credential_scope_not_allowed`.
        allowed_role_ids:
          type: array
          items:
            type: string
            format: uuid
          description: The granted roles with an allow statement for the action.
        denied_role_ids:
          type: array
          items:
            type: string
            format: uuid
          description: The granted roles with a deny statement for the action.
        user_id:
          type: string
          description: >-
            The user who sent the request. For a request with a service account
            token, or one sent into a managed organization, this is an
            organization's ID.
        service_account_id:
          type:
            - string
            - 'null'
          description: The service account that sent the request, if any.
        cred_type:
          type: string
          description: >-
            The kind of credential the request used: `apikey`, `tmptok` for a
            Mission Control Portal session, `oauth2`, or `sat` for a service
            account token.
        cred_id:
          type: string
          description: The ID of the credential the request used.
        ip_ingress:
          type:
            - string
            - 'null'
          description: The client address Telnyx saw.
        record_type:
          type: string
          enum:
            - iam_access_log
          description: Identifies the type of the resource.
    IamError:
      type: object
      required:
        - code
        - title
      properties:
        code:
          type: string
          description: The Telnyx error code.
        title:
          type: string
          description: A short summary of the error.
        detail:
          type: string
          description: What went wrong.
        source:
          type: object
          description: The part of the request that caused the error.
          properties:
            pointer:
              type: string
              description: A JSON pointer to the field that caused the error.
            value:
              description: The value that caused the error.
        meta:
          type: object
          properties:
            url:
              type: string
              format: uri
              description: The documentation page for the error code.
            denied_role_ids:
              type: array
              items:
                type: string
                format: uuid
              description: >-
                The granted roles whose deny statements refused the request,
                when a role refused it.
  responses:
    IamUnauthorized:
      description: The request has no valid credential.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/IamErrors'
          example:
            errors:
              - code: '10009'
                title: Authentication failed
                detail: Could not find any usable credentials in the request.
                source:
                  pointer: /
                meta:
                  url: https://developers.telnyx.com/docs/overview/errors/10009
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````