Table of Contents


EntityField Resource

Add columns to a custom or standard entity. Every custom field receives a __c suffix automatically — send the plain name in the payload.

See the Entity Management API Overview for auth, permissions, and response shape, and Field Type Reference for the per-type required properties.


Create a Field

POST /api/3.0/entity/EntityField
Authorization: Bearer <token>
Content-Type: application/json
Accept: application/json

{
  "EntityId": "7NS0000000000A50001",
  "Name": "ContractNumber",
  "Label": "Contract Number",
  "FieldTypeId": "7NY0000000000000000",
  "Length": 100
}

The response returns the new field ID:

{ "id": "7NX0000000000CB0001", "errors": [], "success": true }

Payload Reference

PropertyTypeRequiredNotes
EntityIdstringyesThe Entity this field belongs to.
Namestring (≤77)yesAPI name. Alphanumeric, cannot contain spaces, cannot be purely numeric, cannot equal the parent entity's Name. Reserved names (listed below) are rejected. Send the plain name; __c is appended for custom fields.
Labelstring (≤70)yesDisplay label.
FieldTypeIdstringyesThe type of field. See Field Type Reference. IDs are case-sensitive.
Descriptionstring (≤255)noAdmin-facing description.
HelpTextstring (≤510)noHelp text shown next to the field in Setup and the UI.
DefaultValuestring (≤2046)noDefault value. Format-validated per type (must be a valid email / URL / phone / date / boolean / etc.). See per-type notes in the Field Type Reference.
IsRequiredboolnoRecords must have a value on save. Not allowed on Formula, RollupSummary, or Calculated fields. Setting this also adds the field to the entity's default page layouts.
IsUniqueboolnoValues must be unique across records. Allowed on Text, Number, Currency, Percent, Email, Phone, URL, Date, DateTime, and AutoNumber fields only.
SearchableboolnoInclude the field in the entity's search index.
IsAuditedboolnoTrack changes to this field in the audit log. Not allowed on external-schema entities (Salesforce, Dynamics).
IsCreateableboolnoWhether the field is writable on record create.
IsUpdateableboolnoWhether the field is writable on record update.
Lengthinttype-dependentRequired for Text and TextArea. Required for Number/Currency/Percent (digits left of the decimal). See the per-type table.
DecimalPlacesinttype-dependentRequired for Number/Currency/Percent. Also settable on Formula, RollupSummary, and Calculated for numeric return types.
NumberOfVisibleLinesinttype-dependentRequired for TextArea and PicklistMultiSelect. Sets the visible line-count (TextArea) or list-box height (PicklistMultiSelect).
DisplayFormatstringAutoNumber onlyAuto-number pattern for the field. Same regex as entity-level AutoNumberFormat — must contain exactly one {0:0+} counter token.
StartingNumberlongAutoNumber onlyFirst number issued.
IncrementslongAutoNumber onlyStep between numbers.
PicklistSortAlphabeticallyboolPicklist onlyDisplay picklist values alphabetically instead of by their Order.
PicklistTypeIdstringGlobalPicklist onlyThe GlobalPicklistType whose values this field binds to. See Picklists and Global Picklists.
PicklistsarrayPicklist / MultiSelectEmbedded values on create only. See Picklists and Global Picklists.
RelatedToEntityIdstringLookup / MasterDetail / RollupThe target entity for a relationship (for Rollup, the child entity being aggregated).
RelatedToRelationshipNamestringLookup / MasterDetailDisplay label for the related-records section on the parent's page layout.
RelatedToFilterFieldIdstringRollup onlyThe Master-Detail or Lookup field on the child that links back to the parent.
RelatedToFieldIdstringRollup / FormulaFor Rollup: the child field being aggregated. For Formula: the return-type field-type ID.
LookupFilterobjectLookup / MasterDetailRestrict which records are selectable. See Lookup Filters.
RollupFilterCriteriaarrayRollup onlyOnly children matching all criteria are included. See Rollup Summary Fields.
FieldOptionsobjectnoNested per-type options — see below.

