Overview
Custom Schemas allow you to define the structure of your data before importing it into gu1. Each schema describes the fields, types, validation rules, and metadata for your data source.Schemas are organization-specific and can be marked as public to share across your organization.
Create Schema
Create a new custom schema for your data source.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Schema name (1-255 characters) |
version | string | No | Version number (default: “1.0.0”) |
description | string | No | Schema description |
type | enum | Yes | Schema type: database, api, file, custom |
category | enum | Yes | Category: financial, identity, compliance, transaction, general |
schemaData | object | Yes | Schema definition with fields |
isPublic | boolean | No | Share across organization (default: false) |
Schema Data Object
| Field | Type | Required | Description |
|---|---|---|---|
fields | array | Yes | Array of field definitions |
metadata | object | No | Additional metadata (format, encoding, etc.) |
analysisResults | object | No | Auto-detection results |
Field Definition
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Field name |
type | enum | Yes | string, number, boolean, date, array, object |
required | boolean | No | Is field required (default: false) |
description | string | No | Field description |
format | string | No | Format hint (e.g., “email”, “url”) |
constraints | object | No | Validation constraints |
examples | array | No | Example values |
Constraints Object
Response
List Schemas
Get all schemas for your organization with optional filtering.Query Parameters
| Parameter | Type | Description |
|---|---|---|
type | enum | Filter by type: database, api, file, custom |
category | enum | Filter by category: financial, identity, compliance, transaction, general |
isPublic | boolean | Filter by public/private schemas |
Response
Get Schema
Retrieve a specific schema by ID.Response
Update Schema
Update an existing schema (partial updates supported).Request Body
Response
Delete Schema
Delete a schema permanently.Response
Complete Example
Here’s a complete banking customer schema with all features:Error Responses
Validation Error
Schema Not Found
Duplicate Schema
Best Practices
Versioning
Versioning
- Use semantic versioning (1.0.0, 1.1.0, 2.0.0)
- Increment major version for breaking changes
- Increment minor version for new fields
- Increment patch version for description updates
Documentation
Documentation
- Provide clear descriptions for each field
- Include examples for complex field types
- Document any business rules or constraints
- Explain the source of the data
Validation
Validation
- Always set required: true for mandatory fields
- Use constraints to enforce data quality
- Validate email formats with regex patterns
- Set reasonable min/max values for numbers
Sharing
Sharing