---
schema_version: "1"
id: f657cc8fd228962873d4b23ca8c28074adbd358ad87a666ba73e59a10aa98a06
title: Create Records in Marketing Cloud Next Using REST API
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-rest.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-growth/guide/mc-manage-objects-create-rest.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 25ea0be21af6c1c4f4b533be1a91e63b4f6aaa3ddaa7980bfa00ce7e27d93e04
products:
  - Marketing Cloud Next
  - Marketing Cloud
---
# Create Records in Marketing Cloud Next Using REST API

Create individual records using the [sObjects create](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_sobject_basic_info_post.htm) endpoints in REST API.

A common use case for this API is the integration of applications that collect contact registration information. You can use this API to feed the collected data directly into lead, contact, and campaign records.

## Record Types

Use REST API to create the record types shown in this table.

| Record Type     | API Name   |
| --------------- | ---------- |
| Contact records | `Contact`  |
| Lead records    | `Lead`     |
| Campaigns       | `Campaign` |

## Prerequisite

Before you send a request to REST API, 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).

## Send the Request

To create a record, send a POST request to the `/services/data/{apiVersion}/sobjects/OBJECT_API_NAME` endpoint, where `OBJECT_API_NAME` is the API name of the type of object that you want to create. The body of the request is a JSON object that contains the information to include in the record.

A common use case is to use REST API to create individual contact records. This code example shows how to create a basic contact record.

```
POST /services/data/{apiVersion}/sobjects/Contact HTTP/1.1
Host: YOUR_SUBDOMAIN.my.salesforce.com
Content-Type: application/json
Authorization: Bearer YOUR_BEARER_TOKEN

{
  "Salutation": "Mr.",
  "FirstName": "D'Angelo",
  "LastName": "Cunningham",
  "Title": "Salesforce Admin",
  "Email": "dangelo.cunningham@example.com",
  "MobilePhone": "+18575550142"
}
```

The field names that you specify in the request body must exactly match the field names in the target object. You can retrieve a list of field names and relationships by issuing a GET call to the `/services/data/{apiVersion}/sobjects/OBJECT_API_NAME/describe` endpoint. Alternatively, you can view a list of fields and relationships in the Object Explorer on the Setup page of the Salesforce web app.

Fields that are required by the target object but not specified in the request receive the default values for the object. If a field in the request doesn’t exist in the target object, the request fails with an error.

For more information and code examples, see [createContact](/docs/marketing/marketing-cloud-growth/references/mc-rest-contacts?meta=createContact).

## Create Multiple Records

You can create up to 200 records in a single synchronous operation by issuing a POST request to the `/services/data/{apiVersion}/composite/tree/OBJECT_API_NAME` endpoint. To create more than 200 records, use [Bulk API 2.0](https://developer.salesforce.com/docs/marketing/marketing-cloud-growth/guide/mc-manage-objects-create-bulk.md) instead.

In a request to create multiple records, the body of the request contains an array called `records`. Each record is a separate object in the array. Each record includes an additional object, `attributes`, which specifies the object type. The object must also include a `referenceId`, which is included in the response so that you can track which items were processed successfully.

This code example shows how to create multiple contact records in a single call to REST API.

```json
POST /services/data/{apiVersion}/composite/tree/Contact HTTP/1.1
Host: YOUR_SUBDOMAIN.my.salesforce.com
Content-Type: application/json
Authorization: Bearer YOUR_BEARER_TOKEN

{
  "records": [
    {
      "attributes": {
        "type": "Contact",
        "referenceId": "ref1"
      },
      "FirstName": "Rachel",
      "LastName": "Rodriquez"
    },
    {
      "attributes": {
        "type": "Contact",
        "referenceId": "ref2"
      },
      "FirstName": "Linda",
      "LastName": "Rosenberg"
    }
  ]
}
```

If the request is successful, the response indicates whether there were errors in processing the request. It also lists the IDs and the reference IDs for each object that was created.

```json
{
  "hasErrors": false,
  "results": [
    {
      "referenceId": "ref1",
      "id": "003AA000002ZZZMYA4"
    },
    {
      "referenceId": "ref2",
      "id": "003AA000002ZZZNYA4"
    }
  ]
}
```

## See Also

- _REST API Developer Guide_: [Create Multiple Records](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_composite_sobject_tree_flat.htm)
