Create Field

POST /api/v1/objects/:id/fields

Adds a field after the object's last field.

CLI: fob-mdm fields create

Path Parameters

ParameterTypeDescription
idnumberObject id

Request Body

FieldTypeRequiredDescription
keystringYesMachine name: lowercase letters, numbers and underscores, starting with a letter. Can't be changed later
labelstringYesDisplay name
typestringNotext (default), number, date or boolean
requiredbooleanNoEvery record should have it. Default false
is_identitybooleanNoThe field that identifies the same entity across apps, such as GSTIN. Default false

Example Request

curl -X POST "https://mdm.finopsbricks.com/api/v1/objects/1/fields" \
  -H "api-key: $MDM_API_KEY" \
  -H "api-secret: $MDM_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "gstin",
    "label": "GSTIN",
    "is_identity": true
  }'

Response

201 Created

{
  "data": {
    "id": 11,
    "object": 1,
    "key": "gstin",
    "label": "GSTIN",
    "type": "text",
    "required": false,
    "is_identity": true,
    "position": 2,
    "retired_at": null,
    "created_at": "2026-11-26T07:20:08.000Z",
    "updated_at": "2026-11-26T07:20:08.000Z"
  }
}

Errors

StatusCodeWhen
400VALIDATION_ERRORkey or label is missing or malformed, or type isn't allowed (details.allowed lists the types)
401UNAUTHORIZEDMissing, wrong or expired API credentials
403FORBIDDENThe key lacks fields:create permission
404NOT_FOUNDNo such object in your organization
409CONFLICTThe object already has this key, retired or not

See Errors for the envelope.

Using an AI agent? Give it the raw Markdown of this page, or the docs index.