Developer Docs

Table of contents

Edit contact field

Method for editing custom contact field:

  • change field name
  • change field description.

To edit contact field

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

Request parameters

It is necessary to pass at least one of the following parameters: name/ description/ is_visiable.

ParameterRequiredTypeDefaultDescription
idYesintegerNoID of the custom contact field to edit
nameNostringNoCustom contact field name
descriptionNostringNoCustom contact field description
is_visibleNobooleanNoDisplay the field in the personal account in the Contact Book: value true or false

Request sample:

{
  "name": "string"
}

Response parameters:

ParameterTypeDescription
idintCustom contact field ID
typestringField type. Possible values:
  • string – for a field with “Text” type

  • integer – for a field with “Number” type

  • datetime – for a field with “Date and time” type
namestringCustom contact field name
descriptionnull|stringCustom contact field description
is_visiblebooleanDisplay the field in the personal account in the Contact Book: value true or false

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

{
  "data": {
    "id": 26130,
    "name": "Страна",
    "type": "number",
    "description": "The country name",
    "is_visible": true
  }
}