Records
Bulk Create Records
Create or upsert up to 100 records in a single request using either table ID or table name.
POST
/
bases
/
{databaseId}
/
tables
/
{tableId}
/
records
/
bulk
Bulk create or upsert records
curl --request POST \
--url https://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"records": [
{
"Name": "John Doe",
"Email": "john@example.com",
"Priority": "high"
},
{
"Name": "Jane Roe",
"Email": "jane@example.com",
"Priority": "low"
}
]
}
'import requests
url = "https://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk"
payload = { "records": [
{
"Name": "John Doe",
"Email": "john@example.com",
"Priority": "high"
},
{
"Name": "Jane Roe",
"Email": "jane@example.com",
"Priority": "low"
}
] }
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({
records: [
{Name: 'John Doe', Email: 'john@example.com', Priority: 'high'},
{Name: 'Jane Roe', Email: 'jane@example.com', Priority: 'low'}
]
})
};
fetch('https://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk', 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://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk",
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([
'records' => [
[
'Name' => 'John Doe',
'Email' => 'john@example.com',
'Priority' => 'high'
],
[
'Name' => 'Jane Roe',
'Email' => 'jane@example.com',
'Priority' => 'low'
]
]
]),
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://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk"
payload := strings.NewReader("{\n \"records\": [\n {\n \"Name\": \"John Doe\",\n \"Email\": \"john@example.com\",\n \"Priority\": \"high\"\n },\n {\n \"Name\": \"Jane Roe\",\n \"Email\": \"jane@example.com\",\n \"Priority\": \"low\"\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://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"records\": [\n {\n \"Name\": \"John Doe\",\n \"Email\": \"john@example.com\",\n \"Priority\": \"high\"\n },\n {\n \"Name\": \"Jane Roe\",\n \"Email\": \"jane@example.com\",\n \"Priority\": \"low\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk")
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 \"records\": [\n {\n \"Name\": \"John Doe\",\n \"Email\": \"john@example.com\",\n \"Priority\": \"high\"\n },\n {\n \"Name\": \"Jane Roe\",\n \"Email\": \"jane@example.com\",\n \"Priority\": \"low\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"records": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"fwtJyga6dso": "John Doe",
"k8mNp2xQ9rL": "john.doe@newcompany.com",
"vB3zXc7Hf2w": "low"
},
"fields": {
"Name": "John Doe",
"Email": "john.doe@newcompany.com",
"Priority": "low"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Use field names or field IDs as keys and field values as data (e.g.,
"Email": "user@example.com" or "fwtJyga6dso": "user@example.com").Upsert with matchOn
Provide matchOn with one or more field IDs to upsert instead of always creating. Incoming records that match an existing record on all of the matchOn fields update that record; the rest are created.
{
"records": [
{ "Email": "john@example.com", "Name": "John Doe" },
{ "Email": "jane@example.com", "Name": "Jane Roe" }
],
"matchOn": ["k8mNp2xQ9rL"]
}
Unlike the keys inside each record,
matchOn accepts field IDs only — field names are rejected. A record’s field IDs are the keys of the data object returned by any record endpoint (for example, List records).A pure create (no
matchOn) returns 201 Created. An upsert (with matchOn) returns 200 OK. In both cases the response contains the resulting records.id field included in a record is ignored — record IDs are always generated by the database.Authorizations
Enter your Zite API key. Format: Bearer <api_key>
Path Parameters
The unique identifier of the database
The unique identifier of the table. You can also use the table name instead of the ID.
Body
application/json
The records to create. Each record is an object of field data using field names or field IDs as keys.
Required array length:
1 - 100 elementsOptional list of field IDs to match on for upsert (field IDs only — not field names, unlike the keys inside each record). When provided, an incoming record that matches an existing record on all of these fields updates that record instead of creating a new one.
Required array length:
1 - 20 elementsExample:
["k8mNp2xQ9rL"]
⌘I
Bulk create or upsert records
curl --request POST \
--url https://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"records": [
{
"Name": "John Doe",
"Email": "john@example.com",
"Priority": "high"
},
{
"Name": "Jane Roe",
"Email": "jane@example.com",
"Priority": "low"
}
]
}
'import requests
url = "https://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk"
payload = { "records": [
{
"Name": "John Doe",
"Email": "john@example.com",
"Priority": "high"
},
{
"Name": "Jane Roe",
"Email": "jane@example.com",
"Priority": "low"
}
] }
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({
records: [
{Name: 'John Doe', Email: 'john@example.com', Priority: 'high'},
{Name: 'Jane Roe', Email: 'jane@example.com', Priority: 'low'}
]
})
};
fetch('https://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk', 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://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk",
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([
'records' => [
[
'Name' => 'John Doe',
'Email' => 'john@example.com',
'Priority' => 'high'
],
[
'Name' => 'Jane Roe',
'Email' => 'jane@example.com',
'Priority' => 'low'
]
]
]),
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://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk"
payload := strings.NewReader("{\n \"records\": [\n {\n \"Name\": \"John Doe\",\n \"Email\": \"john@example.com\",\n \"Priority\": \"high\"\n },\n {\n \"Name\": \"Jane Roe\",\n \"Email\": \"jane@example.com\",\n \"Priority\": \"low\"\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://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"records\": [\n {\n \"Name\": \"John Doe\",\n \"Email\": \"john@example.com\",\n \"Priority\": \"high\"\n },\n {\n \"Name\": \"Jane Roe\",\n \"Email\": \"jane@example.com\",\n \"Priority\": \"low\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tables.zite.com/api/v1/bases/{databaseId}/tables/{tableId}/records/bulk")
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 \"records\": [\n {\n \"Name\": \"John Doe\",\n \"Email\": \"john@example.com\",\n \"Priority\": \"high\"\n },\n {\n \"Name\": \"Jane Roe\",\n \"Email\": \"jane@example.com\",\n \"Priority\": \"low\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"records": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"fwtJyga6dso": "John Doe",
"k8mNp2xQ9rL": "john.doe@newcompany.com",
"vB3zXc7Hf2w": "low"
},
"fields": {
"Name": "John Doe",
"Email": "john.doe@newcompany.com",
"Priority": "low"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}