---
title: "Get the schema-patch contract"
method: GET
path: "/schema-patch-contract"
tags: ["Schema patch"]
---

# Get the schema-patch contract

`GET /schema-patch-contract`

## Request

- Base URL: `https://api.drawsql.app/v1`
- URL: `https://api.drawsql.app/v1/schema-patch-contract`
- Auth: HTTP bearer

The schema-patch contract, the document that defines the schema-patch
format: the shape
DrawSQL accepts wherever a patch can be supplied. Served verbatim, and
byte-identical to the ungated
[drawsql.app/schema-patch-contract.json](https://drawsql.app/schema-patch-contract.json) —
this URL exists so a consumer that already holds a token can fetch the
contract from the API origin.

The ETag hashes the document, so it changes only when the format does.
Rate limit: 60 requests/minute per token.

## Headers

- `If-None-Match` string

## Response `200`

The schema-patch contract.

- object: The contract document. Its `properties` tree uses JSON-Schema-like `type`/`description`/`enum` keys, but it is not a JSON Schema: `required` is a per-field boolean and `examples` is an object, so do not feed it to a JSON Schema validator.

## Other responses

- `304`: The contract is unchanged since the supplied `If-None-Match`.
- `401`: Missing, malformed, expired, or revoked token (code `unauthenticated`), or a valid token whose team no longer exists or whose user is no longer a member of that team (code `invalid_token`).
- `403`: The token's team is not on a paid plan (code `plan_required`), or the token is not allowed to perform this action (code `forbidden`).
- `429`: Too many requests.

---

[API](https://skmtc.dev/drawsql/apis/drawsql-api.md) - [All operations](https://skmtc.dev/drawsql/apis/drawsql-api/llms.txt) - [OpenAPI document](https://skmtc.dev/drawsql/apis/drawsql-api/revisions/8b333e0bae67?raw)
