curl --request POST \
--url https://api.lithoblocks.com/v1/templates/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"blocks": [
{
"type": "<string>",
"id": "<string>"
}
],
"sample_data": {}
}
'import requests
url = "https://api.lithoblocks.com/v1/templates/validate"
payload = {
"blocks": [
{
"type": "<string>",
"id": "<string>"
}
],
"sample_data": {}
}
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({blocks: [{type: '<string>', id: '<string>'}], sample_data: {}})
};
fetch('https://api.lithoblocks.com/v1/templates/validate', 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.lithoblocks.com/v1/templates/validate",
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([
'blocks' => [
[
'type' => '<string>',
'id' => '<string>'
]
],
'sample_data' => [
]
]),
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.lithoblocks.com/v1/templates/validate"
payload := strings.NewReader("{\n \"blocks\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"sample_data\": {}\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.lithoblocks.com/v1/templates/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"blocks\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"sample_data\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lithoblocks.com/v1/templates/validate")
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 \"blocks\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"sample_data\": {}\n}"
response = http.request(request)
puts response.read_body{
"valid": true,
"request_format": {},
"blocks": [
{
"type": "<string>",
"id": "<string>"
}
],
"errors": [
{
"error": "<string>",
"details": "<string>"
}
],
"compiled_preview": [
{}
],
"interactivity": {
"buttons": 123,
"metadata_bytes": 123
},
"fields_truncated": 123,
"warnings": [
"<string>"
]
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"success": false,
"error": {
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
],
"name": "<string>"
},
"message": "<string>",
"code": "validation_failed",
"request_id": "<string>"
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}Validate blocks without saving
Dry run: fills in block ids, derives request_format, and compiles the blocks exactly as a send would — without persisting anything or spending credits. valid: false comes with the engine’s messages under errors. Iterate here until valid, then create the template or version.
curl --request POST \
--url https://api.lithoblocks.com/v1/templates/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"blocks": [
{
"type": "<string>",
"id": "<string>"
}
],
"sample_data": {}
}
'import requests
url = "https://api.lithoblocks.com/v1/templates/validate"
payload = {
"blocks": [
{
"type": "<string>",
"id": "<string>"
}
],
"sample_data": {}
}
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({blocks: [{type: '<string>', id: '<string>'}], sample_data: {}})
};
fetch('https://api.lithoblocks.com/v1/templates/validate', 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.lithoblocks.com/v1/templates/validate",
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([
'blocks' => [
[
'type' => '<string>',
'id' => '<string>'
]
],
'sample_data' => [
]
]),
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.lithoblocks.com/v1/templates/validate"
payload := strings.NewReader("{\n \"blocks\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"sample_data\": {}\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.lithoblocks.com/v1/templates/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"blocks\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"sample_data\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lithoblocks.com/v1/templates/validate")
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 \"blocks\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"sample_data\": {}\n}"
response = http.request(request)
puts response.read_body{
"valid": true,
"request_format": {},
"blocks": [
{
"type": "<string>",
"id": "<string>"
}
],
"errors": [
{
"error": "<string>",
"details": "<string>"
}
],
"compiled_preview": [
{}
],
"interactivity": {
"buttons": 123,
"metadata_bytes": 123
},
"fields_truncated": 123,
"warnings": [
"<string>"
]
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"success": false,
"error": {
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
],
"name": "<string>"
},
"message": "<string>",
"code": "validation_failed",
"request_id": "<string>"
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}{
"error": "<string>",
"code": "unauthenticated",
"request_id": "<string>",
"message": "<string>",
"details": "<string>",
"error_details": "<string>",
"success": false,
"valid": false,
"required_scopes": [
"<string>"
],
"user_scopes": [
"<string>"
]
}Authorizations
LithoBlocks API key obtained from your organization dashboard. The LithoBlocks MCP server also presents a Supabase-issued user session token here on the user's behalf; such a token acts as that user with the scopes their organization role allows.
Body
Blocks to validate
Response
Validation result
{ template_id, data } where data holds null per placeholder and [{ field: null }] per array path; what a caller of compile/send must supply. GET /templates/{id}/input-schema describes the same paths with types, labels and nesting
Show child attributes
Show child attributes
The blocks as they would be stored: ids and action ids filled in
Show child attributes
Show child attributes
Present when valid is false
Show child attributes
Show child attributes
Slack Block Kit output for sample_data; present when valid is true
Show child attributes
Show child attributes
Show child attributes
Show child attributes
How many text fields were shortened to fit Slack's limits
What compile normalised: chart points filled with 0, series or points truncated to Slack's counts

