/
4.1.19 Custom fields

4.1.19 Custom fields

Custom fields

Method available at: /custom-fields

This method allows you to read and write custom fields for a given client

Authorization

The method requires authorization using basic authentication. Please use your SIP account login and password.

Method description:

List download

To retrieve the client's custom fields, call the /custom-fields method with the following parameters:

Parameter

Description

m

parameter specifies the name of the method. If you want to download a list, set the value to "get"

Return value

  • If successful, we will receive a JSON object containing all saved settings

[
  {
    "k": string,
    "v": string
  },
  ...
]

where:

  • k - key identifying the setting
  • v - key value

Save settings

To save the setting, call the /custom-fields method with parameters:

Parameter

Description

m

parameter specifies the name of the method. In case of writing, set the value "set"

pm

JSON object containing

{
  "k": string,
  "v": string
}
  • k - key identifying the setting
  • v - key value, when restoring to default values, set an empty string.


Return value

After saving, the method will return the appropriate 3-digit number:

Code

Description

200OK

400

Incorrect parameters - one of the parameters was not provided

500Internal server error

Related content