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

# Merge and update project schema

> Merges the provided schema with the existing schema and creates a new version.



## OpenAPI

````yaml patch /project/{id}/schema
openapi: 3.0.0
info:
  title: Basic Admin API
  description: API for Basic Admin
  version: 0.1.0
servers:
  - url: https://api.basic.tech
    description: Production server
  - url: https://beta.api.basic.tech
    description: Staging server
  - url: http://localhost:3003
    description: Development server
security: []
tags:
  - name: auth
    description: Authentication and authorization end-points
  - name: projects
    description: Project management end-points
  - name: project-keys
    description: Project API key management end-points
  - name: project-users
    description: Project user management end-points
  - name: project-schema
    description: Project schema management end-points
  - name: project-upload
    description: Project image upload end-points
  - name: teams
    description: Project user management end-points
  - name: utils
    description: Utility end-points - very useful, trust me
externalDocs:
  url: https://docs.basic.tech
  description: Find more info here
paths:
  /project/{id}/schema:
    patch:
      tags:
        - project-schema
      summary: Merge and update project schema
      description: >-
        Merges the provided schema with the existing schema and creates a new
        version.
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
          description: Unique identifier of the project
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - schema
              properties:
                schema:
                  type: object
                  description: Schema changes to merge with the existing schema
                  properties: {}
                  additionalProperties: true
        required: true
      responses:
        '200':
          description: Schema merged and updated successfully
          content:
            application/json:
              schema:
                description: Schema merged and updated successfully
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      project_id:
                        type: string
                      schema:
                        type: object
                        properties: {}
                        additionalProperties: true
                      updated_at:
                        type: string
                        format: date-time
        '400':
          description: Bad Request - Invalid schema or merge conflict
          content:
            application/json:
              schema:
                description: Bad Request - Invalid schema or merge conflict
                type: object
                properties:
                  error:
                    type: string
                  valid:
                    type: boolean
                  errors:
                    type: array
                    items:
                      type: object
                      properties: {}
                      additionalProperties: true
        '404':
          description: Project not found
          content:
            application/json:
              schema:
                description: Project not found
                type: object
                properties:
                  error:
                    type: string
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                description: Internal server error
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT Authorization Token header using the Bearer scheme
    apiKeyAuth:
      type: http
      scheme: bearer
      description: API Key Authorization header using the Bearer scheme

````