Skip to main content
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>"
}
'
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.

Headers

Authorization
string
required
Bearer token for authentication, click here to generate one
Content-Type
string
default:"application/json"
required
application/json

Path Parameters

object_slug
string
required
The slug identifier for the object type you want to create records for (e.g., “lead”, “user”, “opportunity”, “communication”)

Body

name
string
Name or title of the record
email
string
Email address associated with the record
phone
string
Phone number associated with the record
status
string
Initial status of the record
owner
string
ID of the user who should own this record
external_id
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":"[email protected]"
    },
    {
        "name": "test-9",
        "email":"[email protected]"
    }
]'

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": "[email protected]",
        "phone": "+1-555-123-4567",
        "status": "new",
        "external_id": "EXT-001",
        
    },
    {
        "name": "Jane Doe",
        "email": "[email protected]",
        "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 [email protected]"
    },
    {
        "name": "test-9",
        "email":"[email protected]"
    }
]'

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 [email protected]",
                "error_code": "PARSE_INVALID_FORMAT",
                "record_index": 1,
                "meta_data": null
            }
        ],
        "meta_data": "validation failed :"
    }
}