curl --request GET \
--url https://formhug.ai/api/v1/forms/{form_token}/entry_schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://formhug.ai/api/v1/forms/{form_token}/entry_schema"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://formhug.ai/api/v1/forms/{form_token}/entry_schema', 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://formhug.ai/api/v1/forms/{form_token}/entry_schema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://formhug.ai/api/v1/forms/{form_token}/entry_schema"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://formhug.ai/api/v1/forms/{form_token}/entry_schema")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://formhug.ai/api/v1/forms/{form_token}/entry_schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Customer visit log",
"type": "object",
"additionalProperties": false,
"properties": {}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Get the JSON Schema for writing an entry
Returns the JSON Schema that field_values must satisfy when creating or updating an
entry on this form — the same schema the entry endpoints validate against. It lists
every writable field, private fields included. A collaborator role may still be
refused some of these fields: writing one answers 403 naming it.
Required scope: form:read.
curl --request GET \
--url https://formhug.ai/api/v1/forms/{form_token}/entry_schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://formhug.ai/api/v1/forms/{form_token}/entry_schema"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://formhug.ai/api/v1/forms/{form_token}/entry_schema', 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://formhug.ai/api/v1/forms/{form_token}/entry_schema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://formhug.ai/api/v1/forms/{form_token}/entry_schema"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://formhug.ai/api/v1/forms/{form_token}/entry_schema")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://formhug.ai/api/v1/forms/{form_token}/entry_schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Customer visit log",
"type": "object",
"additionalProperties": false,
"properties": {}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Personal Access Token prefixed with fh_. Sent as Authorization: Bearer fh_xxx.
The scope required by each endpoint is listed in that endpoint's description.
Path Parameters
Form token
Response
Success
A JSON Schema (draft 2020-12) document for field_values: one property per field of
the form that holds a value, keyed by api_code, each carrying the field's label as title, its
type in description, and the exact value shape it accepts — choice api_codes,
number ranges, statement and column keys. Read-only fields, and the entry's own keys an
entry read carries (serial_number, token, created_at, info_*, ...), are listed with
readOnly: true; a value sent for them is accepted and ignored, so an entry as read
can be written back whole. Feed it to any JSON Schema validator, or use it
as tool parameters for an LLM. Required fields are not marked: whether a field must
be filled can depend on other answers, and is checked when the entry is written.
Show child attributes
Show child attributes
Was this page helpful?