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

# List Request Logs

> List API and webhook request logs.



## OpenAPI

````yaml GET /request-logs
openapi: 3.1.0
info:
  title: Knot API
  description: An API to interact with the Knot merchant connectivity platform.
  version: 1.0.0
servers:
  - url: https://development.knotapi.com
    description: Development server
security:
  - basicAuth: []
paths:
  /request-logs:
    servers:
      - url: https://api.dashboard.knotapi.com
    get:
      summary: List Request Logs
      description: List API and webhook request logs.
      operationId: request_logs_list
      parameters:
        - name: environment
          in: query
          required: true
          schema:
            type: string
            enum:
              - development
              - production
            example: development
          description: >-
            The environment to read logs from. Must match your access token's
            environment.
        - name: start
          in: query
          required: false
          schema:
            type: string
            format: date-time
            example: '2026-10-14T00:00:00Z'
          description: >-
            Return logs created on or after this timestamp, in ISO 8601 format
            (YYYY-MM-DDTHH:MM:SSZ). Defaults to 24 hours before `end`. Must be
            no more than 7 days before `end`.
        - name: end
          in: query
          required: false
          schema:
            type: string
            format: date-time
            example: '2026-10-15T00:00:00Z'
          description: >-
            Return logs created on or before this timestamp, in ISO 8601 format
            (YYYY-MM-DDTHH:MM:SSZ). Defaults to the current time.
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - request
              - webhook
            example: webhook
          description: >-
            Return only API request logs (`request`) or only webhook delivery
            logs (`webhook`). Returns both if omitted.
        - name: session_id
          in: query
          required: false
          schema:
            type: string
            format: uuid
            example: 915efe72-5136-4652-9a1f-d9d48003c102
          description: Return only logs for this session.
        - name: task_id
          in: query
          required: false
          schema:
            type: integer
            example: 7754123
          description: Return only logs for this task.
        - name: external_user_id
          in: query
          required: false
          schema:
            type: string
            example: user-123
          description: Return only logs for this user.
        - name: event
          in: query
          required: false
          schema:
            type: string
            example: AUTHENTICATED
          description: Return only webhook logs for this event.
        - name: status_code
          in: query
          required: false
          schema:
            type: integer
            minimum: 100
            maximum: 599
            example: 400
          description: >-
            Return only logs with this HTTP status code. For webhook logs, this
            is the status code your endpoint returned.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 25
            example: 25
          description: Maximum number of logs to return.
        - name: next_cursor
          in: query
          required: false
          schema:
            type: string
            example: >-
              eyJjcmVhdGVkX2F0IjoiMjAyNi0xMC0xNSAxNDozMTo1NSIsImlkIjo5ODIzMTcwMiwiX3BvaW50c1RvTmV4dEl0ZW1zIjp0cnVlfQ
          description: >-
            Cursor for the next page. Use the `next_cursor` value from the
            previous response and send the same filters, including `start` and
            `end`.
      responses:
        '200':
          description: Successful request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Request logs, newest first.
                    items:
                      $ref: '#/components/schemas/RequestLog'
                  next_cursor:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Cursor for the next page, or `null` if there are no more
                      logs.
                  limit:
                    type: integer
                    description: Maximum number of logs returned per page.
                    example: 25
                required:
                  - data
                  - next_cursor
                  - limit
              examples:
                RequestLogs:
                  summary: Request logs
                  value:
                    data:
                      - id: 98231774
                        type: webhook
                        datetime: '2026-10-15T14:32:08Z'
                        method: POST
                        path: null
                        url: https://example.com/webhooks/knot?token=********
                        event: AUTHENTICATED
                        status_code: 200
                        latency_ms: 184
                        session_id: 915efe72-5136-4652-9a1f-d9d48003c102
                        task_id: 7754123
                        external_user_id: user-123
                      - id: 98231702
                        type: request
                        datetime: '2026-10-15T14:31:55Z'
                        method: POST
                        path: /session/create
                        url: null
                        event: null
                        status_code: 200
                        latency_ms: 96
                        session_id: 915efe72-5136-4652-9a1f-d9d48003c102
                        task_id: null
                        external_user_id: user-123
                    next_cursor: >-
                      eyJjcmVhdGVkX2F0IjoiMjAyNi0xMC0xNSAxNDozMTo1NSIsImlkIjo5ODIzMTcwMiwiX3BvaW50c1RvTmV4dEl0ZW1zIjp0cnVlfQ
                    limit: 25
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                EnvironmentRequired:
                  summary: environment is required
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INVALID_FIELD
                    error_message: The environment field is required.
                QueryTimeout:
                  summary: Query took too long
                  value:
                    error_type: REQUEST_LOG_ERROR
                    error_code: REQUEST_LOG_QUERY_TIMEOUT
                    error_message: >-
                      The query took too long. Narrow the time range or add a
                      filter.
                TimeRangeTooLarge:
                  summary: Time range is longer than 7 days
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INVALID_FIELD
                    error_message: >-
                      The time range between start and end must be 7 days or
                      less.
                InvalidCursor:
                  summary: next_cursor is invalid
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INVALID_FIELD
                    error_message: The next_cursor is invalid.
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InvalidAccessToken:
                  summary: Invalid or expired access token
                  value:
                    error_type: INVALID_INPUT
                    error_code: INVALID_ACCESS_TOKEN
                    error_message: >-
                      The access token is invalid or has expired. Request a new
                      access token.
        '403':
          description: Forbidden request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InsufficientScope:
                  summary: Missing scope
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INSUFFICIENT_SCOPE
                    error_message: The access token does not include the logs:read scope.
                EnvironmentMismatch:
                  summary: Access token is for another environment
                  value:
                    error_type: INVALID_REQUEST
                    error_code: ENVIRONMENT_MISMATCH
                    error_message: >-
                      This access token can only access development data.
                      Request a new access token with your production client_id.
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                RateLimitExceeded:
                  summary: Rate limit exceeded
                  value:
                    error_type: INVALID_REQUEST
                    error_code: RATE_LIMIT_EXCEEDED
                    error_message: Too many requests. Retry after 30 seconds.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InternalServerError:
                  summary: Unexpected server error
                  value:
                    message: Server Error
      security:
        - agentAccessToken:
            - logs:read
