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

# Create a schema



## OpenAPI

````yaml /openapi.json post /schemas
openapi: 3.0.0
info:
  title: Trust Stack API
  description: Programmatic access to the Trust Stack API.
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /schemas:
    post:
      tags:
        - Schema
      summary: Create a schema
      operationId: createSchema
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSchema'
      responses:
        '201':
          description: Schema created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Schema'
        '400':
          description: Invalid request
components:
  schemas:
    CreateSchema:
      type: object
      properties:
        name:
          type: string
          description: The name of the schema
          example: My Schema
        schema:
          type: object
          description: The schema
          example:
            foo: bar
      required:
        - name
        - schema
    Schema:
      type: object
      properties:
        id:
          type: string
          description: The id of the schema
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          description: The name of the schema
          example: My Schema
        schema:
          type: object
          description: The schema
          example:
            foo: bar
      required:
        - id
        - name
        - schema

````