Create a custom field definition on a board
const url = 'https://projects.work.optidata.cloud/api/boards/1/custom-fields/definitions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Priority","type":"select","description":"Business priority of the task","is_required":false,"config":{"options":[{"label":"High","color":"#ef4444"},{"label":"Low","color":"#22c55e"}]}}'};
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/boards/1/custom-fields/definitions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Priority", "type": "select", "description": "Business priority of the task", "is_required": false, "config": { "options": [ { "label": "High", "color": "#ef4444" }, { "label": "Low", "color": "#22c55e" } ] } }'Defines a new custom field for this board’s cards. name must be unique
within the board. config is type-specific (e.g. select options, number
format, text max length) and is validated against the chosen type.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Board id.
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": "Priority", "type": "select", "description": "Business priority of the task", "is_required": false, "config": { "options": [ { "label": "High", "color": "#ef4444" }, { "label": "Low", "color": "#22c55e" } ] }}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."}Resource not found, or a nested resource does not belong to its parent in the path.
object
Example
{ "message": "Not found."}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." ] }}