Reserved Field Names

These names are rejected on create — they are already provisioned by the platform:

Id, Name, OwnerId, IsDeleted, CreatedOn, ModifiedOn, CreatedById, ModifiedById, RecordTypeId

The comparison is case-insensitive against the base name (before the __c suffix). Additionally, a field's Name cannot equal its parent entity's Name, cannot contain spaces, and cannot be purely numeric.


FieldOptions

Advanced per-field options live inside a nested FieldOptions object. Send only options that apply to the field type — unrelated options are rejected.

OptionApplies toNotes
IsHtmlFieldTextAreaTurns the TextArea into a rich-text / HTML editor. Cannot be reverted once enabled.
TreatBlankAsZeroNumber / Currency / PercentTreat a blank value as 0 in formulas and rollups. Defaults to true.
DateTimeOptionsDateTimeStorage granularity: "Minutes" (default), "Seconds", or "Milliseconds".
AllowReparentingMasterDetailAllow a child record to be moved to a different parent.
RecordAuditingEnabledAnyEnable external-audit tracking on this field.
MinValue / MaxValueNumber / Currency / PercentEnforce a minimum or maximum numeric value.
{
  "EntityId": "7NS0000000000A50001",
  "Name": "Notes",
  "Label": "Notes",
  "FieldTypeId": "7NY0000000000040000",
  "Length": 32000,
  "NumberOfVisibleLines": 5,
  "FieldOptions": { "IsHtmlField": true }
}

Get a Field

GET /api/3.0/entity/EntityField/<field id>
Authorization: Bearer <token>
Accept: application/json

List Fields on an Entity

GET /api/3.0/entity/EntityField?entityid=<entity id>&limit=200
Authorization: Bearer <token>
Accept: application/json

Supports the same filters, sorting, and pagination as the record-CRUD API (see Read records).


Update a Field

PATCH /api/3.0/entity/EntityField/<field id>
Authorization: Bearer <token>
Content-Type: application/json
Accept: application/json

{
  "Label": "Contract # (Updated)",
  "HelpText": "External contract number from the CRM."
}

Editable after creation

  • Label, Description, HelpText, DefaultValue, IsRequired, Searchable, IsAudited.
  • Length — can be increased on Text fields. Cannot be increased above 4,000 if the field is referenced by any formula.
  • PicklistSortAlphabetically, NumberOfVisibleLines.
  • LookupFilter — the full filter is replaced on PATCH (send the complete criteria array).
  • FieldOptions.* — partial merge; only the keys you send are updated, the rest are preserved.

Immutable after creation

  • FieldTypeId — the field type cannot be changed. Delete and recreate if a type change is needed.
  • Name — the API name is set at creation and does not change.
  • RelatedToEntityId and RelatedToFieldId when the field is already referenced by another field (formula, rollup, etc.).
  • On "critical" entities (User, Account, Contact, and other platform-managed types), even data-type-compatible property changes may be rejected.

Delete a Field

DELETE /api/3.0/entity/EntityField/<field id>
Authorization: Bearer <token>

Deletion drops the underlying database column and all its data. It is blocked, not cascaded, in these cases:

  • The field is referenced by a RecordType.
  • The field is referenced by a field on another entity (Lookup target, cross-entity formula).
  • The field is referenced by a formula on the same entity.

Remove the dependent references first, then retry the delete.


Status Codes

HTTPWhen
200 / 201Operation succeeded.
404 Not FoundYou lack permission on the EntityField resource, or the referenced entity does not exist.
406 Not AcceptableValidation failed — missing required per-type property, invalid Name, reserved name, duplicate name on the entity, attempt to change immutable property, unsupported FieldOptions for the type, or DELETE blocked by a dependency.

<< Entity Resource | Field Type Reference >>

Last updated on 7/28/2026

Attachments