Developer Docs

Table of contents

Create contact field

The method allows the creation of additional custom fields for contacts.

To create a contact field, make a request to this URL:

POST http://one-api.bsg.world/api/contacts/fields
Request parameters
ParameterRequiredTypeDescription 
nameyesstringThe name of the custom field for the contacts.
typeyesstringField type. Possible values:
– string ― field with the “Text” type;
– integer ― field with the “Number”  type;
– datetime ― field with the “Date and time” type.
descriptionnostringDescription of the custom contact field.
is_visiblenoboolWhether the field is displayed: true or false value.
Response parameters
ParameterTypeDescription 
idintegerCustom field ID for the contacts. Generated by the BSG system automatically when a field is created.
typestringContact field type.
namestringName of the custom contact field.
descriptionstringDescription of the custom contact field.
is_visibleboolWhether the field is displayed: true or false value.

If request is successful, you will receive a response:

{
  "data": {
    "id": 26130,
    "name": "Country",
    "description": "The country name",
    "is_visible": true,
    "type": "text"
  }
}

We use cookies (and other similar technologies) to collect data to improve your experience on our site. By using our website, you’re agreeing to the collection of data as described in our Website Data Collection Policy.