Set several custom field values on a card
const url = 'https://projects.work.optidata.cloud/api/boards/1/cards/1/custom-fields';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"fields":[{"definition_id":12,"value":"opt-1"},{"definition_id":13,"value":8}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://projects.work.optidata.cloud/api/boards/1/cards/1/custom-fields \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "fields": [ { "definition_id": 12, "value": "opt-1" }, { "definition_id": 13, "value": 8 } ] }'Upserts multiple custom field values in one call. Each definition_id
must be an active definition of this board. Value types are validated
against each definition’s field type (text, number, select option id,
checkbox boolean, date, person user id).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Board id.
Card id (must belong to the board).
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
New value; type depends on the definition’s field type. Null clears the value.
Example
{ "fields": [ { "definition_id": 12, "value": "opt-1" }, { "definition_id": 13, "value": 8 } ]}Responses
Section titled “Responses”The updated values.
A stored custom field value. Exactly one value_* column is populated, matching the definition’s type.
object
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
[ { "definition": { "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." ] }}