BSG utilizes HTTP cookies (and similar or complementary technologies) to 1) make this website safe, functional, and accessible (through the use of mandatory cookies) and 2) understand how you use our website (through the use of optional cookies) in order to improve your experience and to provide you with personalized content.

The information in the cookie text files may be related to your personal preferences or your device and is intended to make the site operate according to your expectations. The information contained in cookies does not usually identify your identity directly but is helpful in providing you with a more personalized user experience.

In accordance with the requirements of the General Data Protection Regulation (GDPR) privacy and security law that governs how the personal data of individuals in the EU may be processed and transferred, we provide you the possibility to prohibit the use of certain types of cookies when you use our website.

Read our Cookie Notice and the Privacy Policy for detailed information on how BGS collects and uses cookies. Please note that prohibiting the use of certain types of cookies may affect your interaction with the website and limit the accessibility of services we offer you. Choose the appropriate category below to learn more and to disable cookies.

Accept All cookies*
*Recommended for comfortable use of the site
Accept only necessary cookies
Accept only selected cookies
Necessary cookies
Social media
Analytics
Marketing
Developer Docs
Number Intelligence

Contact search

Method for searching contacts in the Contact Book. In the search, it is possible to use operations: like, =, >, >=, <, <=.

Search is possible by the following fields:

  • id:  =, >, >=, <, <=
  • phone: like, =
  • {field_id}:
    • for field with “Text” type: like, =
    • for field with “Number” type:  =, >, >=, <, <=
    • for field with “Date” type: =, >, >=, <, <=

To make contact search, send a request to this URL:

GET http://one-api.bsg.world/api/contacts/search

Request parameters:

Parameter Required Type Default Description
page[offset] No int 0 Get contacts starting from offset
page[limit] No int 50 Number of contacts in response
sort No string id Sort by conditions: id, phone
way No string asc Sorting options: asc, desc
search[operation] No string = Operator for finding values: like, =, >, >=, <, <=
search[field] No string no Field for search. Possible values: id, phone, group_id, date, {field_id}
{field_id} – custom field ID; can be got from GET /api/contacts/fields
search[value] Value for search: No string no
id Contact ID
phone Contact phone number. 9 to 15 digits.
date Contact creation date in ISO 8601 format
{field_id} Value specified in the contacts field

Response parameters:

Parameter Type Description
id integer Contact ID
phone integer Contact phone number
fields Contains nested custom field parameters
created_at datetime Contact creation date – set automatically by the BSG system when adding a contact to the Contact Book. Format ISO 8601 yyyy-mm-dd hh:mm:ss
groups – contains nested parameters of the list to which the contact is added:
id string ID of the contact list to which the contact is added
name string Name of the contact list to which the contact is added
description string Description of the contact list to which the contact is added
default boolean Specifies whether the list is the default
created_at datetime Date of creation/editing of the list to which the contact was added. Format ISO 8601 yyyy-mm-dd hh:mm:ss
hlr_status string Status of checking the contact’s phone number in HLR. Possible values: barred, absent, active, unknown, failed.
hlr_last_check datetime Date and time when the contact’s phone number was last checked in HLR. Format ISO 8601 yyyy-mm-dd hh:mm:ss

If the request is successful, you will receive a response:


{
  "data": [
    {
      "id": 1,
      "phone": 33601148802,
      "fields": [
        {
          "code": 0,
          "text": "string"
        }
      ],
      "created_at": "2022-04-28 14:21:16",
      "groups": [
        {
          "id": 1,
          "name": "string",
          "description": "string",
          "default": 0,
          "created_at": "2022-04-28 14:21:16"
        }
      ],
      "hlr_status": "string",
      "hlr_last_check": "2022-04-28 14:21:16"
    }
  ],
  "meta": {
    "page": {
      "total": 1,
      "limit": 50,
      "offset": 0
    },
    "search": {
      "field": 0,
      "operation": "like",
      "value": "string"
    }
  }
}

Interested in a special offer?

Ready to reach further?
Let’s talk

I agree to BSG privacy policy
Submit

Useful Materials

What Is Number Verifier — And Why It’s More Than Just an “HLR Lookup”

30% of SMS fail — not because of content, but numbers. Verify before you send.

10 Awesome Back-to-School Marketing Ideas 2025

The start of the school year: when parents trade in their summer margaritas for the

What Is CPaaS? Communications Platform as a Service

Talking to customers these days is more than just emails or phone calls. Businesses need