create
curl --request POST \
--url https://api.withflora.io/v1/schemas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '""'import requests
url = "https://api.withflora.io/v1/schemas"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}
};
fetch('https://api.withflora.io/v1/schemas', 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.withflora.io/v1/schemas",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "\"\"",
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.withflora.io/v1/schemas"
payload := strings.NewReader("\"\"")
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.withflora.io/v1/schemas")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("\"\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withflora.io/v1/schemas")
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 = "\"\""
response = http.request(request)
puts response.read_body{
"data": {
"createdAt": "2025-03-20T15:37:16.163+00:00",
"id": "00f9190e-9a4a-4e08-ba00-f888437ed3c4",
"name": "News Articles",
"structure": {
"items": {
"properties": {
"link": {
"describe": "URL to learn more",
"type": "string"
},
"summary": {
"describe": "The news summary",
"type": "string"
},
"title": {
"describe": "The article title",
"type": "string"
}
},
"type": "object"
},
"required": true,
"type": "array"
}
},
"message": "Schema created successfully",
"status": true
}{
"errors": [
{
"field": "name",
"message": "The schema name is required"
},
{
"field": "structure",
"message": "The schema structure is required"
}
],
"message": "Validation failed",
"status": false
}Schemas
Create Schema
Create a new schema definition
POST
/
schemas
create
curl --request POST \
--url https://api.withflora.io/v1/schemas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '""'import requests
url = "https://api.withflora.io/v1/schemas"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}
};
fetch('https://api.withflora.io/v1/schemas', 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.withflora.io/v1/schemas",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "\"\"",
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.withflora.io/v1/schemas"
payload := strings.NewReader("\"\"")
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.withflora.io/v1/schemas")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("\"\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withflora.io/v1/schemas")
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 = "\"\""
response = http.request(request)
puts response.read_body{
"data": {
"createdAt": "2025-03-20T15:37:16.163+00:00",
"id": "00f9190e-9a4a-4e08-ba00-f888437ed3c4",
"name": "News Articles",
"structure": {
"items": {
"properties": {
"link": {
"describe": "URL to learn more",
"type": "string"
},
"summary": {
"describe": "The news summary",
"type": "string"
},
"title": {
"describe": "The article title",
"type": "string"
}
},
"type": "object"
},
"required": true,
"type": "array"
}
},
"message": "Schema created successfully",
"status": true
}{
"errors": [
{
"field": "name",
"message": "The schema name is required"
},
{
"field": "structure",
"message": "The schema structure is required"
}
],
"message": "Validation failed",
"status": false
}Schema Builder Tool
To simplify the process of creating schemas, Flora offers a user-friendly Schema Builder tool. This visual interface allows you to construct your schema graphically, ensuring all requirements are met without the need to write JSON manually. You can access the Schema Builder at https://withflora.io/schema-builder. Using the Schema Builder:- Navigate to the Schema Builder tool
- Use the intuitive interface to add fields and define data types
- Preview your schema structure in real-time
- Once satisfied, you can directly create the schema via the API or copy the JSON for use in your API requests
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Was this page helpful?

