> ## 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 Detected Accounts

> List a user's detected accounts using cursor-based pagination.

#### Overview

This endpoint allows you to list **detected** accounts for a given user using cursor-based pagination. Primarily, these detected accounts are delivered in the [`NEW_DETECTED_ACCOUNTS_AVAILABLE`](/detect/webhook-events/new-detected-accounts-available) webhook payload.


## OpenAPI

````yaml POST /detected-accounts/list
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:
  /detected-accounts/list:
    post:
      description: List a user's detected accounts using cursor-based pagination.
      operationId: detected_accounts_list
      requestBody:
        description: The input parameters required for listing detected accounts.
        content:
          application/json:
            schema:
              type: object
              properties:
                external_user_id:
                  type: string
                  description: Your unique identifier for the user.
                  example: abc
                cursor:
                  type: string
                  description: >-
                    Cursor token pointing to the last detected account
                    retrieved. The `/detected-accounts/list` endpoint uses
                    **cursor-based** pagination to track which detected accounts
                    have already been seen, minimizing data redundancy. 


                    On the first call, the endpoint returns all detected
                    accounts **paginated**. In subsequent calls, only new
                    detected accounts are provided using the **next cursor**.
                  example: eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0
                limit:
                  type: integer
                  description: >-
                    Maximum number of detected accounts to retrieve (min: 1,
                    max: 100).
                  example: 100
                  default: 100
              required:
                - external_user_id
      responses:
        '200':
          description: Successful request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detected_accounts:
                    type: array
                    items:
                      type: object
                      properties:
                        merchant:
                          type: object
                          description: Merchant information on the Knot platform.
                          properties:
                            id:
                              type: integer
                              description: >-
                                Static unique ID of the merchant (across all
                                environments). This ID remains constant and does
                                not change.
                              example: 122
                            name:
                              type: string
                              description: Name of the merchant.
                              example: Spotify
                            logo:
                              type: string
                              description: Logo of the merchant.
                              example: >-
                                https://knot.imgix.net/merchants/KBQ5j6cN010PPpwbO7RpKGyDrCpsZ91FRhwnZp5u.png
                        detected_at:
                          type: string
                          format: date-time
                          description: ISO timestamp when the account was first detected.
                          example: '2025-08-01T17:00:00Z'
                  next_cursor:
                    type:
                      - string
                      - 'null'
                    description: Cursor token for the next page of detected accounts.
                  limit:
                    type: integer
                    description: >-
                      Number of detected accounts returned based on the limit
                      provided.
                    example: 100
              examples:
                DetectedAccounts:
                  summary: Example detected accounts response.
                  value:
                    detected_accounts:
                      - merchant:
                          id: 35
                          name: Spotify
                          logo: >-
                            https://knot.imgix.net/merchants/KBQ5j6cN010PPpwbO7RpKGyDrCpsZ91FRhwnZp5u.png
                        detected_at: '2025-10-23T17:00:00Z'
                      - merchant:
                          id: 44
                          name: Walmart
                          logo: https://knot.imgix.net/merchants/walmart.png
                        detected_at: '2025-08-01T17:00:05Z'
                      - merchant:
                          id: 84
                          name: Chewy
                          logo: https://knot.imgix.net/merchants/chewy.png
                        detected_at: '2025-09-12T14:22:18Z'
                      - merchant:
                          id: 71
                          name: Verizon
                          logo: https://knot.imgix.net/merchants/verizon.png
                        detected_at: '2025-07-05T09:14:33Z'
                      - merchant:
                          id: 53
                          name: Airbnb
                          logo: https://knot.imgix.net/merchants/airbnb.png
                        detected_at: '2025-11-02T20:48:02Z'
                    next_cursor: eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0
                    limit: 100
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                ExternalUserIdRequired:
                  summary: external_user_id is required
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INVALID_FIELD
                    error_message: The external user id field is required.
                LimitNotInteger:
                  summary: limit must be an integer
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INVALID_FIELD
                    error_message: The limit must be an integer.
                LimitMoreThanOne:
                  summary: The limit must be at least 1.
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INVALID_FIELD
                    error_message: The limit must be at least 1.
                LimitLessThanHundred:
                  summary: The limit may not be greater than 100.
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INVALID_FIELD
                    error_message: The limit may not be greater than 100.
                InvalidCursorFormat:
                  summary: Cursor format is invalid
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INVALID_CURSOR_FORMAT
                    error_message: The provided cursor is invalid.
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AuthFailed:
                  summary: Auth failed
                  value:
                    error_type: INVALID_INPUT
                    error_code: INVALID_API_KEYS
                    error_message: Invalid client_id or secret provided.
        '403':
          description: Forbidden request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                NoAccess:
                  summary: No access
                  value:
                    error_type: INVALID_REQUEST
                    error_code: NO_ACCESS
                    error_message: Please contact Knot for access to this endpoint.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InternalServerError:
                  summary: Unexpected server error
                  value:
                    message: Server Error
components:
  schemas:
    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
          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
            - ONGOING_OPERATION
            - CART_NOT_FOUND
            - FULFILLMENT_NOT_FOUND
          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.

````