This recipe covers managing the structure (schema) of Wix CMS collections using the REST API.
Lightweight listing (recommended for existence checks):
Full listing (includes all field schemas):
Collection Types: NATIVE (user-created), WIX_APP (Wix app collections), BLOCKS_APP, EXTERNAL
Endpoint: GET /wix-data/v2/collections/{collectionId}
Endpoint: POST /wix-data/v2/collections
Endpoint: POST /wix-data/v2/collections/create-field
Warning: This permanently deletes all data stored in this field across all items.
Endpoint: POST /wix-data/v2/collections/delete-field
Endpoint: PATCH /wix-data/v2/collections/{collectionId}
| Type | Description | Example Value |
|---|---|---|
TEXT | String | "Hello World" |
NUMBER | Numeric | 99.99 |
BOOLEAN | True/false | true |
DATE | Date only | "2024-01-15" |
DATETIME | Date and time | { "$date": "2024-01-15T10:00:00.000Z" } |
IMAGE | Image reference | "wix:image://v1/..." |
URL | Web URL | "https://example.com" |
RICH_TEXT | HTML content | "<p>Rich text</p>" |
ARRAY_STRING | Array of strings | ["tag1", "tag2"] |
OBJECT | JSON object | {"key": "value"} |
REFERENCE | Single reference | Item ID string |
MULTI_REFERENCE | Multiple references | Array of IDs |
| Role | Description |
|---|---|
ANYONE | All visitors (including anonymous) |
SITE_MEMBER | Logged-in site members |
SITE_MEMBER_AUTHOR | Members who created the item |
ADMIN | Site admins only |