Add a field to a collection
Adds a typed field at the end of the collection’s field order. key is lowercase snake_case (max 64 characters), must be unique in the collection, and cannot use the reserved metadata names id, slug, publishedAt, publishAt, createdAt, updatedAt, or position; type is immutable after creation. reference and multi_reference fields require a targetCollectionId in the same website, and option fields require config.choices (1–1,000 choices). A collection can hold at most 100 fields, and required: true is rejected while the collection has active items — add the field as optional, backfill every item, then mark it required.
Authorizations
Cactal API key. Create one in the dashboard or via POST /apiKeys. The plaintext key is shown once at creation.
Path Parameters
1Body
^[a-z][a-z0-9_]{0,63}$1 - 200plain_text, markdown, number, boolean, date, link, email, color, option, reference, multi_reference, image, gallery, file 20001Response
The created field.
Unique field id.
Id of the owning collection.
JSON key under item data. Lowercase snake_case, max 64 characters, unique per collection. Changed only via key on the update-field endpoint, which migrates stored data.
Human-readable name, 1–200 characters.
Optional description, up to 2,000 characters.
Value type. Immutable after creation.
plain_text, markdown, number, boolean, date, link, email, color, option, reference, multi_reference, image, gallery, file Whether every item must carry a non-null value for this field. Enforced on write.
Whether values must be unique across the collection’s active items. Not supported for plain_text, markdown, multi_reference, image, gallery, or file fields.
Fractional ordering key; fields sort lexicographically by this value.
Optional example value used as a design-phase placeholder. Any JSON value; null when unset.
Type-specific configuration. Present for option fields only; null for all other types.
For reference and multi_reference fields, the id of the collection referenced items must belong to (same website). null otherwise. Immutable.