CMS Schema Management

Download skillThe skill is a reference md and part of wix-manage skill. You can use the following command to add the full wix-manage skill to your project:
Copy

Standard call shape (every curl below). The <AUTH> placeholder is shorthand for Authorization: Bearer <TOKEN> only. Body-bearing requests also need Content-Type: application/json.

This recipe covers managing the structure (schema) of Wix CMS collections using the REST API.

Prerequisites

  1. Wix CMS application installed on the site (appDefId: e593b0bd-b783-45b8-97c2-873d42aacaf4)
  2. API access with CMS permissions (Manage Data Collections scope)

Required APIs

  • Collections API: REST

List All Collections

Lightweight listing (recommended for existence checks):

Copy

Full listing (includes all field schemas):

Copy

Collection Types: NATIVE (user-created), WIX_APP (Wix app collections), BLOCKS_APP, EXTERNAL

Get Collection Schema

Endpoint: GET /wix-data/v2/collections/{collectionId}

Copy

Create a New Collection

Endpoint: POST /wix-data/v2/collections

Copy

Add a Field to Existing Collection

Endpoint: POST /wix-data/v2/collections/create-field

Copy

Delete a Field from Collection

Warning: This permanently deletes all data stored in this field across all items.

Endpoint: POST /wix-data/v2/collections/delete-field

Copy

Update Collection Settings

Endpoint: PATCH /wix-data/v2/collections/{collectionId}

Copy

Field Types Reference

TypeDescriptionExample Value
TEXTString"Hello World"
NUMBERNumeric99.99
BOOLEANTrue/falsetrue
DATEDate only"2024-01-15"
DATETIMEDate and time{ "$date": "2024-01-15T10:00:00.000Z" }
IMAGEImage reference"wix:image://v1/..."
MEDIA_IMAGEWix Media Image{ "url": "http://...", "height": 640, "width": 480, "alt": "Picture" }
MEDIA_VECTOR_ARTWix Media Vector Art{ "uri": "wix:vector://v1/...", "viewBox": "0 0 100 100", "contentType": "shape", "svgContent": "<svg>...</svg>" }
URLWeb URL"https://example.com"
RICH_TEXTHTML content"<p>Rich text</p>"
ARRAY_STRINGArray of strings["tag1", "tag2"]
OBJECTJSON object{"key": "value"}
REFERENCESingle referenceItem ID string
MULTI_REFERENCEMultiple referencesArray of IDs

Permission Levels

RoleDescription
ANYONEAll visitors (including anonymous)
SITE_MEMBERLogged-in site members
SITE_MEMBER_AUTHORMembers who created the item
ADMINSite admins only
Did this help?