# POST v1/schemas

{% hint style="danger" %}
**Beta Feature:** This feature is currently in beta and restricted to approved users. If you're are interested in trying it, please [contact support](https://gaffa.dev/support) and we can enable this feature for your account.
{% endhint %}

The following endpoint allows you to describe a data schema for parsing an online PDF to JSON.

## Create a new data schema

> Creates a new data schema definition and returns the created schema.

```json
{"openapi":"3.0.1","info":{"title":"Gaffa API Open API Definition","version":"1.0.0"},"servers":[{"url":"https://api.gaffa.dev"}],"security":[{"API Key":[]}],"components":{"securitySchemes":{"API Key":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"dataSchema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the data schema.","nullable":true},"name":{"type":"string","description":"The name of the schema or field.","nullable":true},"description":{"type":"string","description":"A description of the schema or field.","nullable":true},"fields":{"type":"array","items":{"$ref":"#/components/schemas/schemaField"},"description":"The list of fields that make up this object.","nullable":true}}},"schemaField":{"type":"object","properties":{"type":{"enum":[0,1,2,3,4,5,6,7],"type":"integer","description":"The type of the field.","format":"int32"},"name":{"type":"string","description":"The name of the schema or field.","nullable":true},"description":{"type":"string","description":"A description of the schema or field.","nullable":true},"fields":{"type":"array","items":{"$ref":"#/components/schemas/schemaField"},"description":"The list of fields that make up this object.","nullable":true}}}}},"paths":{"/v1/schemas":{"post":{"tags":["Data Schemas"],"summary":"Create a new data schema","description":"Creates a new data schema definition and returns the created schema.","operationId":"createDataSchema","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dataSchema"}}},"required":true},"responses":{"200":{"description":"Payload of DataSchema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dataSchema"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gaffa.dev/docs/api-reference/post-v1-schemas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
