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 /sites/{site_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, such as a migration that drops a column another migration renamed. A plan that needs a destructive migration confirmed still plans, and lists the ids in unconfirmed. Nothing is written.
Anyone who may edit the branch’s drafts may check it. Bearer only, a request on the cookie mount is refused with 403. It answers 404 while sites are not released to the member’s company, and for a site or branch the member may not edit. It answers 404 until branches are released to the company (the SITE_BRANCHES company flag). Staging need not be released.
curl --request POST \
--url https://api.fluid.app/api/member/v2026-10/sites/{site_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/member/v2026-10/sites/{site_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/member/v2026-10/sites/{site_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/member/v2026-10/sites/{site_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/member/v2026-10/sites/{site_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/member/v2026-10/sites/{site_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/member/v2026-10/sites/{site_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{
"status": 200,
"data": {
"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": []
}
},
"meta": {
"request_uuid": "0192f4c8-5b6c-7d74-a3e8-0f1a2b3c4d5e",
"timestamp": "2026-11-13T10:00:00Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 409,
"error": {
"message": "Migration rename-name has different steps in the schema, on the branch's database or on the live site's. 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, then publish the branch and try again.",
"details": {
"error": "migration_id_collision",
"migration_ids": [
"rename-name"
]
}
},
"meta": {
"request_uuid": "0192f4c8-5b6c-7d74-a3e8-0f1a2b3c4d5e",
"timestamp": "2026-11-13T10:00:00Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
A member credential in the Authorization: Bearer header: a member
session JWT, a portal JWT whose login is linked to a membership in
that company, an opaque member token, or a verified One Auth identity
access token. The credential alone identifies the member and company.
Member session JWTs, and portal JWTs the server minted read-only, are
refused with 403 on every write.
Path Parameters
Body
The body of a schema check. schema is the folder's db/schema.json, which the check validates against the bundle's schema rules. Any other field is refused as an unknown field.
Response
The schema planned on the branch's database and on the live site's.
The schema planned on the branch's database and on the live site's.
curl --request POST \
--url https://api.fluid.app/api/member/v2026-10/sites/{site_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/member/v2026-10/sites/{site_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/member/v2026-10/sites/{site_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/member/v2026-10/sites/{site_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/member/v2026-10/sites/{site_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/member/v2026-10/sites/{site_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/member/v2026-10/sites/{site_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{
"status": 200,
"data": {
"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": []
}
},
"meta": {
"request_uuid": "0192f4c8-5b6c-7d74-a3e8-0f1a2b3c4d5e",
"timestamp": "2026-11-13T10:00:00Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 409,
"error": {
"message": "Migration rename-name has different steps in the schema, on the branch's database or on the live site's. 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, then publish the branch and try again.",
"details": {
"error": "migration_id_collision",
"migration_ids": [
"rename-name"
]
}
},
"meta": {
"request_uuid": "0192f4c8-5b6c-7d74-a3e8-0f1a2b3c4d5e",
"timestamp": "2026-11-13T10:00:00Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}