---
updatedAt: 2026-04-24T18:36:38.000Z
agentTools:
  projectIndex: https://docs.docupipe.ai/llms.txt
---

# Edit a Schema

Edit a schema by providing a schema ID and the parameters you want to edit. This does not create a new schema, but rather updates the existing schema. Changing the schema name is purely cosmetic, but changing the description and guidelines will affect the behavior of the schema for future standardizations. The things you can edit are:

1. `schemaName` - The name of the schema
2. `description` - The description of the schema
3. `guidelines` - The guidelines for the schema
4. `jsonSchema` - The complete schema with updated field descriptions. Only descriptions may differ; field names, types, order, nesting, enums and other attributes must remain unchanged.

**Note:** The `guidelines` field has a maximum length of 50,000 characters.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "DocuPipe",
    "version": "1.0"
  },
  "paths": {
    "/schema/edit": {
      "post": {
        "tags": [
          "Schema"
        ],
        "summary": "Edit a Schema",
        "description": "Edit a schema by providing a schema ID and the parameters you want to edit. This does not create a new schema, but rather updates the existing schema. Changing the schema name is purely cosmetic, but changing the description and guidelines will affect the behavior of the schema for future standardizations. The things you can edit are:\n\n1. `schemaName` - The name of the schema\n2. `description` - The description of the schema\n3. `guidelines` - The guidelines for the schema\n4. `jsonSchema` - The complete schema with updated field descriptions. Only descriptions may differ; field names, types, order, nesting, enums and other attributes must remain unchanged.\n\n**Note:** The `guidelines` field has a maximum length of 50,000 characters.",
        "operationId": "post_edit_schema",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditSchemaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EditSchemaResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "EditSchemaRequest": {
        "properties": {
          "schemaId": {
            "type": "string",
            "title": "Schema ID",
            "description": "Unique identifier of the schema which we are editing."
          },
          "schemaName": {
            "type": "string",
            "title": "Schema Name",
            "description": "New name to assign to the schema."
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "New description to assign to the schema."
          },
          "guidelines": {
            "type": "string",
            "title": "Guidelines",
            "description": "New guidelines to assign to the schema."
          },
          "jsonSchema": {
            "additionalProperties": true,
            "type": "object",
            "title": "JSON Schema",
            "description": "Schema with updated descriptions. All other schema attributes must remain unchanged."
          }
        },
        "type": "object",
        "required": [
          "schemaId"
        ],
        "title": "EditSchemaRequest"
      },
      "EditSchemaResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Whether the schema was successfully edited."
          }
        },
        "type": "object",
        "required": [
          "success"
        ],
        "title": "EditSchemaResponse"
      },
      "ErrorResponse": {
        "properties": {
          "detail": {
            "type": "string",
            "title": "Detail",
            "description": "Details about the error"
          }
        },
        "type": "object",
        "required": [
          "detail"
        ],
        "title": "ErrorResponse"
      },
      "InsufficientCreditsError": {
        "properties": {
          "detail": {
            "type": "string",
            "title": "Detail",
            "description": "Explanation about the exhausted credits"
          }
        },
        "type": "object",
        "required": [
          "detail"
        ],
        "title": "InsufficientCreditsError"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://app.docupipe.ai"
    }
  ]
}
```