1. Edit contact field
Method for editing custom contact field:
- change field name
- change field description.
Request URL
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.
Parameter |
Required |
Type |
Default |
Description |
id |
Yes |
integer |
No |
ID of the custom contact field to edit |
name |
No |
string |
No |
Custom contact field name |
description |
No |
string |
No |
Custom contact field description |
is_visible |
No |
boolean |
No |
Display the field in the personal account in the Contact Book: value true or false. |
Request sample
{ "name": "string" } |
Response parameters
Parameter |
Type |
Description |
id |
int |
Custom contact field ID |
type |
string |
Field type. Possible values:
|
name |
string |
Custom contact field name |
description |
null|string |
Custom contact field description |
is_visible |
boolean |
Display the field in the personal account in the Contact Book: value true or false |
Response sample
{ "data": { "id": 26130, "name": "Страна", "type": "number", "description": "The country name", "is_visible": true } } |
2. Delete contact field
Method for removing the contact field. Deleting a field will also delete all the data it contains.
Request URL
POST http://one-api.bsg.world/api/contacts/fields/delete |
Request parameters:
Parameter |
Required |
Type |
Default |
Description |
ids |
Yes |
array <int> |
No |
Array of the contact field IDs to be deleted |
Request sample
{ "ids": [ 1 ] } |
Response parameters
Successfully removed.
Comments
0 comments
Article is closed for comments.