---
title: "Update Schema"
method: PUT
path: "/helixdb/schema"
tags: ["HelixDB"]
---

# Update Schema

`PUT /helixdb/schema`

## Request

- Base URL: `https://api.getmetacognition.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getmetacognition.com/helixdb/schema`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/metacognition/apis/tex-api/docs/helixdb/schema/put.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- UpdateSchemaRequest: Update database schema.
  - `schema` string, required: HelixQL schema definition

## Response `200`

Successful Response

- QueryResponse: Query execution response.
  - `success` boolean, required: Whether query succeeded
  - `data` unknown
  - `error` string, nullable: Error message if failed

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/metacognition/apis/tex-api.md) - [All operations](https://skmtc.dev/metacognition/apis/tex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/metacognition/apis/tex-api/revisions/3bef47e50f2e?raw)
