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: string - for a field with “Text” type; integer - for a field with “Number” type; datetime - for a field with “Date and time” type. |
name | string | Custom contact field name |
description | nullstring | Custom contact field description |
is_visible | boolean | Display the field in the personal account in the Contact Book: value true or false |
Response Sample
Response to successful request:
{
"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
]
}
Comments
0 comments
Article is closed for comments.