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

The BSG API provides you an opportunity to manage contacts for subsequent single and multiple uses when conducting SMS, Viber, or Number Verification campaigns. You can create new contacts, view, edit, group, delete existing contacts.

Edit contact

The method allows you to make changes to an existing contact: change the phone number, data in the contact’s custom fields, and add the contact to the list.

Please note that in the TEST account mode there is a restriction for performing this method: you can only change the contact’s phone number to a verified number (number verification is performed in the personal account at the BSG platform).

To edit, make a request to this URL:

PUT http://one-api.bsg.world/api/contacts/{id}

Request parameters

Parameter Required Type Description
id Yes integer ID of a contact to be changed
phone Yes integer Contact’s phone number.Value in ITU format. 9 to 15 digits.
groups No array ID array of the contact list to add the contact to.
fields No array Other data in custom contact fields
id integer Contact custom field ID
value string Value for the custom contact field

Request example:


{
  "phone": 85267202829,
  "groups": [
    1
  ],
  "fields": [
    {
      "id": 25964,
      "value": "TARAS SHEVCHENKO"
    }
  ]
}

Response parameters

Parameter Type Description
id integer Contact ID for which the query was made.
phone integer Contact phone number.
fields array Contains embedded custom fields data
id integer Custom field ID.
value string Custom field data.
created_at datetime Date when the contact was created in the system ― set by the system automatically when a contact is added to the Contact Book. Display format ― Y-m-d H:i:s
groups array Contains embedded data of the list where the contact is added.
id string ID of a list (generated automatically when creating a contact list) where the contact is added.
name string Name of the list where the contact is added.
description string Description списка where the contact is added.
default bool Indicates whether the contact list is a default one.
created_at datetime Creation date of the list where the contact is added. Display format ― Y-m-d H:i:s
hlr_status string Status of the contact phone number verification in the HLR database. Possible values: sent, absent, active, unknown, failed.
hlr_last_check string Date and time when the contact’s phone number was last verified against the HLR database. Display format ― Y-m-d H:i:s

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


{
  "data": {
    "id": 1,
    "phone": 85267202829,
    "fields": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "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"
  }
}

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