Newer Version Available

This content describes an older version of this product. View Latest

Create or Clone a Record

Create or clone a record.

Usage

To create or clone a record, pass a Record Input request body to the POST /ui-api/records resource. To create the request body, you must know the fields, required fields, and default values for that object.

To find the required fields, fields, and default values, make a request to one of these resources:

The response from these resources includes Object Info, including all fields and a required property for each field.

To find the values for lookup fields, picklist fields, and multi-select picklist fields, use these resources:

As of API version 43.0, if you pass read-only fields in a request body, the response is an Error with Output.

Resource
1/ui-api/records
Available Version
41.0
HTTP Method
POST
Example
1POST /ui-api/records
1{
2  "apiName": "Account",
3  "fields": {
4    "Name": "Universal Containers"
5  }
6}
To provide an address, provide the individual fields as separate inputs. The compound field is only available in the response.
1{
2  "apiName": "Account",
3  "fields" : {
4    "Name": "Local Boxes",
5    "BillingState": "WA",
6    "BillingStreet" : "123 Main Street",
7    "BillingCountry" : "USA"
8  }
9}
Request body
Record Input
Response Body
Record