Set Database Field Value
Optional operation=add/remove applies atomic membership deltas for select (SELECT_MULTI) or assignee fields; value is an ID array.
POST /v1/set-database-field-value
Optional operation=add/remove applies atomic membership deltas for select (SELECT_MULTI) or assignee fields; value is an ID array. Unrelated members remain. Assignee eligibility and single-assignee rules still apply. Use the same operation, IDs, mutation ID and sequence on retry. Default operation=set keeps whole-value replacement. Set one field’s value on an existing record, generically – works for any mounted field, not just legacy custom fields. kind must match the field’s type: “text” -> {text} or {html}, “number” -> {number, currency?}, “checkbox” -> a boolean, “select” -> an array of option ids (whole-set replace), “date” -> {start, end, timezone?, granularity?}, “assignee”/“reference”/“file” -> an array of ids, “country” -> an array of country codes, “contact” -> {text, regionCode?}, “location” -> {text, latitude, longitude}. Use list-database-fields to find the fieldId and its type. Pass your own clientMutationId (any unique string) so a retry is safe, and a monotonically increasing entitySequence (e.g. the current Unix time in milliseconds) – a lower one than a previous call on the same record+field is refused as a conflict.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
operation | set | add | remove | No | Default set replaces the value. Add/remove atomically change SELECT_MULTI options or ASSIGNEE users; value is an array of IDs. |
workspaceId | string | Yes | The workspace ID |
databaseId | string | Yes | The database the record lives in |
recordId | string | Yes | The record ID |
fieldId | string | Yes | The field ID (from list-database-fields) |
kind | string | Yes | The write kind matching the field’s type, e.g. text, number, checkbox, select, date |
value | object | Yes | The value, shaped as the kind’s own doc line above describes |
clientMutationId | string | Yes | Your own idempotency key for this write |
entitySequence | number | Yes | A number greater than any you have sent before for this record+field, e.g. Date.now() |
{
"workspaceId": "workspace-id",
"databaseId": "database-id",
"recordId": "record-id",
"fieldId": "field-id",
"kind": "select",
"operation": "add",
"value": [
"option-id"
],
"clientMutationId": "field-change-001",
"entitySequence": 1
}Response
{
"outcome": "ACCEPTED",
"entityUpdatedAt": "string",
"rejection": {
"code": "string",
"message": "string"
}
}Example
curl -X POST https://rest.blue.app/v1/set-database-field-value \
-H "Authorization: Bearer $BLUE_TOKEN" \
-H "blue-org-id: $BLUE_ORG_ID" \
-H "Content-Type: application/json" \
-d '{"workspaceId":"workspace-id","databaseId":"database-id","recordId":"record-id","fieldId":"field-id","kind":"select","operation":"add","value":["option-id"],"clientMutationId":"field-change-001","entitySequence":1}'