schema_save
Save/upload schemas into a project. Schemas are validated before saving and linked to the project. Returns the saved schemas with their UUIDs; skipped schemas carry the platform's reason.
IMPORTANT: Pass FLAT schema objects directly — do NOT wrap in schema_content. The tool handles schema_type detection and wrapping automatically.
Required fields: name, namespace, parent_type, attributes. Set namespace to your app's namespace (e.g. 'shop'); the schema is stored as namespace:name. Mark required attributes with "mandatory": true.
Supported attribute types: 'string' for text, 'float' for decimal numbers (NOT 'number'), 'integer' for whole numbers, 'boolean' for true/false.
project_uuid defaults to your key's project; a project-scoped key can only save into its own project. A schema skipped for compatibility warnings is applied with force_upload=true.
Example: { "schemas": [{ "name": "product", "namespace": "shop", "description": "Product catalog entry", "parent_type": "tenant", "attributes": [ {"name": "title", "type": "string", "mandatory": true}, {"name": "price", "type": "float"}, {"name": "stock", "type": "integer"} ] }] }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schemas | Yes | Array of schema definitions to save. | |
| force_upload | No | Apply changes that only have compatibility WARNINGS (default: false). Breaking changes are still refused. | |
| project_uuid | No | Project to save into (defaults to your key's project; required for a domain-admin key). | |
| skip_existing | No | Skip schemas that already exist (default: true). |