Skip to main content

Search phone numbers by a list of numbers

POST 

/v1/businesses/{businessId}/phone-numbers/search

Returns the business's phone numbers that match the supplied list of E.164 numbers. Use this instead of the GET list when filtering by a large set of numbers (up to 1000) that wouldn't fit in a query string. This is a read-only search — it does not change anything. The same filtering, sorting, and paging as the GET list apply via query parameters.

Path Parameters​


    businessId string<uuid>required

    The ID of the business, assigned by Hiya.

    Example: 9b8a1c4e-2c0f-4f3d-9a1e-7b3a2b4c6d8f

Query Parameters​


    status string

    Return only numbers with this status. Lowercase form of the

    PhoneStatus
    values (e.g.
    pending
    ).

    Possible values: [pending, registered, needs_attention]


    sortBy string

    Field to sort by.

    Possible values: [phoneNumber, displayName, callReason, createdAt, updatedAt]

    Default value: createdAt

    sortDirection string

    Sort direction.

    asc
    or
    desc
    (case-insensitive).

    Possible values: Value must match regular expression ^[Aa][Ss][Cc]$|^[Dd][Ee][Ss][Cc]$

    Default value: desc

    page integer

    Page number, starting at 0.

    Possible values: >= 0

    Default value: 0

    size integer

    Number of items per page.

    Possible values: >= 1 and <= 200

    Default value: 50

Body

required

application/json

Responses​

A page of the matching phone numbers.

Response Body

application/json