> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create schema

> Create a new schema in the specified catalog.



## OpenAPI

````yaml post /api/metastore/catalogs/{catalog}/schemas
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/metastore/catalogs/{catalog}/schemas:
    post:
      tags:
        - Metastore
      summary: Create schema
      description: Create a new schema in the specified catalog.
      operationId: create_schema_api_metastore_catalogs__catalog__schemas_post
      parameters:
        - name: catalog
          in: path
          required: true
          schema:
            type: string
            title: Catalog
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSchemaRequest'
      responses:
        '200':
          description: Data retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSchemaResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    CreateSchemaRequest:
      properties:
        schema_name:
          type: string
          title: Schema Name
          description: Name of the schema. Must be unique within the catalog.
        properties:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Properties
          description: Optional schema-level properties such as description or tags.
      type: object
      required:
        - schema_name
      title: CreateSchemaRequest
    CreateSchemaResponse:
      properties:
        status:
          type: string
          title: Status
          description: Final status of the create schema operation.
          default: CREATED
        catalog:
          type: string
          title: Catalog
          description: Catalog where you created the schema.
        schema:
          type: string
          title: Schema
          description: Name of the schema you created.
      type: object
      required:
        - catalog
        - schema
      title: CreateSchemaResponse
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````