Skip to main content
POST
/
prod
/
v1
/
files
/
schema
/
import
Import schemas
curl --request POST \
  --url https://api.orion.file.ai/prod/v1/files/schema/import \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "file": "<string>"
}
'
{
  "success": true,
  "importedBlueprintsCount": 123,
  "importedSchemasCount": 123,
  "conflictBlueprintsCount": 123,
  "conflictBlueprints": [
    "<string>"
  ],
  "blueprintIds": [
    "<string>"
  ],
  "schemaIds": [
    "<string>"
  ]
}
Import schemas from a previously exported zip file. This endpoint allows you to restore or transfer AI schemas between workspaces.
All imported blueprints and schemas will be assigned new IDs. Metadata will be updated to the importing user’s context.

How It Works

1

1. Prepare Export File

Use the export endpoint to create a zip file with your schemas
2

2. Upload File

Submit the exported zip file as multipart/form-data
3

3. Process Import

System creates new schemas with updated metadata and IDs

Request Parameters

Request Body

The request must be sent as multipart/form-data with the following property:
PropertyTypeRequiredDescription
filefileYesThe exported zip file to import

Import Behavior

If a blueprint with the same class name already exists in the target workspace, the import will fail.

What Gets Imported

  • Blueprint configurations - Document type classifications and extraction rules
  • Schema definitions - Field mappings, validation rules, and data types
  • Relationships - Links between blueprints and schemas

What Gets Updated

  • New IDs - All imported items receive new unique identifiers
  • Metadata - Organization, workspace, and user information updated to current context
  • Timestamps - Creation and modification times reset to import time

Conflict Handling

If a blueprint with the same class name already exists, the entire import fails. You must either: - Rename the existing blueprint - Rename the blueprint in the export file - Import to a different workspace
Schema field conflicts are automatically resolved by creating new schema versions with updated field mappings.

Authorizations

x-api-key
string
header
required

API key for authentication

Body

application/json

Exported zip file

file
file

Response

Schemas imported successfully

success
boolean
required

Import success status

importedBlueprintsCount
number
required

Number of blueprints imported

importedSchemasCount
number
required

Number of schemas imported

conflictBlueprintsCount
number
required

Number of conflicting blueprints

conflictBlueprints
string[]
required

List of conflicting blueprint class names

blueprintIds
string[]
required

List of imported blueprint IDs

schemaIds
string[]
required

List of imported schema IDs