---
schema_version: "1"
id: 700c2349cd4a25d2221fd240841536162f80c8fba3e9b2815a5c0eb004fba59a
title: Create a Record
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/api-rest/guides/do-me/dome-sobject-create.md
canonical_url: https://developer.salesforce.com/docs/platform/api-rest/guide/dome-sobject-create.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 34437162f39c5855173b14c51a425908a8aea9f647f3af904223b4693da0898d
products:
  - REST API Developer Guide
  - Platform Developer Content
---

# Create a Record

Use the sObject Basic Information resource to create new records. You supply the required field values in the request data, and send the request using the POST HTTP method. The response body contains the ID of the new record if the call is successful.

The following example request creates a new Account record, with the field values for the new record provided in newaccount.json. Only the name field is specified in this example, but you could also provide values for other Account fields.

## Example for creating a new Account

```nolang
curl https://MyDomainName.my.salesforce.com/services/data/v68.0/sobjects/Account/ -H "Authorization: Bearer token" -H "Content-Type: application/json" -d "@newaccount.json"
```

## Example request body newaccount.json file for creating a new Account

```nolang
{
  "Name" : "Express Logistics and Transport"
}

```

## Example response body after successfully creating a new Account

```nolang
{
  "id" : "001D000000IqhSLIAZ",
  "errors" : [ ],
  "success" : true
}
```

## Example of an error when attempting to create a new Account

An invalid rquest body newaccount.json file for creating a new Account:

```nolang

                       {
  "id" : "001D000000IqhSLIAZ",
  "Name" : "Express Donuts and Pies"
}
                   
```

The resulting error:

```nolang

  [{"message":"The Id field should not be specified in the sobject data.",
"errorCode":"INVALID_FIELD"}]
                    
```

**See Also**  


-   [Create Records Using sObject Basic Information](https://developer.salesforce.com/docs/platform/api-rest/resources/resources-sobject-basic-info-post.md)

