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

# Search Detected Accounts

> Search for a user's merchant accounts online.

#### Overview

This endpoint allows you to search for detected accounts by providing a list of merchant or company `names`. For each name, the response indicates whether the user has a detected account. This is useful for developers with a predefined list of companies or offers who want to determine whether they apply to a given user.

Call this endpoint upon receiving the [`NEW_DETECTED_ACCOUNTS_AVAILABLE`](/detect/webhook-events/new-detected-accounts-available) webhook.

#### Usage

Detected accounts retrieved from this endpoint can be used to closely personalize the merchants you present to users in your app or through lifecycle marketing campaigns. For example, if a detected account at Uber is present for a user, you can more prominently display Uber to that user in your app or as a push notification/email. Moreover, aggregated detected account information can be useful in designing a rewards program or other product features throughout your app.


## OpenAPI

````yaml POST /detected-accounts/search
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/search:
    post:
      description: Search for a user's merchant accounts online.
      operationId: detected_accounts_search
      requestBody:
        description: >-
          The input parameters required for identifying a user's account at a
          merchant.
        content:
          application/json:
            schema:
              type: object
              properties:
                external_user_id:
                  type: string
                  description: Your unique identifier for the user.
                  example: 123abc
                names:
                  type: array
                  items:
                    type: string
                  description: >-
                    Array of merchant or company names for which you want to
                    identify merchant accounts. Can be a single merchant name or
                    multiple.
                  example:
                    - Meta
                    - Uber
                    - johnson & johnson
                    - tiktok
              required:
                - external_user_id
                - names
      responses:
        '200':
          description: Successful request.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      description: The value provided in `name` in the request.
                      example: Meta
                    detected:
                      type: boolean
                      description: Whether a merchant account was detected for the user.
                      example: true
                    detected_at:
                      type:
                        - string
                        - 'null'
                      format: date-time
                      description: >-
                        ISO timestamp when the merchant account was detected on
                        the Knot platform.
                      example: '2025-10-23T17:00:00Z'
              examples:
                MultipleMerchantAccounts:
                  summary: Multiple detected merchant accounts
                  value:
                    - name: Meta
                      detected: true
                      detected_at: '2025-10-23T17:00:00Z'
                    - name: Uber
                      detected: true
                      detected_at: '2025-10-23T17:00:21Z'
                    - name: johnson & johnson
                      detected: false
                      detected_at: null
                    - name: tiktok
                      detected: true
                      detected_at: '2025-10-23T17:00:23Z'
                SingleMerchantAccount:
                  summary: Single detected merchant account
                  value:
                    - name: tiktok
                      detected: true
                      detected_at: '2025-10-23T17:00:23Z'
        '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.
                NameRequired:
                  summary: name is required
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INVALID_FIELD
                    error_message: The name field is required.
                NameMustBeArray:
                  summary: name must be an array
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INVALID_FIELD
                    error_message: The name field must be an array.
        '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.
        '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.

````