dotCMS Content Type Field API
Content type field definitions and configuration
Operations 36
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“What kinds of fields can I add to a content type in dotCMS?”
“Which field types are available when configuring a content type?”
Tell an agent
List every field type I can use when building a content type.
Show me the catalog of available content type field types.
GET
/api/v1/contenttype/{typeId}/fields
List a content type's fields (deprecated v1) · Get content type fields (deprecated)
#
Ask an LLM
“How do I get all fields of a content type through the old v1 fields endpoint?”
“Can the deprecated v1 API still list a content type's fields by its type ID?”
Tell an agent
Using the deprecated v1 endpoint, list all fields of content type {typeId}.
Fetch the v1 field list for content type ID {typeId}.
PUT
/api/v1/contenttype/{typeId}/fields
Bulk update content type fields (deprecated v1) · Update content type fields (deprecated)
#
Ask an LLM
“Can I update several fields of a content type at once with the legacy v1 API?”
“Is there a deprecated v1 call that saves multiple field changes in one request?”
Tell an agent
Through the deprecated v1 API, update multiple fields on content type {typeId} in one request.
Bulk-save field changes for content type {typeId} using the old v1 fields endpoint.
POST
/api/v1/contenttype/{typeId}/fields
Add a field to a content type (deprecated v1) · Create content type field (deprecated)
#
Ask an LLM
“How do I add a new field to a content type with the deprecated v1 fields API?”
“What does the old v1 endpoint need to create a field, like its class and name?”
Tell an agent
With the v1 API, add a field named {name} of class {clazz} to content type {typeId}.
Create a required v1 field {name} ({clazz}) on content type {typeId} with hint {hint}.
DELETE
/api/v1/contenttype/{typeId}/fields
Delete several fields (deprecated v1) · Delete multiple fields (deprecated)
#
Ask an LLM
“Can I remove multiple fields from a content type in one call with the old v1 API?”
“How do I bulk delete fields by their IDs using the deprecated v1 endpoint?”
Tell an agent destructive · confirm first
Using the deprecated v1 endpoint, delete a batch of fields from content type {typeId}.
Bulk-remove the listed field IDs from content type {typeId} via the legacy v1 API.
GET
/api/v1/contenttype/{typeId}/fields/id/{fieldId}
Get a field by ID (deprecated v1) · Get content type field by ID (deprecated)
#
Ask an LLM
“How do I look up one content type field by its field ID with the v1 API?”
“Does the deprecated v1 endpoint return a single field's settings by ID?”
Tell an agent
Via the deprecated v1 API, get field {fieldId} from content type {typeId}.
Show the v1 definition of field ID {fieldId} on content type {typeId}.
PUT
/api/v1/contenttype/{typeId}/fields/id/{fieldId}
Update a field by ID (deprecated v1) · Update content type field by ID (deprecated)
#
Ask an LLM
“How do I change one field identified by its ID using the legacy v1 API?”
“Can the old v1 endpoint update a single field's settings by field ID?”
Tell an agent
Using the deprecated v1 API, update field {fieldId} on content type {typeId}.
Save changes to v1 field ID {fieldId} in content type {typeId}.
DELETE
/api/v1/contenttype/{typeId}/fields/id/{fieldId}
Delete a field by ID (deprecated v1) · Delete content type field by ID (deprecated)
#
Ask an LLM
“How do I delete a single field by its ID with the deprecated v1 fields API?”
“Can I remove one field from a content type through the old v1 by-ID endpoint?”
Tell an agent destructive · confirm first
Through the v1 API, delete field {fieldId} from content type {typeId}.
Remove v1 field ID {fieldId} from content type {typeId}.
GET
/api/v1/contenttype/{typeId}/fields/var/{fieldVar}
Get a field by variable name (deprecated v1) · Get content type field by variable name (deprecated)
#
Ask an LLM
“How do I find a field by its variable name using the old v1 API?”
“Can the deprecated v1 endpoint look up a field by velocity variable instead of ID?”
Tell an agent
With the deprecated v1 API, get the field with variable {fieldVar} on content type {typeId}.
Show v1 field {fieldVar} (by variable name) from content type {typeId}.
PUT
/api/v1/contenttype/{typeId}/fields/var/{fieldVar}
Update a field by variable name (deprecated v1) · Update content type field by variable name (deprecated)
#
Ask an LLM
“Can I update a field addressed by its variable name through the v1 API?”
“How do I edit a content type field by velocity variable using the deprecated endpoint?”
Tell an agent
Using the v1 API, update the field with variable {fieldVar} on content type {typeId}.
Save changes to v1 field variable {fieldVar} in content type {typeId}.
DELETE
/api/v1/contenttype/{typeId}/fields/var/{fieldVar}
Delete a field by variable name (deprecated v1) · Delete content type field by variable name (deprecated)
#
Ask an LLM
“How do I delete a field by its variable name with the old v1 API?”
“Can the deprecated v1 endpoint remove a field when I only know its velocity variable?”
Tell an agent destructive · confirm first
Via the deprecated v1 API, delete the field with variable {fieldVar} from content type {typeId}.
Remove v1 field {fieldVar} by variable name from content type {typeId}.
GET
/api/v1/contenttype/{typeId}/fields/id/{fieldId}/variables
List a field's variables by field ID · Get field variables by field ID
#
Ask an LLM
“How do I see all field variables attached to a field when I have its ID?”
“What field variables are configured on a given content type field?”
Tell an agent
List the field variables on field ID {fieldId} of content type {typeId}.
Show every key/value field variable for field {fieldId} in content type {typeId}.
POST
/api/v1/contenttype/{typeId}/fields/id/{fieldId}/variables
Add a field variable by field ID · Create field variable by field ID
#
Ask an LLM
“How do I add a field variable to a field identified by its ID?”
“Can I attach a new key/value setting to a content type field using the field ID?”
Tell an agent
Create a new field variable on field ID {fieldId} of content type {typeId}.
Add a field variable to field {fieldId} (by ID) in content type {typeId}.
GET
/api/v1/contenttype/{typeId}/fields/var/{fieldVar}/variables
List a field's variables by field variable name · Get field variables by field variable name
#
Ask an LLM
“How do I list field variables when I only know the field's velocity variable name?”
“Which field variables exist on a field I reference by variable name?”
Tell an agent
List the field variables on field {fieldVar} (by variable name) of content type {typeId}.
Show all field variables for the field named by variable {fieldVar} in content type {typeId}.
POST
/api/v1/contenttype/{typeId}/fields/var/{fieldVar}/variables
Add a field variable by field variable name · Create field variable by field variable name
#
Ask an LLM
“Can I create a field variable on a field addressed by its velocity variable name?”
“How do I add a key/value field variable without knowing the field's ID?”
Tell an agent
Create a field variable on field {fieldVar} (by variable name) of content type {typeId}.
Add a new field variable to the field with velocity variable {fieldVar} in content type {typeId}.
GET
/api/v1/contenttype/{typeId}/fields/id/{fieldId}/variables/id/{fieldVarId}
Get one field variable via field ID · Get specific field variable by field ID
#
Ask an LLM
“How do I read a single field variable when I know the field ID and the variable ID?”
“Can I fetch just one field variable rather than the whole list for a field ID?”
Tell an agent
Get field variable {fieldVarId} on field ID {fieldId} of content type {typeId}.
Show the value of field variable {fieldVarId} for field {fieldId} in content type {typeId}.
PUT
/api/v1/contenttype/{typeId}/fields/id/{fieldId}/variables/id/{fieldVarId}
Update a field variable via field ID · Update field variable by field ID
#
Ask an LLM
“How do I change an existing field variable on a field I reference by ID?”
“Can I edit a field variable's value using the field ID and variable ID?”
Tell an agent
Update field variable {fieldVarId} on field ID {fieldId} of content type {typeId}.
Change the stored value of field variable {fieldVarId} for field {fieldId} in content type {typeId}.
DELETE
/api/v1/contenttype/{typeId}/fields/id/{fieldId}/variables/id/{fieldVarId}
Delete a field variable via field ID · Delete field variable by field ID
#
Ask an LLM
“How do I remove a field variable from a field identified by its ID?”
“Can I delete one field variable using the field ID and variable ID?”
Tell an agent destructive · confirm first
Delete field variable {fieldVarId} from field ID {fieldId} of content type {typeId}.
Remove variable {fieldVarId} from field {fieldId} in content type {typeId}.
GET
/api/v1/contenttype/{typeId}/fields/var/{fieldVar}/variables/id/{fieldVarId}
Get one field variable via field variable name · Get specific field variable by field variable name
#
Ask an LLM
“How do I read one field variable when I reference the field by its velocity variable?”
“Can I fetch a single field variable by ID on a field named by variable?”
Tell an agent
Get field variable {fieldVarId} on field {fieldVar} (by variable name) of content type {typeId}.
Show variable {fieldVarId} of the field with velocity variable {fieldVar} in content type {typeId}.
PUT
/api/v1/contenttype/{typeId}/fields/var/{fieldVar}/variables/id/{fieldVarId}
Update a field variable via field variable name · Update field variable by field variable name
#
Ask an LLM
“How do I edit a field variable on a field I reference by velocity variable name?”
“Can I update a field variable without knowing the parent field's ID?”
Tell an agent
Update field variable {fieldVarId} on field {fieldVar} (by variable name) of content type {typeId}.
Change variable {fieldVarId} on the field with velocity variable {fieldVar} in content type {typeId}.
DELETE
/api/v1/contenttype/{typeId}/fields/var/{fieldVar}/variables/id/{fieldVarId}
Delete a field variable via field variable name · Delete field variable by field variable name
#
Ask an LLM
“How do I delete a field variable from a field referenced by its velocity variable?”
“Can I remove a field variable when I only know the field's variable name?”
Tell an agent destructive · confirm first
Delete field variable {fieldVarId} from field {fieldVar} (by variable name) of content type {typeId}.
Remove variable {fieldVarId} from the field with velocity variable {fieldVar} in content type {typeId}.
GET
/api/v2/contenttype/{typeIdOrVarName}/fields
List a content type's fields (v2) · Get content type fields
#
Ask an LLM
“How do I list a content type's fields with the v2 API using its ID or variable name?”
“Can the v2 fields endpoint return fields when I only know the content type's variable name?”
Tell an agent
Using the v2 fields API, list all fields of content type {typeIdOrVarName}.
Get the v2 field list for content type ID or variable {typeIdOrVarName}.
PUT
/api/v2/contenttype/{typeIdOrVarName}/fields
Bulk update content type fields (v2) · Update fields
#
Ask an LLM
“How do I update several fields of a content type in one v2 request?”
“Can the v2 API save multiple field edits addressed by content type variable name?”
Tell an agent
With the v2 API, update multiple fields on content type {typeIdOrVarName} at once.
Bulk-save v2 field changes for content type {typeIdOrVarName}.
POST
/api/v2/contenttype/{typeIdOrVarName}/fields
Add a field to a content type (v2) · Create content type field
#
Ask an LLM
“How do I add a new field to a content type with the v2 fields API?”
“Can I create a field on a content type referenced by its variable name in v2?”
Tell an agent
Using the v2 API, create a new field on content type {typeIdOrVarName}.
Add a v2 field definition to content type {typeIdOrVarName}.
Ask an LLM
“How do I remove multiple fields from a content type with the v2 API?”
“Can v2 bulk delete fields from a content type I name by variable?”
Tell an agent destructive · confirm first
With the v2 API, delete a batch of fields from content type {typeIdOrVarName}.
Bulk-remove fields from content type {typeIdOrVarName} through the v2 fields endpoint.
GET
/api/v2/contenttype/{typeIdOrVarName}/fields/id/{fieldId}
Get a field by ID (v2) · Get content type field by id
#
Ask an LLM
“How do I fetch one content type field by its ID through the v2 API?”
“Does the v2 fields API return a single field's full definition?”
Tell an agent
Using the v2 API, get content type field {fieldId}.
Show the v2 definition of field ID {fieldId}.
PUT
/api/v2/contenttype/{typeIdOrVarName}/fields/id/{fieldId}
Update a field by ID (v2) · Update content type field by id
#
Ask an LLM
“How do I update a single content type field by ID with the v2 API?”
“Can I change one field's settings through the v2 by-ID endpoint?”
Tell an agent
With the v2 API, update content type field {fieldId}.
Save new settings for v2 field ID {fieldId}.
DELETE
/api/v2/contenttype/{typeIdOrVarName}/fields/id/{fieldId}
Delete a field by ID (v2) · Delete content type field by id
#
Ask an LLM
“How do I delete one content type field by its ID in the v2 API?”
“Can the v2 by-ID endpoint remove a single field?”
Tell an agent destructive · confirm first
Using the v2 API, delete content type field {fieldId}.
Remove v2 field ID {fieldId} from its content type.
GET
/api/v2/contenttype/{typeIdOrVarName}/fields/var/{fieldVar}
Get a field by variable name (v2) · Get content type field by var
#
Ask an LLM
“How do I look up a field by its variable name with the v2 API?”
“Can v2 return a field when I know both the content type and field variable names?”
Tell an agent
With the v2 API, get field {fieldVar} from content type {typeIdOrVarName}.
Show v2 field variable {fieldVar} on content type {typeIdOrVarName}.
PUT
/api/v2/contenttype/{typeIdOrVarName}/fields/var/{fieldVar}
Update a field by variable name (v2) · Update content type field by var
#
Ask an LLM
“How do I update a field addressed by variable name through the v2 API?”
“Can v2 edit a field when I reference it by its velocity variable?”
Tell an agent
Using the v2 API, update field {fieldVar} on content type {typeIdOrVarName}.
Save changes to v2 field variable {fieldVar} in content type {typeIdOrVarName}.
DELETE
/api/v2/contenttype/{typeIdOrVarName}/fields/var/{fieldVar}
Delete a field by variable name (v2) · Delete content type field by var
#
Ask an LLM
“How do I delete a field by its variable name with the v2 API?”
“Can the v2 endpoint remove a field I name by velocity variable?”
Tell an agent destructive · confirm first
With the v2 API, delete field {fieldVar} from content type {typeIdOrVarName}.
Remove v2 field variable {fieldVar} from content type {typeIdOrVarName}.
GET
/api/v3/contenttype/{typeIdOrVarName}/fields/allfields
Filter a content type's fields by criteria · Returns filtered Content Type fields
#
Ask an LLM
“Can I get only the fields of a content type that match a filter?”
“Which fields in a content type meet the criteria I specify?”
Tell an agent
List the fields in content type {typeIdOrVarName} that match filter {filter}.
Return the filtered set of fields for content type {typeIdOrVarName}.
GET
/api/v3/contenttype/{typeIdOrVarName}/fields
Get a content type's field layout · Gets a Content Type's field layout
#
Ask an LLM
“How are a content type's fields arranged into rows and columns?”
“Can I see the edit-form layout of a content type without changing anything?”
Tell an agent
Show the row and column field layout of content type {typeIdOrVarName}.
Get the current field layout for content type {typeIdOrVarName}, repaired if invalid.
DELETE
/api/v3/contenttype/{typeIdOrVarName}/fields
Delete fields and return the updated layout · Deletes fields from a Content Type
#
Ask an LLM
“How do I delete fields from a content type and get back the new layout?”
“Why can't I delete the field used as a content type's publish or expire date?”
Tell an agent destructive · confirm first
Delete fields {fieldsID} from content type {typeIdOrVarName} and return the updated layout.
Remove those field IDs from content type {typeIdOrVarName} and tell me which were actually deleted.
PUT
/api/v3/contenttype/{typeIdOrVarName}/fields/move
Move or add a field in the layout · Moves or adds a field to a Content Type
#
Ask an LLM
“How do I move a field to a different row or column in a content type's layout?”
“Can I drag and drop a new field into a content type programmatically?”
Tell an agent
Move a field to a new position in the layout of content type {typeIdOrVarName}.
Drop a new field into the layout of content type {typeIdOrVarName}.
PUT
/api/v3/contenttype/{typeIdOrVarName}/fields/{id}
Update a field wrapped in a field object · Updates a field in a Content Type
#
Ask an LLM
“How do I change a widget field's widgetCode on a content type?”
“What request shape does the v3 field update expect, with the top-level field property?”
Tell an agent
Update field {id} on content type {typeIdOrVarName} with field definition {field}.
Change the values of widget field {id} in content type {typeIdOrVarName}, preserving its other attributes.
Documentation
📖
Documentation
https://dev.dotcms.com/docs/build/apis/api-basics/rest-apis
📖
APIReference
https://dev.dotcms.com/docs/build/apis/rest-apis/api-playground
Specifications
Other Resources
🔗
DeveloperPortal
https://dev.dotcms.com/
🔗
ErrorCatalog
https://raw.githubusercontent.com/api-evangelist/dotcms/refs/heads/main/errors/dotcms-problem-types.yml
🔗
DataModel
https://raw.githubusercontent.com/api-evangelist/dotcms/refs/heads/main/data-model/dotcms-data-model.yml
🔗
Conventions
https://raw.githubusercontent.com/api-evangelist/dotcms/refs/heads/main/conventions/dotcms-conventions.yml