---
schema_version: "1"
id: 7d831530eaee645ce6c4d28bce7c8793682b8d1041a30eeec40a45deb4422e6b
title: Create Multiple Records in Marketing Cloud Next Using Bulk API 2.0
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/mc-core/guide/mc-manage-objects/mc-manage-objects-create/mc-manage-objects-create-bulk.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-growth/guide/mc-manage-objects-create-bulk.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: f7ea00b807699d04ae866dfeb67f1faf6185cd187e43d3a1bf074cc8183ee907
products:
  - Marketing Cloud Next
  - Marketing Cloud
---
# Create Multiple Records in Marketing Cloud Next Using Bulk API 2.0

Creating records using Bulk API 2.0 involves a few distinct steps. First, organize your data in a CSV file. Next, send a POST request to create a bulk ingestion job, which provides you with a job ID. Use the job ID to send a PUT request that contains your CSV data. When you finish uploading data, send a PATCH request to change the status of the job and begin processing records.

## Record Types

You can use Bulk API 2.0 to create the record types shown in this table.

| Record Type     | API Name   |
| --------------- | ---------- |
| Contact records | `Contact`  |
| Campaigns       | `Campaign` |

## Prerequisite

Before you send any requests to Bulk API 2.0, obtain a bearer token. For more information, see [Connect to REST-based APIs](https://developer.salesforce.com/docs/marketing/mc-connect-apis/mc-connect-apis-rest.md).

## Step 1: Prepare the CSV File

Use target field names as the column headers in your CSV file. To retrieve a list of field names, issue a GET call to the `/services/data/{apiVersion}/sobjects/OBJECT_API_NAME/describe` endpoint, where `OBJECT_API_NAME` is the API name of the object to describe. Alternatively, you can view a list of fields in the Object Explorer on the Setup page of the Salesforce web app.

There are several other considerations to keep in mind when you create the CSV file. For more information, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_prepare_csv.htm) in the _Bulk API 2.0 and Bulk API Developer Guide_.

## Step 2: Create a Bulk Ingestion Job

To begin importing records in bulk, create a bulk ingestion job. Issue a POST request to the `/services/data/{apiVersion}/jobs/ingest` endpoint. The body of the request must contain at least two properties: `object` and `operation`. The value of the `object` property must match the API name of the record type that you’re inserting.

Set the value of the `operation` to one of these values:

- `insert`—Use this value to create records.
- `update`—Use this value to update records.
- `upsert`—Use this value to update records when a match is found, or create records when no match is found.

This example shows a request to create a job that ingests contacts in bulk. For additional information and code examples, see [createBulkContactIngestionJob](/docs/marketing/marketing-cloud-growth/references/mc-bulk-contacts?meta=createBulkContactIngestionJob).

```json
POST /services/data/{apiVersion}/jobs/ingest HTTP/1.1
Host: YOUR_SUBDOMAIN.my.salesforce.com
Content-Type: application/json
Authorization: Bearer YOUR_BEARER_TOKEN

{
    "object": "Contact",
    "operation": "insert"
}
```

If the request is successful, the response includes an `id` value. This value is the job ID, which you use in subsequent operations.

```json
{
  "id": "750SB000001uG6LYAU",
  "operation": "insert",
  "object": "Contact",
  ...
}
```

## Step 3: Upload the Data

To upload data, send a PUT request to the `/services/data/{apiVersion}/jobs/ingest/JOB_ID/batches` endpoint, where `JOB_ID` is your ingestion job ID. Include your data in CSV format in the body of your request. For best results, limit the size of the data to 100 MB. For more information and code examples, see [uploadContactData](/docs/marketing/marketing-cloud-growth/references/mc-bulk-contacts?meta=uploadContactData).

For general considerations related to uploading data using Bulk API 2.0, see [Upload Job Data](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/upload_job_data.htm) in the _Bulk API 2.0 and Bulk API Developer Guide_.

## Step 4: Change the Status of the Ingestion Job

Change the status of the job to `UploadComplete`. This step tells the system to start processing the uploaded data. You can change the status by sending a PATCH request to the `/services/data/{apiVersion}/jobs/ingest/{jobId}` endpoint. The body of the request must be a JSON object with a single property named `state` with a value of `uploadComplete`.

To end an ingestion job without processing any records, change the value of `state` to `aborted`.

For more information and code examples, see [closeBulkContactIngestionJob](/docs/marketing/marketing-cloud-growth/references/mc-bulk-contacts?meta=closeBulkContactIngestionJob).

## Step 5: Check the Status of the Job

Check the status of the ingestion job by sending a GET request to the `/services/data/{apiVersion}/jobs/ingest/JOB_ID` endpoint, where `JOB_ID` is the job ID for the ingestion job. If the request is successful, the response includes a `status` property, which describes the current state of the job. For more information about retrieving the status of a job, see [getBulkContactIngestionJob](/docs/marketing/marketing-cloud-growth/references/mc-bulk-contacts?meta=getBulkContactIngestionJob).

You can also retrieve lists of records that were successfully ingested, that failed to be ingested, or that haven’t been ingested yet.

- [getSuccessfulRecords](/docs/marketing/marketing-cloud-growth/references/mc-bulk-contacts?meta=getSuccessfulRecords)
- [getFailedRecords](/docs/marketing/marketing-cloud-growth/references/mc-bulk-contacts?meta=getFailedRecords)
- [getUnprocessedRecords](/docs/marketing/marketing-cloud-growth/references/mc-bulk-contacts?meta=getUnprocessedRecords)
