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.
e593b0bd-b783-45b8-97c2-873d42aacaf4)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 https://www.wixapis.com/wix-data/v2/collections/{collectionId}
Endpoint: POST https://www.wixapis.com/wix-data/v2/collections
Endpoint: POST https://www.wixapis.com/wix-data/v2/collections/create-field
Same endpoint as above: POST https://www.wixapis.com/wix-data/v2/collections/create-field. The two bodies below differ only in type and typeMetadata; omitting typeMetadata fails with WDE0075 (see Error Handling).
| Type | Field Type | Relationship | Example |
|---|---|---|---|
| Single Reference | REFERENCE | One-to-one, Many-to-one | Product → Category |
| Multi-Reference | MULTI_REFERENCE | One-to-many, Many-to-many | Product → Tags |
Single reference — typeMetadata.reference names the referenced collection:
Multi-reference — typeMetadata.multiReference also names the field created on the other collection:
To link items through these fields, see Reference Fields in the CMS Data Items CRUD recipe.
Warning: This permanently deletes all data stored in this field across all items.
Endpoint: POST https://www.wixapis.com/wix-data/v2/collections/delete-field
Endpoint: PATCH https://www.wixapis.com/wix-data/v2/collections/{collectionId}
This works for displayName/displayField. Permission updates currently fail with WDE0075: Not recognized role provided in permissions. Use the full-replace endpoint below to update a collection's permissions.
To change permissions on an existing collection, use the full-replace endpoint instead (UpdateDataCollection, not PatchDataCollection) — it requires the collection's current revision and full fields array (get both from a GET first), but it does work:
Endpoint: PUT https://www.wixapis.com/wix-data/v2/collections
Don't delete and recreate a collection just to change its permissions — this full-replace call is the working path.
| 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/..." |
MEDIA_IMAGE | Wix Media Image | { "id": "<mediaId>", "url": "http://...", "height": 640, "width": 480, "altText": "Picture" } |
MEDIA_VECTOR_ART | Wix Media Vector Art | { "uri": "wix:vector://v1/...", "viewBox": "0 0 100 100", "contentType": "shape", "svgContent": "<svg>...</svg>" } |
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 |
PRIVILEGED | Access to collection is controlled per role |
ADMIN | Site admins only |
| Error | Cause | Solution |
|---|---|---|
WDE0075 (Metadata for Reference type field not provided) | create-field with type REFERENCE or MULTI_REFERENCE but no typeMetadata | Send typeMetadata.reference.referencedCollectionId (or typeMetadata.multiReference…), see Add a Reference Field |
WDE0075 (Not recognized role provided in permissions) | PATCH /collections/{id} with a permissions change | Use the full-replace PUT /collections (see Update Collection Settings) or the Data Permissions API |
WDE0110 | Wix CMS (Wix Data) app is not installed on the site | Install it: POST https://www.wixapis.com/apps-installer-service/v1/app-instance/install with body {"tenant":{"tenantType":"SITE","id":"<SITE_ID>"},"appInstance":{"appDefId":"e593b0bd-b783-45b8-97c2-873d42aacaf4"}}, then retry. See the Install Wix Apps recipe. |
Last updated: 30 September 2026