Bulk Upsert Records
curl --request POST \
--url https://app.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_upsert \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'Record Management APIs
Bulk Upsert Records
POST
/
api
/
v1
/
org
/
objects
/
{object_slug}
/
record
/
bulk_upsert
Bulk Upsert Records
curl --request POST \
--url https://app.superleap.com/api/v1/org/objects/{object_slug}/record/bulk_upsert \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'Bulk upsert multiple records for a requested object in a single API call. This API is useful when you need to insert or update multiple records efficiently, reducing the number of API calls required.
Headers
Bearer token for authentication, click here to generate one
application/json
Path Parameters
The slug identifier for the object type you want to filter (e.g., “lead”, “user”, “opportunity”)
Example Request
curl --location 'https://app.superleap.dev/api/v1/org/objects/lead/record/bulk_upsert' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer OGEWZMJJMTGTNZEYZS0ZYTG3LTLKMMETY2I3MDDJNJKXMMM4' \
--data-raw '{
"values": [
{
"name": "testAdmin",
"email": "test@gmail.com"
},
{
"id": "g1koYv_2lLKYVan",
"name": "testSteve"
}
]
}'
Example
Request
curl --location 'https://app.superleap.dev/api/v1/org/objects/lead/record/bulk_upsert' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer OGEWZMJJMTGTNZEYZS0ZYTG3LTLKMMETY2I3MDDJNJKXMMM4' \
--data-raw '{
"values": [
{
"name": "testAdmin",
"email": "test@gmail.com"
},
{
"id": "g1koYv_2lLKYVan",
"name": "testSteve"
}
]
}'
Response 200 OK
{
"success": true,
"data": {
"records_created": 1,
"records_updated": 1,
"failed_records": null,
"created_records": [
{
"action": "CREATED",
"created_at": 1753948409620,
"created_by": "g1koYv_BkJ851eS",
"email": "test@gmail.com",
"id": "g1koYv_NmlNtQT1",
"multiselect_1": [
"op3"
],
"name": "testAdmin",
"object_id": "g1koYv_EAobj2SH",
"org_id": "g1koYv",
"owner": "g1koYv_BkJ851eS",
"search_field": "testAdmin",
"system_created_at": 1753948409624,
"updated_at": 1753948409620,
"updated_by": "g1koYv_BkJ851eS"
}
],
"updated_records": [
{
"action": "UPDATED",
"id": "g1koYv_2lLKYVan",
"name": "testSteve",
"object_id": "g1koYv_EAobj2SH",
"org_id": "g1koYv",
"search_field": "testSteve",
"updated_at": 1753948409668,
"updated_by": "g1koYv_BkJ851eS"
}
],
"records": [
{
"action": "CREATED",
"created_at": 1753948409620,
"created_by": "g1koYv_BkJ851eS",
"email": "test@gmail.com",
"id": "g1koYv_NmlNtQT1",
"multiselect_1": [
"op3"
],
"name": "testAdmin",
"object_id": "g1koYv_EAobj2SH",
"org_id": "g1koYv",
"owner": "g1koYv_BkJ851eS",
"search_field": "testAdmin",
"system_created_at": 1753948409624,
"updated_at": 1753948409620,
"updated_by": "g1koYv_BkJ851eS"
},
{
"action": "UPDATED",
"id": "g1koYv_2lLKYVan",
"name": "testSteve",
"object_id": "g1koYv_EAobj2SH",
"org_id": "g1koYv",
"search_field": "testSteve",
"updated_at": 1753948409668,
"updated_by": "g1koYv_BkJ851eS"
}
]
}
}
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_upsert' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer OGEWZMJJMTGTNZEYZS0ZYTG3LTLKMMETY2I3MDDJNJKXMMM4' \
--data-raw '{
"values": [
{
"name": "testssse",
"email": "test@gmail.com"
},
{
"id": "OAASbQ_Ph9vneRS",
"name": "testsssdfsdfse"
}
]
}'
Response 200 OK
Failures are returned in the response, allowing you to handle them appropriately.{
"success": true,
"data": {
"records_created": 1,
"records_updated": 0,
"failed_records": [
{
"action": "FAILED",
"error_message": "invalid id detected : OAASbQ_Ph9vneRS",
"id": "OAASbQ_Ph9vneRS",
"name": "testsssdfsdfse"
}
],
"created_records": [
{
"action": "CREATED",
"created_at": 1753948287965,
"created_by": "g1koYv_BkJ851eS",
"email": "test@gmail.com",
"id": "g1koYv_y3msyauq",
"multiselect_1": [
"op3"
],
"name": "testssse",
"object_id": "g1koYv_EAobj2SH",
"org_id": "g1koYv",
"owner": "g1koYv_BkJ851eS",
"search_field": "testssse",
"system_created_at": 1753948287970,
"updated_at": 1753948287965,
"updated_by": "g1koYv_BkJ851eS"
}
],
"updated_records": null,
"records": [
{
"action": "CREATED",
"created_at": 1753948287965,
"created_by": "g1koYv_BkJ851eS",
"email": "test@gmail.com",
"id": "g1koYv_y3msyauq",
"multiselect_1": [
"op3"
],
"name": "testssse",
"object_id": "g1koYv_EAobj2SH",
"org_id": "g1koYv",
"owner": "g1koYv_BkJ851eS",
"search_field": "testssse",
"system_created_at": 1753948287970,
"updated_at": 1753948287965,
"updated_by": "g1koYv_BkJ851eS"
},
{
"action": "FAILED",
"error_message": "invalid id detected : OAASbQ_Ph9vneRS",
"id": "OAASbQ_Ph9vneRS",
"name": "testsssdfsdfse"
}
]
}
}
⌘I