---
title: "Bulk Create Data Source Records"
description: "How to call Bulk Create Data Source Records (POST /api/data-source-record-bulk-create-jobs) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/reference/bulk_create_data_source_records"
revision: "2026-10-15"
operationId: "bulk_create_data_source_records"
aliases: ["create_data_source_record_bulk_create_job"]
method: "POST"
endpoint: "https://a.klaviyo.com/api/data-source-record-bulk-create-jobs"
authentication: "privateKey"
scopes: ["custom-objects:write"]
rateLimits: {"burst":"3/s","steady":"15/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
openApi: "https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/bulk_create_data_source_records.json"
related: ["https://developers.klaviyo.com/en/reference/custom-objects/llms.txt","https://developers.klaviyo.com/en/reference/create_data_source_record.md"]
---

# Bulk Create Data Source Records

> This is the Markdown version of https://developers.klaviyo.com/en/reference/bulk_create_data_source_records

```http
POST https://a.klaviyo.com/api/data-source-record-bulk-create-jobs
```

Create a bulk data source record import job to create a batch of records.

Accepts up to 500 records per request. The maximum allowed payload size is 4MB. The maximum allowed payload size per-record is 512KB.

To learn more, see our [Custom Objects API overview](https://developers.klaviyo.com/en/reference/custom-objects.md).

- Revision header: `revision: 2026-10-15` (required)
- Scopes: `custom-objects:write`
- Rate limits: Burst: `3/s`, Steady: `15/m`
- OpenAPI: [Download this endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/bulk_create_data_source_records.json)

## Example request

### curl

```bash
curl --request POST \
     --url 'https://a.klaviyo.com/api/data-source-record-bulk-create-jobs' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2026-10-15' \
     --header 'content-type: application/vnd.api+json' \
     --data '{
  "data": {
    "type": "data-source-record-bulk-create-job",
    "attributes": {
      "data-source-records": {
        "data": [
          {
            "type": "data-source-record",
            "attributes": {
              "record": {
                "object_record": {
                  "subscription_id": "sub-001",
                  "service_plan": "Monthly Grooming",
                  "visits_per_month": 2,
                  "monthly_rate": 79.99,
                  "is_active": true,
                  "next_appointment": "2026-08-15T10:00:00Z",
                  "pet_id": "pet-001"
                },
                "relationships": {
                  "owners": [
                    {
                      "id": "sub-001",
                      "email": "alex@example.com",
                      "phone": "+15550001000"
                    },
                    {
                      "id": "sub-001",
                      "email": "jordan@example.com",
                      "phone": "+15550001001"
                    }
                  ]
                }
              }
            }
          }
        ]
      }
    },
    "relationships": {
      "data-source": {}
    }
  }
}'
```

### CLI

```bash
klaviyo custom-objects bulk-create-data-source-records \
  -d '{
  "data": {
    "type": "data-source-record-bulk-create-job",
    "attributes": {
      "data-source-records": {
        "data": [
          {
            "type": "data-source-record",
            "attributes": {
              "record": {
                "object_record": {
                  "subscription_id": "sub-001",
                  "service_plan": "Monthly Grooming",
                  "visits_per_month": 2,
                  "monthly_rate": 79.99,
                  "is_active": true,
                  "next_appointment": "2026-08-15T10:00:00Z",
                  "pet_id": "pet-001"
                },
                "relationships": {
                  "owners": [
                    {
                      "id": "sub-001",
                      "email": "alex@example.com",
                      "phone": "+15550001000"
                    },
                    {
                      "id": "sub-001",
                      "email": "jordan@example.com",
                      "phone": "+15550001001"
                    }
                  ]
                }
              }
            }
          }
        ]
      }
    },
    "relationships": {
      "data-source": {}
    }
  }
}'
```

Sign in first with `klaviyo auth login`. [Install the Klaviyo CLI](https://developers.klaviyo.com/en/docs/klaviyo_cli.md)

### Python

```python
from klaviyo_api import KlaviyoAPI

klaviyo = KlaviyoAPI("your-private-api-key")

response = klaviyo.Custom_Objects.bulk_create_data_source_records(
    {
        "data": {
            "type": "data-source-record-bulk-create-job",
            "attributes": {
                "data-source-records": {
                    "data": [
                        {
                            "type": "data-source-record",
                            "attributes": {
                                "record": {
                                    "object_record": {
                                        "subscription_id": "sub-001",
                                        "service_plan": "Monthly Grooming",
                                        "visits_per_month": 2,
                                        "monthly_rate": 79.99,
                                        "is_active": True,
                                        "next_appointment": "2026-08-15T10:00:00Z",
                                        "pet_id": "pet-001",
                                    },
                                    "relationships": {
                                        "owners": [
                                            {
                                                "id": "sub-001",
                                                "email": "alex@example.com",
                                                "phone": "+15550001000",
                                            },
                                            {
                                                "id": "sub-001",
                                                "email": "jordan@example.com",
                                                "phone": "+15550001001",
                                            },
                                        ],
                                    },
                                },
                            },
                        },
                    ],
                },
            },
            "relationships": {
                "data-source": {},
            },
        },
    },
)
```

Install it with `pip install klaviyo-api`. [The Python SDK on GitHub](https://github.com/klaviyo/klaviyo-api-python)

### Node.js

```javascript
import { ApiKeySession, CustomObjectsApi } from 'klaviyo-api'

const session = new ApiKeySession('your-private-api-key')
const customObjectsApi = new CustomObjectsApi(session)

const response = await customObjectsApi.bulkCreateDataSourceRecords(
  {
    data: {
      type: 'data-source-record-bulk-create-job',
      attributes: {
        dataSourceRecords: {
          data: [
            {
              type: 'data-source-record',
              attributes: {
                record: {
                  object_record: {
                    subscription_id: 'sub-001',
                    service_plan: 'Monthly Grooming',
                    visits_per_month: 2,
                    monthly_rate: 79.99,
                    is_active: true,
                    next_appointment: '2026-08-15T10:00:00Z',
                    pet_id: 'pet-001',
                  },
                  relationships: {
                    owners: [
                      {
                        id: 'sub-001',
                        email: 'alex@example.com',
                        phone: '+15550001000',
                      },
                      {
                        id: 'sub-001',
                        email: 'jordan@example.com',
                        phone: '+15550001001',
                      },
                    ],
                  },
                },
              },
            },
          ],
        },
      },
      relationships: {
        dataSource: {},
      },
    },
  },
)
```

Install it with `npm install klaviyo-api`. [The Node.js SDK on GitHub](https://github.com/klaviyo/klaviyo-api-node)

### Ruby

```ruby
require 'klaviyo-api-sdk'

KlaviyoAPI.configure do |config|
  config.api_key['Klaviyo-API-Key'] = 'Klaviyo-API-Key your-private-api-key'
end

response = KlaviyoAPI::CustomObjects.bulk_create_data_source_records(
  {
    data: {
      type: 'data-source-record-bulk-create-job',
      attributes: {
        'data-source-records' => {
          data: [
            {
              type: 'data-source-record',
              attributes: {
                record: {
                  object_record: {
                    subscription_id: 'sub-001',
                    service_plan: 'Monthly Grooming',
                    visits_per_month: 2,
                    monthly_rate: 79.99,
                    is_active: true,
                    next_appointment: '2026-08-15T10:00:00Z',
                    pet_id: 'pet-001',
                  },
                  relationships: {
                    owners: [
                      {
                        id: 'sub-001',
                        email: 'alex@example.com',
                        phone: '+15550001000',
                      },
                      {
                        id: 'sub-001',
                        email: 'jordan@example.com',
                        phone: '+15550001001',
                      },
                    ],
                  },
                },
              },
            },
          ],
        },
      },
      relationships: {
        'data-source' => {},
      },
    },
  },
)
```

Install it with `gem install klaviyo-api-sdk`. [The Ruby SDK on GitHub](https://github.com/klaviyo/klaviyo-api-ruby)

### PHP

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

use KlaviyoAPI\KlaviyoAPI;

$klaviyo = new KlaviyoAPI('your-private-api-key');

$response = $klaviyo->CustomObjects->bulkCreateDataSourceRecords(
    [
        'data' => [
            'type' => 'data-source-record-bulk-create-job',
            'attributes' => [
                'data-source-records' => [
                    'data' => [
                        [
                            'type' => 'data-source-record',
                            'attributes' => [
                                'record' => [
                                    'object_record' => [
                                        'subscription_id' => 'sub-001',
                                        'service_plan' => 'Monthly Grooming',
                                        'visits_per_month' => 2,
                                        'monthly_rate' => 79.99,
                                        'is_active' => true,
                                        'next_appointment' => '2026-08-15T10:00:00Z',
                                        'pet_id' => 'pet-001',
                                    ],
                                    'relationships' => [
                                        'owners' => [
                                            [
                                                'id' => 'sub-001',
                                                'email' => 'alex@example.com',
                                                'phone' => '+15550001000',
                                            ],
                                            [
                                                'id' => 'sub-001',
                                                'email' => 'jordan@example.com',
                                                'phone' => '+15550001001',
                                            ],
                                        ],
                                    ],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
            'relationships' => [
                'data-source' => new \stdClass(),
            ],
        ],
    ],
);
```

Install it with `composer require klaviyo/api`. [The PHP SDK on GitHub](https://github.com/klaviyo/klaviyo-api-php)

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2026-10-15`

## Request body

Content type: `application/vnd.api+json` (required)

- `data` (object, required)
  - `type` (string, required): Allowed values: `data-source-record-bulk-create-job`
  - `attributes` (object, required)
    - `data-source-records` (object, required): The records to ingest.
      - `data` (object[], required): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/bulk_create_data_source_records.json).
  - `relationships` (object, required)
    - `data-source` (object, required)
      - `data` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/bulk_create_data_source_records.json).

### Example request body

```json
{
  "data": {
    "type": "data-source-record-bulk-create-job",
    "attributes": {
      "data-source-records": {
        "data": [
          {
            "type": "data-source-record",
            "attributes": {
              "record": {
                "object_record": {
                  "subscription_id": "sub-001",
                  "service_plan": "Monthly Grooming",
                  "visits_per_month": 2,
                  "monthly_rate": 79.99,
                  "is_active": true,
                  "next_appointment": "2026-08-15T10:00:00Z",
                  "pet_id": "pet-001"
                },
                "relationships": {
                  "owners": [
                    {
                      "id": "sub-001",
                      "email": "alex@example.com",
                      "phone": "+15550001000"
                    },
                    {
                      "id": "sub-001",
                      "email": "jordan@example.com",
                      "phone": "+15550001001"
                    }
                  ]
                }
              }
            }
          }
        ]
      }
    },
    "relationships": {
      "data-source": {}
    }
  }
}
```

## Responses

### 204: Success

This response has no body.

### 4XX: Client Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
