Check a schema for a site's branch
Asks whether a schema holds for the branch, before the branch is published or promoted and before anything moves. Send the folder’s db/schema.json as schema. After a branch is updated from live, its migrations are live’s migrations in live’s order, then the branch’s own; the builder sends the merged file here before it publishes.
The check runs in this order and stops at the first refusal. A database that is being changed, restored or applied to is database_busy. A migration id whose steps differ between the branch’s database and the live site’s, or between the schema and a database, is migration_id_collision: each database skips an id it already ran, so one side would never run the other’s steps. Give the branch’s migration a new id, such as one that carries the branch’s name. A branch whose database was copied before migration digests were recorded cannot say which migrations it ran itself, and is refused branch_database_legacy until its database is reset from live (POST /member-sites/{id}/branches/{slug}/database-reset). A migration the live site ran before digests were recorded, whose steps the branch changed or the live site no longer lists, is migration_edited. The same id with the same steps is never a collision.
When none of these refuses, the sites gateway plans the schema, read-only, from the branch’s database and from the live site’s, and the answer holds both. A schema that one database cannot apply is an answer, not a refusal: its status is error with the planner’s message. A plan that needs a destructive migration confirmed still plans, and lists the ids in unconfirmed. Nothing is written.
Needs application_themes.update and a signed-in admin who may edit the branch’s drafts. It answers 404 until branches are released to the company (the SITE_BRANCHES company flag). Staging need not be released. A droplet installation token and an OAuth client token are refused with 403.
curl --request POST \
--url https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schema": {
"version": 1,
"tables": {
"rsvps": {
"columns": {
"event_id": {
"type": "uuid",
"required": true
},
"name": {
"type": "text",
"required": true
}
}
}
},
"migrations": []
}
}
'import requests
url = "https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check"
payload = { "schema": {
"version": 1,
"tables": { "rsvps": { "columns": {
"event_id": {
"type": "uuid",
"required": True
},
"name": {
"type": "text",
"required": True
}
} } },
"migrations": []
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schema: {
version: 1,
tables: {
rsvps: {
columns: {event_id: {type: 'uuid', required: true}, name: {type: 'text', required: true}}
}
},
migrations: []
}
})
};
fetch('https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'schema' => [
'version' => 1,
'tables' => [
'rsvps' => [
'columns' => [
'event_id' => [
'type' => 'uuid',
'required' => true
],
'name' => [
'type' => 'text',
'required' => true
]
]
]
],
'migrations' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check"
payload := strings.NewReader("{\n \"schema\": {\n \"version\": 1,\n \"tables\": {\n \"rsvps\": {\n \"columns\": {\n \"event_id\": {\n \"type\": \"uuid\",\n \"required\": true\n },\n \"name\": {\n \"type\": \"text\",\n \"required\": true\n }\n }\n }\n },\n \"migrations\": []\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schema\": {\n \"version\": 1,\n \"tables\": {\n \"rsvps\": {\n \"columns\": {\n \"event_id\": {\n \"type\": \"uuid\",\n \"required\": true\n },\n \"name\": {\n \"type\": \"text\",\n \"required\": true\n }\n }\n }\n },\n \"migrations\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schema\": {\n \"version\": 1,\n \"tables\": {\n \"rsvps\": {\n \"columns\": {\n \"event_id\": {\n \"type\": \"uuid\",\n \"required\": true\n },\n \"name\": {\n \"type\": \"text\",\n \"required\": true\n }\n }\n }\n },\n \"migrations\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"schema_check": {
"branch": {
"status": "ok",
"message": null,
"unconfirmed": []
},
"live": {
"status": "error",
"message": "Migration 2026-11-05-drop-notes drops column notes of table rsvps, which does not exist",
"unconfirmed": []
}
},
"status": 200,
"meta": {
"request_uuid": "3b8f1d27-6c4e-4a91-8e5d-2f7c9a1b0e64",
"timestamp": "2026-11-13T10:00:00Z"
}
}{}{}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
Path Parameters
Body
The body of a schema check, sent unwrapped. schema is the folder's db/schema.json, which the check validates against the bundle's schema rules. Any other field is refused.
Response
The schema planned on the branch's database and on the live site's.
curl --request POST \
--url https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schema": {
"version": 1,
"tables": {
"rsvps": {
"columns": {
"event_id": {
"type": "uuid",
"required": true
},
"name": {
"type": "text",
"required": true
}
}
}
},
"migrations": []
}
}
'import requests
url = "https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check"
payload = { "schema": {
"version": 1,
"tables": { "rsvps": { "columns": {
"event_id": {
"type": "uuid",
"required": True
},
"name": {
"type": "text",
"required": True
}
} } },
"migrations": []
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schema: {
version: 1,
tables: {
rsvps: {
columns: {event_id: {type: 'uuid', required: true}, name: {type: 'text', required: true}}
}
},
migrations: []
}
})
};
fetch('https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'schema' => [
'version' => 1,
'tables' => [
'rsvps' => [
'columns' => [
'event_id' => [
'type' => 'uuid',
'required' => true
],
'name' => [
'type' => 'text',
'required' => true
]
]
]
],
'migrations' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check"
payload := strings.NewReader("{\n \"schema\": {\n \"version\": 1,\n \"tables\": {\n \"rsvps\": {\n \"columns\": {\n \"event_id\": {\n \"type\": \"uuid\",\n \"required\": true\n },\n \"name\": {\n \"type\": \"text\",\n \"required\": true\n }\n }\n }\n },\n \"migrations\": []\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schema\": {\n \"version\": 1,\n \"tables\": {\n \"rsvps\": {\n \"columns\": {\n \"event_id\": {\n \"type\": \"uuid\",\n \"required\": true\n },\n \"name\": {\n \"type\": \"text\",\n \"required\": true\n }\n }\n }\n },\n \"migrations\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/v2026-10/member-sites/{id}/branches/{slug}/schema-check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schema\": {\n \"version\": 1,\n \"tables\": {\n \"rsvps\": {\n \"columns\": {\n \"event_id\": {\n \"type\": \"uuid\",\n \"required\": true\n },\n \"name\": {\n \"type\": \"text\",\n \"required\": true\n }\n }\n }\n },\n \"migrations\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"schema_check": {
"branch": {
"status": "ok",
"message": null,
"unconfirmed": []
},
"live": {
"status": "error",
"message": "Migration 2026-11-05-drop-notes drops column notes of table rsvps, which does not exist",
"unconfirmed": []
}
},
"status": 200,
"meta": {
"request_uuid": "3b8f1d27-6c4e-4a91-8e5d-2f7c9a1b0e64",
"timestamp": "2026-11-13T10:00:00Z"
}
}{}{}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}