Data Types in Wix Data

The Wix Data APIs support a wide range of data types, including numbers, plain and rich text, arrays, URLs, media files, and more. The APIs accept and return data in JSON format, so it's important to understand the structure and formatting specific to each data type. To ensure data consistency and minimize potential errors, follow these formats when querying, inserting, and updating items in a collection.

Wix Data works with a schemaless database behind the scenes. In theory, you can store any type of data in any database collection field. In practice, however, it's best to conform to each collection's schema as defined either in the Content Management System (CMS) or when using the Data Collections API. The schema is used to determine which page elements can connect to which fields and to provide a better experience for site admins when using the CMS. For example, if a field's type is set to Date and Time, its values will appear as dates in the CMS. Site admins can then connect that field to site elements that work with dates.

Field types and data types

The following table lists supported field types along with their corresponding data type and format. Many of these field types aren't supported on Harmony sites. See Field type support on Harmony sites.

Field TypeData TypeFormat
AddressObjectAn Address object. See the Address Object's structure structure.
ArrayArray
AudioStringA web URL or a Media Manager URL.

Learn more about working with media files.
BooleanBooleantrue or false
ColorStringA HEX color string, for example #FF0000.
DateStringA date string in ISO 8601 date format: YYYY-MM-DD.
Date and TimeObjectAn object in the following format: "someFieldKey": { "$date": "YYYY-MM-DDTHH:mm:ss.sssZ"}

Milliseconds can be omitted: "$date": "YYYY-MM-DDTHH:mm:ss".

Note: If you include a time when setting a date field, the value is stored as an object of type Date and Time. If you omit the time, the value is treated as a string of type Date.
DocumentStringA web URL or a Media Manager URL.

Learn more about working with media files.
EmailStringA valid email address.
ImageStringA web URL or a Media Manager URL.

Learn more about working with media files.
Media GalleryArray of image and video URLsArray items are either web URLs or Media Manager URLs.

Learn more about working with media files.
Media ImageObjectA Wix Media Image object, for example: { "id": "<mediaId>", "url": "http://...", "height": 640, "width": 480, "altText": "Picture" }. altText is optional and only included if alt text was set for the image.

Learn more about working with media files.
NumberNumber
ObjectObject
Rich ContentObjectA rich content object. Learn more about working with rich content.
Rich TextStringA string that may contain a subset of HTML tags.
Single Reference/ Multi- ReferenceSingle Reference: String/ object

Multi-reference: Array of strings/ array of objects
An item ID or multiple item IDs from the referenced collection. See Query Referenced Data Items to learn about item references.
TagsArray of strings
TextString
TimeStringA string in hh:mm:ss.SSS format.
URLStringA valid URL.
VideoStringA web URL or a Media Manager URL.

Learn more about working with media files.

Field type support on Harmony sites

Harmony sites support a smaller set of field types than other Wix sites. When you create or update a collection on a Harmony site with the Data Collections API, the following field types are rejected: Address, Array, Audio, Color, Document, Image, Media Gallery, Multi-Reference, Object, Single Reference, Tags, and Video. Use Media Image in place of Image.

The API also rejects ARRAY_DOCUMENT, an array of web or Media Manager document URLs, and LANGUAGE, a language code in ISO 639-1 format.

Rich Content is rejected on Harmony sites that haven't moved to the latest rich content editor yet. This rollout is still in progress, so treat Rich Content as unsupported unless you've confirmed it works on the specific site you're calling.

A rejected field type fails the whole request with a 400 Bad Request and a WDE0080 error naming the field and its type:

Copy

Collections that already contain a field of a rejected type keep that field, and you can keep updating those collections as long as the field's type stays the same. You can't add a new field of a rejected type.

Working with media files

With the Wix Data APIs, you can manage media items of any supported type. Items can be stored on an external service, or directly on Wix using the Wix Media Manager. Learn more about which data types are supported in the Media Manager.

To learn about uploading files to the Media Manager, see the Upload API and the Resumable Upload API. To learn how media items are stored in the Media Manager, see the List Files and Get File Descriptors endpoints.

You can convert a Media Image object to the legacy Media Manager URL (Image) format using Get Image URL.

Address object

Address objects have the following structure:

NameTypeDescription
formattedStringAddress in human-readable format.
locationObjectAddress coordinates
location.latitudeNumberAddress latitude
location.longitudeNumberAddress longitude
streetAddressObjectAddress street name and number
streetAddress.nameStringStreet name
streetAddress.numberNumberStreet number
cityStringAddress city
subdivisionStringAddress subdivision of a country, such as a state or province
countryStringAddress country
postalCodeStringAddress postal code

Last updated: 25 August 2026

Did this help?