Create entries in batch
curl --request POST \
--url https://formhug.ai/api/v1/forms/{form_token}/entries/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entries": [
{
"field_values": {
"field_1": "Jane Doe"
}
}
]
}
'import requests
url = "https://formhug.ai/api/v1/forms/{form_token}/entries/batch"
payload = { "entries": [{ "field_values": { "field_1": "Jane Doe" } }] }
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({entries: [{field_values: {field_1: 'Jane Doe'}}]})
};
fetch('https://formhug.ai/api/v1/forms/{form_token}/entries/batch', 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}/entries/batch",
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([
'entries' => [
[
'field_values' => [
'field_1' => 'Jane Doe'
]
]
]
]),
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://formhug.ai/api/v1/forms/{form_token}/entries/batch"
payload := strings.NewReader("{\n \"entries\": [\n {\n \"field_values\": {\n \"field_1\": \"Jane Doe\"\n }\n }\n ]\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://formhug.ai/api/v1/forms/{form_token}/entries/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entries\": [\n {\n \"field_values\": {\n \"field_1\": \"Jane Doe\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://formhug.ai/api/v1/forms/{form_token}/entries/batch")
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 \"entries\": [\n {\n \"field_values\": {\n \"field_1\": \"Jane Doe\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"succeeded": [
{
"index": 0,
"serial_number": 101
}
],
"failed": [
{
"index": 1,
"code": "validation_failed",
"error_details": [
{
"attribute": "field_values.field_1",
"message": "can't be blank"
}
]
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "Name can't be blank",
"error_details": [
{
"attribute": "name",
"message": "can't be blank"
}
]
}Entries
Create entries in batch
Create up to 200 entries in one request. Each item is validated on its own: valid items are
created, invalid ones are reported in failed by their position in entries. The response is
200 whenever the request itself is valid, even if every item failed.
Batch creation behaves like a data import: no new-entry notifications, webhooks or integrations (e.g. Google Sheets, Notion, Slack) are triggered for these entries.
Required scope: entry:write.
POST
/
api
/
v1
/
forms
/
{form_token}
/
entries
/
batch
Create entries in batch
curl --request POST \
--url https://formhug.ai/api/v1/forms/{form_token}/entries/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entries": [
{
"field_values": {
"field_1": "Jane Doe"
}
}
]
}
'import requests
url = "https://formhug.ai/api/v1/forms/{form_token}/entries/batch"
payload = { "entries": [{ "field_values": { "field_1": "Jane Doe" } }] }
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({entries: [{field_values: {field_1: 'Jane Doe'}}]})
};
fetch('https://formhug.ai/api/v1/forms/{form_token}/entries/batch', 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}/entries/batch",
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([
'entries' => [
[
'field_values' => [
'field_1' => 'Jane Doe'
]
]
]
]),
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://formhug.ai/api/v1/forms/{form_token}/entries/batch"
payload := strings.NewReader("{\n \"entries\": [\n {\n \"field_values\": {\n \"field_1\": \"Jane Doe\"\n }\n }\n ]\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://formhug.ai/api/v1/forms/{form_token}/entries/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entries\": [\n {\n \"field_values\": {\n \"field_1\": \"Jane Doe\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://formhug.ai/api/v1/forms/{form_token}/entries/batch")
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 \"entries\": [\n {\n \"field_values\": {\n \"field_1\": \"Jane Doe\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"succeeded": [
{
"index": 0,
"serial_number": 101
}
],
"failed": [
{
"index": 1,
"code": "validation_failed",
"error_details": [
{
"attribute": "field_values.field_1",
"message": "can't be blank"
}
]
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "Name can't be blank",
"error_details": [
{
"attribute": "name",
"message": "can't be blank"
}
]
}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
Body
application/json
Required array length:
1 - 200 elementsShow child attributes
Show child attributes
Response
Processed
Show child attributes
Show child attributes
Last modified on October 9, 2026
Was this page helpful?