---
title: "Apply Schema Difference"
method: POST
path: "/schema/apply"
tags: ["Schema"]
---

# Apply Schema Difference

`POST /schema/apply`

Update the instance's schema by passing the diff previously retrieved via `/schema/diff` endpoint in the JSON request body or a JSON/YAML file. This endpoint is only available to admin users.

## Request body

- object
  - `data` Diff
    - `hash` string
    - `diff` object
      - `collections` object[]
        - `collection` string
        - `diff` object[]
      - `fields` object[]
        - `collection` string
        - `field` string
        - `diff` object[]
      - `relations` object[]
        - `collection` string
        - `field` string
        - `related_collection` string
        - `diff` object[]

## Response `204`

Successful request

## Other responses

- `403` — Error: Unauthorized request

---

[API](https://skmtc.dev/utomic-media/apis/dynamic-api-specification.md) · [All operations](https://skmtc.dev/utomic-media/apis/dynamic-api-specification/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/utomic-media/dynamic-api-specification/revisions/4a0ccd34700e/schema)
