update
curl --request PUT \
--url https://api.withflora.io/v1/schemas/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "News Articles",
"structure": {
"items": {
"properties": {
"summary": {
"describe": "The news summary",
"type": "string"
},
"title": {
"describe": "The article title",
"type": "string"
}
},
"type": "object"
},
"required": true,
"type": "array"
}
}
'import requests
url = "https://api.withflora.io/v1/schemas/{id}"
payload = {
"name": "News Articles",
"structure": {
"items": {
"properties": {
"summary": {
"describe": "The news summary",
"type": "string"
},
"title": {
"describe": "The article title",
"type": "string"
}
},
"type": "object"
},
"required": True,
"type": "array"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'News Articles',
structure: {
items: {
properties: {
summary: {describe: 'The news summary', type: 'string'},
title: {describe: 'The article title', type: 'string'}
},
type: 'object'
},
required: true,
type: 'array'
}
})
};
fetch('https://api.withflora.io/v1/schemas/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'News Articles',
'structure' => [
'items' => [
'properties' => [
'summary' => [
'describe' => 'The news summary',
'type' => 'string'
],
'title' => [
'describe' => 'The article title',
'type' => 'string'
]
],
'type' => 'object'
],
'required' => true,
'type' => 'array'
]
]),
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/{id}"
payload := strings.NewReader("{\n \"name\": \"News Articles\",\n \"structure\": {\n \"items\": {\n \"properties\": {\n \"summary\": {\n \"describe\": \"The news summary\",\n \"type\": \"string\"\n },\n \"title\": {\n \"describe\": \"The article title\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\"\n },\n \"required\": true,\n \"type\": \"array\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.withflora.io/v1/schemas/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"News Articles\",\n \"structure\": {\n \"items\": {\n \"properties\": {\n \"summary\": {\n \"describe\": \"The news summary\",\n \"type\": \"string\"\n },\n \"title\": {\n \"describe\": \"The article title\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\"\n },\n \"required\": true,\n \"type\": \"array\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withflora.io/v1/schemas/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"News Articles\",\n \"structure\": {\n \"items\": {\n \"properties\": {\n \"summary\": {\n \"describe\": \"The news summary\",\n \"type\": \"string\"\n },\n \"title\": {\n \"describe\": \"The article title\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\"\n },\n \"required\": true,\n \"type\": \"array\"\n }\n}"
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": {
"summary": {
"describe": "The news summary",
"type": "string"
},
"title": {
"describe": "The article title",
"type": "string"
}
},
"type": "object"
},
"required": true,
"type": "array"
}
},
"message": "Schema updated successfully",
"status": true
}Schemas
Update Schema
Update an existing schema
PUT
/
schemas
/
{id}
update
curl --request PUT \
--url https://api.withflora.io/v1/schemas/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "News Articles",
"structure": {
"items": {
"properties": {
"summary": {
"describe": "The news summary",
"type": "string"
},
"title": {
"describe": "The article title",
"type": "string"
}
},
"type": "object"
},
"required": true,
"type": "array"
}
}
'import requests
url = "https://api.withflora.io/v1/schemas/{id}"
payload = {
"name": "News Articles",
"structure": {
"items": {
"properties": {
"summary": {
"describe": "The news summary",
"type": "string"
},
"title": {
"describe": "The article title",
"type": "string"
}
},
"type": "object"
},
"required": True,
"type": "array"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'News Articles',
structure: {
items: {
properties: {
summary: {describe: 'The news summary', type: 'string'},
title: {describe: 'The article title', type: 'string'}
},
type: 'object'
},
required: true,
type: 'array'
}
})
};
fetch('https://api.withflora.io/v1/schemas/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'News Articles',
'structure' => [
'items' => [
'properties' => [
'summary' => [
'describe' => 'The news summary',
'type' => 'string'
],
'title' => [
'describe' => 'The article title',
'type' => 'string'
]
],
'type' => 'object'
],
'required' => true,
'type' => 'array'
]
]),
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/{id}"
payload := strings.NewReader("{\n \"name\": \"News Articles\",\n \"structure\": {\n \"items\": {\n \"properties\": {\n \"summary\": {\n \"describe\": \"The news summary\",\n \"type\": \"string\"\n },\n \"title\": {\n \"describe\": \"The article title\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\"\n },\n \"required\": true,\n \"type\": \"array\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.withflora.io/v1/schemas/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"News Articles\",\n \"structure\": {\n \"items\": {\n \"properties\": {\n \"summary\": {\n \"describe\": \"The news summary\",\n \"type\": \"string\"\n },\n \"title\": {\n \"describe\": \"The article title\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\"\n },\n \"required\": true,\n \"type\": \"array\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withflora.io/v1/schemas/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"News Articles\",\n \"structure\": {\n \"items\": {\n \"properties\": {\n \"summary\": {\n \"describe\": \"The news summary\",\n \"type\": \"string\"\n },\n \"title\": {\n \"describe\": \"The article title\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\"\n },\n \"required\": true,\n \"type\": \"array\"\n }\n}"
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": {
"summary": {
"describe": "The news summary",
"type": "string"
},
"title": {
"describe": "The article title",
"type": "string"
}
},
"type": "object"
},
"required": true,
"type": "array"
}
},
"message": "Schema updated successfully",
"status": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Example:
"c622793c-5e69-4670-bfa5-6e57b6fcbc74"
Was this page helpful?

