curl --request GET \
--url https://formhug.ai/api/v1/f/{form_token}/entry_schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://formhug.ai/api/v1/f/{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/f/{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/f/{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/f/{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/f/{form_token}/entry_schema")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://formhug.ai/api/v1/f/{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>",
"code": "<string>"
}{
"error": "<string>"
}Get the JSON Schema for submitting to a published form
Returns the JSON Schema that field_values must satisfy when submitting an entry to a
published form — the same schema the submit endpoint validates against. Only public
fields are listed. Access follows reading the published form: if it is
password-protected, pass the password in the X-Form-Access-Password header.
Required scope: form:respond.
curl --request GET \
--url https://formhug.ai/api/v1/f/{form_token}/entry_schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://formhug.ai/api/v1/f/{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/f/{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/f/{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/f/{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/f/{form_token}/entry_schema")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://formhug.ai/api/v1/f/{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>",
"code": "<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.
Headers
Access password, when the form is password-protected
Path Parameters
Token of a published form
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?