Create 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.
Bearer token for authentication, click here to generate one
Content-Type
string
default:"application/json"
required
application/json
Path Parameters
The slug identifier for the object type you want to create records for (e.g., “lead”, “user”, “opportunity”, “communication”)
Body
Name or title of the record
Email address associated with the record
Phone number associated with the record
Initial status of the record
ID of the user who should own this record
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 format
curl --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 :"
}
}