components:
  schemas:
    RequestLog:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the request log.
          example: 98231774
        type:
          type: string
          enum:
            - request
            - webhook
          description: >-
            `request` for an API request to Knot. `webhook` for a webhook
            delivery attempt to your endpoint. Each webhook retry is a separate
            log.
          example: webhook
        datetime:
          type: string
          format: date-time
          description: >-
            When the request was made, in ISO 8601 format
            (YYYY-MM-DDTHH:MM:SSZ).
          example: '2026-10-15T14:32:08Z'
        method:
          type:
            - string
            - 'null'
          description: HTTP method of the request.
          example: POST
        path:
          type:
            - string
            - 'null'
          description: >-
            For `request` logs, the Knot API path that was called, including its
            query string. Sensitive query parameter values are masked. `null`
            for `webhook` logs.
          example: null
        url:
          type:
            - string
            - 'null'
          description: >-
            For `webhook` logs, the endpoint URL Knot sent the webhook to. Query
            parameter values and credentials are masked. `null` for `request`
            logs.
          example: https://example.com/webhooks/knot?token=********
        event:
          type:
            - string
            - 'null'
          description: For `webhook` logs, the webhook event. `null` for `request` logs.
          example: AUTHENTICATED
        status_code:
          type: integer
          description: >-
            HTTP status code of the response. For `webhook` logs, this is the
            status code your endpoint returned. Knot records `504` when your
            endpoint times out or can't be reached.
          example: 200
        latency_ms:
          type:
            - integer
            - 'null'
          description: Time taken to respond, in milliseconds.
          example: 184
        session_id:
          type:
            - string
            - 'null'
          description: The session the log belongs to, if any.
          example: 915efe72-5136-4652-9a1f-d9d48003c102
        task_id:
          type:
            - integer
            - 'null'
          description: The task the log belongs to, if any.
          example: 7754123
        external_user_id:
          type:
            - string
            - 'null'
          description: Your unique identifier for the user, if any.
          example: user-123
      required:
        - id
        - type
        - datetime
        - method
        - path
        - url
        - event
        - status_code
        - latency_ms
        - session_id
        - task_id
        - external_user_id
    Error:
      type: object
      properties:
        error_type:
          type: string
          description: Type of error.
          enum:
            - INVALID_INPUT
            - INVALID_REQUEST
            - USER_ERROR
            - SESSION_ERROR
            - MERCHANT_ACCOUNT_ERROR
            - MERCHANT_ERROR
            - SUBSCRIPTION_ERROR
            - TRANSACTION_ERROR
            - CART_ERROR
            - WEBHOOK_ENDPOINT_ERROR
            - REQUEST_LOG_ERROR
          example: INVALID_REQUEST
        error_code:
          type: string
          description: Error code.
          enum:
            - INVALID_API_KEYS
            - INVALID_FIELD
            - INVALID_JWE
            - INVALID_CURSOR_FORMAT
            - USER_NOT_FOUND
            - MERCHANT_ACCOUNT_NOT_FOUND
            - MERCHANT_ACCOUNT_DISCONNECTED
            - SESSION_NOT_FOUND
            - EXTEND_NOT_SUPPORTED
            - MERCHANT_UNAVAILABLE
            - NO_ACCESS
            - TRANSACTION_NOT_FOUND
            - NO_TRANSACTIONS
            - SUBSCRIPTION_NOT_FOUND
            - CANCELLABLE_SUBSCRIPTION_NOT_FOUND
            - MULTIPLE_CANCELLABLE_SUBSCRIPTIONS_FOUND
            - ONGOING_OPERATION
            - CART_NOT_FOUND
            - FULFILLMENT_NOT_FOUND
            - INVALID_ACCESS_TOKEN
            - INSUFFICIENT_SCOPE
            - INSUFFICIENT_ROLE
            - WEBHOOK_ENDPOINT_NOT_FOUND
            - WEBHOOK_ENDPOINT_LIMIT_REACHED
            - WEBHOOK_ENDPOINT_ALREADY_EXISTS
            - RATE_LIMIT_EXCEEDED
            - ENVIRONMENT_MISMATCH
            - REQUEST_LOG_NOT_FOUND
            - REQUEST_LOG_QUERY_TIMEOUT
          example: INVALID_FIELD
        error_message:
          type: string
          description: Detailed error message.
          example: The limit may not be greater than 10.
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Basic authentication header of the form `Basic <encoded-value>`, where
        `<encoded-value>` is the base64-encoded string `username:password`. Use
        your `client_id` as the `username` and your `secret` as the `password`
        value.
    agentAccessToken:
      type: http
      scheme: bearer
      description: >-
        Short-lived access token from the [device authorization
        flow](/api-reference/agent-authorization/overview). Expires after 15
        minutes. Accesses only the environment of the client ID it was issued
        for.

````

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