Welcome to our new portal experience - if you need any assistance or have questions, please click here.

Add custom fields to VLAN using API

Modified on: Tue, 31 Mar, 2026 at 4:08 PM

We can use the following API call to add/update custom field to VLAN:
To add a new custom field without value

curl -X PUT -u 'u:p' -d "id=1290" -d "custom_field=name&type=number" "https://D42-IP/api/1.0/custom_fields/switch_vlan/" --insecure

where we need to specify the:

VLAN ID as "id=VLAN_ID"

custom field key as "custom_field=key_name"

type as custom field "type" (this is optional, if we ignore the default type will be text)

To add custom field with value

curl -X PUT -u 'u:p' -d "id=1290" -d "custom_field=name" -d "value=value" "https://D42-IP/api/1.0/custom_fields/switch_vlan/" --insecure