# PUT 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 update a data schema by ID.

## Update an existing data schema

> Updates an existing data schema by its ID and returns the updated 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/{id}":{"put":{"tags":["Data Schemas"],"summary":"Update an existing data schema","description":"Updates an existing data schema by its ID and returns the updated schema.","operationId":"updateDataSchema","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"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"}}}}}}}}}
```
