# /sender/search

Searches for senders by name or phone number.
## Purpose
Allows searching for existing senders in the system to retrieve their profile information. Useful for finding a sender before creating a transaction or linking a beneficiary.
## How It Works
1. Searches the index by the provided filter (name or phone)
2. If no results are found, performs a secondary lookup in the database
3. Results are deduplicated by first name, last name, and phone

## Search Behavior
- If `filterValue` is numeric, searches by phone number
- If `filterValue` is text, searches by name (partial match supported)
- Results are limited to 50 records

## Authentication
Requires `x-client-id` and `x-secret-key` headers. The `chainId` is resolved automatically from the authenticated partner.

Endpoint: GET /sender/search
Version: 1.0.0

## Query parameters:

  - `filterValue` (string, required)
    Search term. Can be a name (partial match) or phone number (exact match).

Error codes: required=400001, type=400002, minLength=400003, maxLength=400004

  - `countryISO3` (string)
    Country filter (ISO 3166-1 alpha-3). Defaults to `USA` if not provided.

Error codes: type=400002, minLength=400003, maxLength=400004

## Header parameters:

  - `x-client-id` (string, required)
    Unique identifier assigned to the integrating client. It determines the validation rules, allowed values, compliance policies, and operational limits applied to the request.

Error codes: required=400001, type=400002, minLength=400003, maxLength=400004

  - `x-secret-key` (string, required)
    Secret authentication key associated with the client. It is used to authorize the request and must be kept strictly confidential.

Error codes: required=400001, type=400002, minLength=400003, maxLength=400004

## Response 200 fields (application/json):

  - `status` (string)
    Result status (`success`).

  - `count` (number)
    Number of senders found matching the search criteria.

  - `data` (array)
    List of sender objects matching the search criteria.

  - `data.uuid` (string)
    Unique identifier (UUID) of the sender.

  - `data.firstName` (string)
    Sender's first name.

  - `data.middleName` (string)
    Sender's middle name.

  - `data.lastName` (string)
    Sender's last name.

  - `data.secondLastName` (string)
    Sender's second last name.

  - `data.fullName` (string)
    Sender's full name.

  - `data.phone` (string)
    Sender's phone number.

  - `data.addressStreet` (string)
    Sender's street address.

  - `data.addressCountry` (string)
    Sender's country (ISO 3166-1 alpha-3).

  - `data.currentBranch` (string)
    Branch associated with the sender.

  - `data.chainId` (string)
    Partner chain ID.

## Response 400 fields (application/json):

  - `errors` (array)
    List of validation errors.Error catalog for 400 (click to expand)CodeDescription400001filterValue query parameter is required.400003filterValue must have a minimum length of 2 characters.

  - `errors.status` (string)

  - `errors.code` (number)

  - `errors.message` (string)

  - `errors.details` (string)

## Response 401 fields (application/json):

  - `errors` (array)
    List of authentication errors.Error catalog for 401 (click to expand)CodeDescription401000Invalid credentials. Verify your x-client-id and x-secret-key.

  - `errors.status` (string)

  - `errors.code` (number)

  - `errors.message` (string)

## Response 500 fields (application/json):

  - `errors` (array)
    List of internal errors.Error catalog for 500 (click to expand)CodeDescription500000An unexpected error occurred. Please try again later.

  - `errors.status` (string)

  - `errors.code` (number)

  - `errors.message` (string)

