Create a global custom field definition
const url = 'https://projects.work.optidata.cloud/api/custom-fields/definitions/global';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Cost center","type":"text","config":{"multiline":false,"max_length":500}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://projects.work.optidata.cloud/api/custom-fields/definitions/global \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Cost center", "type": "text", "config": { "multiline": false, "max_length": 500 } }'Defines a tenant-wide custom field, available on all boards. name must be unique among global definitions. Restricted to administrators.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Unique within the board (or among global definitions).
Type-specific configuration; validated against the chosen type.
Example
{ "name": "Cost center", "type": "text", "config": { "multiline": false, "max_length": 500 }}Responses
Section titled “Responses”The created definition.
Definition of a custom field. board_id null (and is_global true) means tenant-wide.
object
Type-specific configuration. Examples — text: {multiline, max_length, placeholder, default_value};
select: {options: [{id, label, color}]}; checkbox: {default_value}.
Required fields block card interactions (comments, files, timers) until filled.
Example
{ "type": "text"}Missing, invalid or expired bearer passport.
object
Example
{ "error": "JWT passport exception: Missing bearer token in request"}The authenticated user lacks the required board permission.
object
Example
{ "message": "This action is unauthorized."}Validation failed.
object
First validation error message.
Map of field name → list of error messages.
object
Example
{ "message": "The name field is required.", "errors": { "name": [ "The name field is required." ] }}