POST

Create Schema


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates a translation schema.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Wix Multilingual - Translation Schema Write
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/translation-schema/v1/schemas

Body Params
schemaSchemaRequired

Translation schema to create.

Response Object
schemaSchema

Newly created translation schema.

Request
cURL
curl -X POST \ 'https://www.wixapis.com/translation-schema/v1/schemas' \ -H 'Authorization: <AUTH>' \ -H 'Content-Type: application/json' \ --data-binary '{ "schema": { "key": { "entityType": "Product", "scope": "GLOBAL" }, "fields": { "title": { "type": "SHORT_TEXT", "displayName": "Title", "minLength": 1, "maxLength": 54, "hidden": false, "displayOnly": false }, "description": { "type": "RICH_CONTENT", "displayName": "Description", "minLength": 1, "maxLength": 256, "hidden": false, "displayOnly": false }, "image()": { "type": "IMAGE", "displayName": "Product Image", "hidden": false, "displayOnly": false } } } }'
Response
JSON
{ "schema": { "id": "9428de50-b559-43f7-bec4-1cb21a23f72f", "key": { "appId": "4ad2dfe1-a943-45a8-94ac-f1dd8b78821b", "entityType": "Product", "scope": "GLOBAL" }, "fields": { "title": { "id": "title", "type": "SHORT_TEXT", "displayName": "Title", "minLength": 1, "maxLength": 54, "hidden": false, "displayOnly": false }, "description": { "id": "description", "type": "RICH_CONTENT", "displayName": "Description", "minLength": 1, "maxLength": 256, "hidden": false, "displayOnly": false }, "image()": { "id": "image()", "type": "IMAGE", "displayName": "Product Image", "hidden": false, "displayOnly": false } }, "hidden": false, "revision": "1", "createdDate": "2024-09-16T10:44:08.532Z", "updatedDate": "2024-09-16T10:44:08.532Z", "duplicateContent": false } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?