Use this when adding your own attributes to NetBox objects.
Custom Fields
Custom fields add your own attributes to NetBox objects, such as a support contract or backup policy, which automation can read and write through the API.
1. Custom fields extend models.
2. Define types and validation.
3. Use sparingly — prefer native fields.
4. Document.
5. Automation reads custom_fields in API.
custom field definition → object values → automation
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Custom fields used where native fields exist.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Custom fields add your own attributes to NetBox objects.
- Automation reads and writes them via the API.
- Choose the right type and validation.
curl -s -H 'Authorization: Token <t>' https://<netbox>/api/extras/custom-fields/— custom fields- Validation rules on custom fields — quality
- Usage in automation — consumers
ReferenceWhy it matters1 section · depth on demand
What it is
Custom fields add attributes to object types (e.g. support contract, backup policy).
ReferenceImportant terms & boundaries2 sections · depth on demand
How it works
Custom fields are defined once per object type with a type (text, integer, select, object reference) and validation; they appear in the UI, API and filters, and can be required.
Example
curl -X PATCH -H "Authorization: Token $T" -H 'Content-Type: application/json' \
https://netbox.example.com/api/dcim/devices/42/ -d '{"custom_fields": {"support_contract": "SC-1234"}}'
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in NetBox > Custom Fields. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://netbox.readthedocs.io/en/stable/ · confidence 94%