Create or update account definitions
Requires a workspace owner or admin. Creates, changes, archives and restores definitions, keyed the way GET returns them. A key that names no definition creates one; a key that names one changes only the properties sent, and restores it first if it is archived. Sending the same request again changes nothing.
Every definition is checked before any is written. If any check fails, nothing is changed and the response is 422, or 409 when a definition that already exists disagrees with the request, with every problem listed under issues. The writes themselves are independent: in the rare case one fails after the checks pass, the others are still written, and the response is 409 with the written definitions listed under applied. If another request is writing definitions at the same time, the response can be 429 with nothing changed; send the request again.
Pipeline and stage fields cannot be changed through this endpoint. Labels are stored without leading or trailing whitespace. Labels, new keys and new option IDs can be at most 255 characters.
Validation rules and required on fields are available only where GET lists them. A rule that uses a field created by the same request is checked only when it is saved, after that field is written.
Required scopes: accounts:read, plus config:create to create, config:update to change or restore, config:delete to archive or delete a rule
Rate limit category: Write
Create or update account definitions
curl https://api.lightfield.app/v1/accounts/definitions \
-H 'Content-Type: application/json' \
-H 'Lightfield-Version: 2026-03-01' \
-H "Authorization: Bearer $API_KEY" \
-d '{}'{
"fieldDefinitions": {
"foo": {
"archived": true,
"archivedAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"label": "label",
"typeConfiguration": {
"currency": "currency",
"decimalPlaces": -9007199254740991,
"handleService": "TWITTER",
"multipleValues": true,
"options": [
{
"id": "id",
"label": "label",
"category": "ACTIVE",
"color": "RED",
"description": "description",
"forecastEnabled": true,
"forecastPercentage": 0,
"icon": "BACKLOG",
"parentId": "parentId",
"slug": "slug"
}
],
"parentFieldKey": "parentFieldKey",
"unique": true
},
"valueType": "ADDRESS",
"id": "id",
"aiFillable": "ON",
"aiFillablePrompt": "aiFillablePrompt",
"formula": "formula",
"readOnly": true,
"required": true,
"valueSource": "MANUAL"
}
},
"objectType": "objectType",
"relationshipDefinitions": {
"foo": {
"archived": true,
"archivedAt": "2019-12-27T18:11:19.117Z",
"cardinality": "HAS_ONE",
"description": "description",
"label": "label",
"objectType": "objectType",
"id": "id",
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"label": "label"
},
"asSource": {
"cardinality": "HAS_ONE",
"label": "label"
}
},
"groupKey": "groupKey",
"inverse": {
"cardinality": "HAS_ONE",
"label": "label"
}
}
},
"relationshipGroupDefinitions": {
"foo": {
"id": "id",
"archived": true,
"archivedAt": "2019-12-27T18:11:19.117Z",
"inverse": {
"label": "label"
},
"label": "label",
"objectType": "objectType"
}
},
"validationRules": {
"foo": {
"name": "name",
"require": [
{
"id": "id",
"expression": "expression"
}
],
"when": "when"
}
}
}Returns Examples
{
"fieldDefinitions": {
"foo": {
"archived": true,
"archivedAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"label": "label",
"typeConfiguration": {
"currency": "currency",
"decimalPlaces": -9007199254740991,
"handleService": "TWITTER",
"multipleValues": true,
"options": [
{
"id": "id",
"label": "label",
"category": "ACTIVE",
"color": "RED",
"description": "description",
"forecastEnabled": true,
"forecastPercentage": 0,
"icon": "BACKLOG",
"parentId": "parentId",
"slug": "slug"
}
],
"parentFieldKey": "parentFieldKey",
"unique": true
},
"valueType": "ADDRESS",
"id": "id",
"aiFillable": "ON",
"aiFillablePrompt": "aiFillablePrompt",
"formula": "formula",
"readOnly": true,
"required": true,
"valueSource": "MANUAL"
}
},
"objectType": "objectType",
"relationshipDefinitions": {
"foo": {
"archived": true,
"archivedAt": "2019-12-27T18:11:19.117Z",
"cardinality": "HAS_ONE",
"description": "description",
"label": "label",
"objectType": "objectType",
"id": "id",
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"label": "label"
},
"asSource": {
"cardinality": "HAS_ONE",
"label": "label"
}
},
"groupKey": "groupKey",
"inverse": {
"cardinality": "HAS_ONE",
"label": "label"
}
}
},
"relationshipGroupDefinitions": {
"foo": {
"id": "id",
"archived": true,
"archivedAt": "2019-12-27T18:11:19.117Z",
"inverse": {
"label": "label"
},
"label": "label",
"objectType": "objectType"
}
},
"validationRules": {
"foo": {
"name": "name",
"require": [
{
"id": "id",
"expression": "expression"
}
],
"when": "when"
}
}
}