update_custom_property
To create a custom property for an item or to update an existing one, use the item/update_custom_property method. To send a request, you should have the Edit not mentioned properties access right to the item.
You can use this method to manage flespi integration settings (flespi token, data center region, and region configuration) stored as custom properties on the top account user item. For a step-by-step guide, see Setting flespi token and region via API.
Endpoint
svc=item/update_custom_property¶ms={
"itemId":<long>,
"name":"<text>",
"value":"<text>"
}
Parameters
The request must contain the following parameters:
| Name | Description |
|---|---|
| itemId | Item ID. |
| name | Custom property name. |
| value | Custom property value. To delete the custom property, pass an empty string (""). |
Returned result
If the request is completed successfully, a response in the following format is returned:
{
"n":"<text>", /* custom property name */
"v":"<text>" /* custom property value */
}
Otherwise, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 4 | Wrong input parameters. |
| 6 | Undefined error. |
| 7 | Failed to fetch the item. The user may not have the Edit not mentioned properties access right to the item. The same error is returned while the account of the user is being moved to another data center. |