Batch
Batch create or update objects
Creates or updates up to 100 objects in a single request. Ideal for scheduled syncs (e.g., pushing data every 5 minutes).
Matching behavior:
- If
match_byandmatch_valueare provided and a record is found, it is updated. - If no match is found (or
match_byis omitted), a new record is created. - For contacts and companies, creation also deduplicates automatically (by email/domain).
Error handling:
- Each object is processed independently — a failure on one object does not abort the batch.
- Check the
resultsarray for per-object status.
Objects are processed sequentially to ensure correct deduplication.
POST
/
api
/
objects
/
{objectType}
/
batch
Batch create or update objects
curl --request POST \
--url https://app.useitem.io/api/objects/{objectType}/batch \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"objects": [
{
"name": "Alex Johnson",
"match_by": "email",
"match_value": "alex@acme.com",
"fields": {
"email": "alex@acme.com",
"role": "Senior Engineer",
"custom_score": 95
}
},
{
"name": "Acme Corp",
"match_by": "id",
"match_value": 456,
"fields": {
"website_url": "https://acme.com",
"industry": "Technology"
}
},
{
"name": "New Contact",
"fields": {
"email": "new@example.com",
"role": "Designer"
}
}
]
}
'import requests
url = "https://app.useitem.io/api/objects/{objectType}/batch"
payload = { "objects": [
{
"name": "Alex Johnson",
"match_by": "email",
"match_value": "alex@acme.com",
"fields": {
"email": "alex@acme.com",
"role": "Senior Engineer",
"custom_score": 95
}
},
{
"name": "Acme Corp",
"match_by": "id",
"match_value": 456,
"fields": {
"website_url": "https://acme.com",
"industry": "Technology"
}
},
{
"name": "New Contact",
"fields": {
"email": "new@example.com",
"role": "Designer"
}
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
objects: [
{
name: 'Alex Johnson',
match_by: 'email',
match_value: 'alex@acme.com',
fields: {email: 'alex@acme.com', role: 'Senior Engineer', custom_score: 95}
},
{
name: 'Acme Corp',
match_by: 'id',
match_value: 456,
fields: {website_url: 'https://acme.com', industry: 'Technology'}
},
{name: 'New Contact', fields: {email: 'new@example.com', role: 'Designer'}}
]
})
};
fetch('https://app.useitem.io/api/objects/{objectType}/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://app.useitem.io/api/objects/{objectType}/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([
'objects' => [
[
'name' => 'Alex Johnson',
'match_by' => 'email',
'match_value' => 'alex@acme.com',
'fields' => [
'email' => 'alex@acme.com',
'role' => 'Senior Engineer',
'custom_score' => 95
]
],
[
'name' => 'Acme Corp',
'match_by' => 'id',
'match_value' => 456,
'fields' => [
'website_url' => 'https://acme.com',
'industry' => 'Technology'
]
],
[
'name' => 'New Contact',
'fields' => [
'email' => 'new@example.com',
'role' => 'Designer'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://app.useitem.io/api/objects/{objectType}/batch"
payload := strings.NewReader("{\n \"objects\": [\n {\n \"name\": \"Alex Johnson\",\n \"match_by\": \"email\",\n \"match_value\": \"alex@acme.com\",\n \"fields\": {\n \"email\": \"alex@acme.com\",\n \"role\": \"Senior Engineer\",\n \"custom_score\": 95\n }\n },\n {\n \"name\": \"Acme Corp\",\n \"match_by\": \"id\",\n \"match_value\": 456,\n \"fields\": {\n \"website_url\": \"https://acme.com\",\n \"industry\": \"Technology\"\n }\n },\n {\n \"name\": \"New Contact\",\n \"fields\": {\n \"email\": \"new@example.com\",\n \"role\": \"Designer\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://app.useitem.io/api/objects/{objectType}/batch")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"objects\": [\n {\n \"name\": \"Alex Johnson\",\n \"match_by\": \"email\",\n \"match_value\": \"alex@acme.com\",\n \"fields\": {\n \"email\": \"alex@acme.com\",\n \"role\": \"Senior Engineer\",\n \"custom_score\": 95\n }\n },\n {\n \"name\": \"Acme Corp\",\n \"match_by\": \"id\",\n \"match_value\": 456,\n \"fields\": {\n \"website_url\": \"https://acme.com\",\n \"industry\": \"Technology\"\n }\n },\n {\n \"name\": \"New Contact\",\n \"fields\": {\n \"email\": \"new@example.com\",\n \"role\": \"Designer\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.useitem.io/api/objects/{objectType}/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"objects\": [\n {\n \"name\": \"Alex Johnson\",\n \"match_by\": \"email\",\n \"match_value\": \"alex@acme.com\",\n \"fields\": {\n \"email\": \"alex@acme.com\",\n \"role\": \"Senior Engineer\",\n \"custom_score\": 95\n }\n },\n {\n \"name\": \"Acme Corp\",\n \"match_by\": \"id\",\n \"match_value\": 456,\n \"fields\": {\n \"website_url\": \"https://acme.com\",\n \"industry\": \"Technology\"\n }\n },\n {\n \"name\": \"New Contact\",\n \"fields\": {\n \"email\": \"new@example.com\",\n \"role\": \"Designer\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": 123,
"status": "updated"
},
{
"id": 456,
"status": "updated"
},
{
"id": 789,
"status": "created"
}
],
"summary": {
"total": 3,
"created": 1,
"updated": 2,
"failed": 0
}
}Authorizations
Your organization's API key (starts with sk_live_)
Path Parameters
The object type slug. Use contacts for People, companies for Companies,
or the slug of a Custom Object (e.g., deals, tickets).
Singular forms (contact, company) are also accepted.
Body
application/json
Show child attributes
Show child attributes
⌘I
Batch create or update objects
curl --request POST \
--url https://app.useitem.io/api/objects/{objectType}/batch \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"objects": [
{
"name": "Alex Johnson",
"match_by": "email",
"match_value": "alex@acme.com",
"fields": {
"email": "alex@acme.com",
"role": "Senior Engineer",
"custom_score": 95
}
},
{
"name": "Acme Corp",
"match_by": "id",
"match_value": 456,
"fields": {
"website_url": "https://acme.com",
"industry": "Technology"
}
},
{
"name": "New Contact",
"fields": {
"email": "new@example.com",
"role": "Designer"
}
}
]
}
'import requests
url = "https://app.useitem.io/api/objects/{objectType}/batch"
payload = { "objects": [
{
"name": "Alex Johnson",
"match_by": "email",
"match_value": "alex@acme.com",
"fields": {
"email": "alex@acme.com",
"role": "Senior Engineer",
"custom_score": 95
}
},
{
"name": "Acme Corp",
"match_by": "id",
"match_value": 456,
"fields": {
"website_url": "https://acme.com",
"industry": "Technology"
}
},
{
"name": "New Contact",
"fields": {
"email": "new@example.com",
"role": "Designer"
}
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
objects: [
{
name: 'Alex Johnson',
match_by: 'email',
match_value: 'alex@acme.com',
fields: {email: 'alex@acme.com', role: 'Senior Engineer', custom_score: 95}
},
{
name: 'Acme Corp',
match_by: 'id',
match_value: 456,
fields: {website_url: 'https://acme.com', industry: 'Technology'}
},
{name: 'New Contact', fields: {email: 'new@example.com', role: 'Designer'}}
]
})
};
fetch('https://app.useitem.io/api/objects/{objectType}/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://app.useitem.io/api/objects/{objectType}/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([
'objects' => [
[
'name' => 'Alex Johnson',
'match_by' => 'email',
'match_value' => 'alex@acme.com',
'fields' => [
'email' => 'alex@acme.com',
'role' => 'Senior Engineer',
'custom_score' => 95
]
],
[
'name' => 'Acme Corp',
'match_by' => 'id',
'match_value' => 456,
'fields' => [
'website_url' => 'https://acme.com',
'industry' => 'Technology'
]
],
[
'name' => 'New Contact',
'fields' => [
'email' => 'new@example.com',
'role' => 'Designer'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://app.useitem.io/api/objects/{objectType}/batch"
payload := strings.NewReader("{\n \"objects\": [\n {\n \"name\": \"Alex Johnson\",\n \"match_by\": \"email\",\n \"match_value\": \"alex@acme.com\",\n \"fields\": {\n \"email\": \"alex@acme.com\",\n \"role\": \"Senior Engineer\",\n \"custom_score\": 95\n }\n },\n {\n \"name\": \"Acme Corp\",\n \"match_by\": \"id\",\n \"match_value\": 456,\n \"fields\": {\n \"website_url\": \"https://acme.com\",\n \"industry\": \"Technology\"\n }\n },\n {\n \"name\": \"New Contact\",\n \"fields\": {\n \"email\": \"new@example.com\",\n \"role\": \"Designer\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://app.useitem.io/api/objects/{objectType}/batch")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"objects\": [\n {\n \"name\": \"Alex Johnson\",\n \"match_by\": \"email\",\n \"match_value\": \"alex@acme.com\",\n \"fields\": {\n \"email\": \"alex@acme.com\",\n \"role\": \"Senior Engineer\",\n \"custom_score\": 95\n }\n },\n {\n \"name\": \"Acme Corp\",\n \"match_by\": \"id\",\n \"match_value\": 456,\n \"fields\": {\n \"website_url\": \"https://acme.com\",\n \"industry\": \"Technology\"\n }\n },\n {\n \"name\": \"New Contact\",\n \"fields\": {\n \"email\": \"new@example.com\",\n \"role\": \"Designer\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.useitem.io/api/objects/{objectType}/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"objects\": [\n {\n \"name\": \"Alex Johnson\",\n \"match_by\": \"email\",\n \"match_value\": \"alex@acme.com\",\n \"fields\": {\n \"email\": \"alex@acme.com\",\n \"role\": \"Senior Engineer\",\n \"custom_score\": 95\n }\n },\n {\n \"name\": \"Acme Corp\",\n \"match_by\": \"id\",\n \"match_value\": 456,\n \"fields\": {\n \"website_url\": \"https://acme.com\",\n \"industry\": \"Technology\"\n }\n },\n {\n \"name\": \"New Contact\",\n \"fields\": {\n \"email\": \"new@example.com\",\n \"role\": \"Designer\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": 123,
"status": "updated"
},
{
"id": 456,
"status": "updated"
},
{
"id": 789,
"status": "created"
}
],
"summary": {
"total": 3,
"created": 1,
"updated": 2,
"failed": 0
}
}