Default value for Field. When field is localized accepts an object of default values with site locales as keys
The label of the field
Field API key
Whether the field needs to be multilanguage or not
Optional field validations
Field appearance details, plugin configuration and field add-ons
Ordering index
Type of input
Field hint
Fieldset linkage
const SiteClient = require('datocms-client').SiteClient;const client = new SiteClient('YOUR-API-TOKEN');const fieldIdOrApiKey = 'blog_post::title';client.field.update(fieldIdOrApiKey, {defaultValue: {en: 'A default value',it: 'Un valore di default'},label: 'Title',apiKey: 'title',localized: true,validators: {required: {}},appearance: {editor: 'single_line',parameters: {heading: false},addons: [{id: '1234',fieldExtension: 'lorem_ipsum',parameters: {}}]},position: 1,fieldType: 'string',hint: 'This field will be used as post title',fieldset: null}).then((field) => {console.log(field);}).catch((error) => {console.error(error);});
> node example.js{"id": "124","label": "Title","fieldType": "string","localized": true,"defaultValue": {"en": "A default value","it": "Un valore di default"},"apiKey": "title","hint": "This field will be used as post title","validators": {"required": {}},"appearance": {"editor": "single_line","parameters": {"heading": false},"addons": [{"id": "1234","fieldExtension": "lorem_ipsum","parameters": {}}]},"position": 1,"itemType": "44","fieldset": null}