> ## 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.

# Update a schema



## OpenAPI

````yaml /openapi.json put /schemas/{id}
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/{id}:
    put:
      tags:
        - Schema
      summary: Update a schema
      operationId: updateSchema
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSchema'
      responses:
        '200':
          description: Schema updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Schema'
        '400':
          description: Invalid request
        '404':
          description: Schema not found
components:
  schemas:
    UpdateSchema:
      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
    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

````