Bulk Create Object Records
curl --request POST \
--url https://app.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"status": "<string>",
"owner": "<string>",
"external_id": "<string>"
}
'import requests
url = "https://app.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create"
payload = {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"status": "<string>",
"owner": "<string>",
"external_id": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
phone: '<string>',
status: '<string>',
owner: '<string>',
external_id: '<string>'
})
};
fetch('https://app.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create', 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.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create",
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([
'name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'status' => '<string>',
'owner' => '<string>',
'external_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"status\": \"<string>\",\n \"owner\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
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.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"status\": \"<string>\",\n \"owner\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"status\": \"<string>\",\n \"owner\": \"<string>\",\n \"external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyRecord Management APIs
Bulk Create Object Records
POST
/
api
/
v1
/
org
/
objects
/
{object_slug}
/
record
/
bulk_create
Bulk Create Object Records
curl --request POST \
--url https://app.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"status": "<string>",
"owner": "<string>",
"external_id": "<string>"
}
'import requests
url = "https://app.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create"
payload = {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"status": "<string>",
"owner": "<string>",
"external_id": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
phone: '<string>',
status: '<string>',
owner: '<string>',
external_id: '<string>'
})
};
fetch('https://app.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create', 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.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create",
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([
'name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'status' => '<string>',
'owner' => '<string>',
'external_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"status\": \"<string>\",\n \"owner\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
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.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"status\": \"<string>\",\n \"owner\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"status\": \"<string>\",\n \"owner\": \"<string>\",\n \"external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyCreate multiple records for a requested object in a single API call. This API is useful when you need to insert multiple records efficiently, reducing the number of API calls required.
Headers
string
required
Bearer token for authentication, click here to generate one
string
default:"application/json"
required
application/json
Path Parameters
string
required
The slug identifier for the object type you want to create records for (e.g., “lead”, “user”, “opportunity”, “communication”)
Body
string
Name or title of the record
string
Email address associated with the record
string
Phone number associated with the record
string
Initial status of the record
string
ID of the user who should own this record
string
External reference ID for integration purposes
Example
Request
curl --location 'https://app.superleap.dev/api/v1/org/objects/lead/record/bulk_create' \
--data-raw '[
{
"name": "test-8",
"email":"test@gmail.com"
},
{
"name": "test-9",
"email":"test1@gmail.com"
}
]'
Response 200 OK
{
"success": true,
"data": {
"message": "records added successfully"
}
}
Request with Multiple Fields
curl --location 'localhost:8001/api/v1/org/objects/lead/record/bulk_create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ***********' \
--data '[
{
"name": "John Smith",
"email": "john.smith@example.com",
"phone": "+1-555-123-4567",
"status": "new",
"external_id": "EXT-001",
},
{
"name": "Jane Doe",
"email": "jane.doe@example.com",
"phone": "+1-555-987-6543",
"status": "qualified",
"external_id": "EXT-002",
}
]'
Response 200 OK
{
"success": true,
"data": {
"message": "records added successfully"
}
}
Request for Failure Scenario
This example demonstrates how the API handles validation errors when the input data is not in the correct formatcurl --location 'https://app.superleap.dev/api/v1/org/objects/lead/record/bulk_create' \
--data-raw '[
{
"name": "test-8",
"email":"test .sok@gmail.com"
},
{
"name": "test-9",
"email":"test1@gmail.com"
}
]'
Response 400 Bad Request
{
"success": false,
"data": {
"message": "Failed to create records",
"status_code": 400,
"error_code": "VALIDATION_FAILED",
"validation_errors": [
{
"object_slug": "lead",
"field": "email",
"message": "invalid email format: test .sok@gmail.com",
"error_code": "PARSE_INVALID_FORMAT",
"record_index": 1,
"meta_data": null
}
],
"meta_data": "validation failed :"
}
}
⌘I