Newer Version Available

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

Create a Record

Create a record. First, make a request to the Clone Record Default or Create Record Default resources to get the default metadata and data for the record.

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

Resource
Available Version
41.0
HTTP Method
POST
Example
To provide an address, provide the individual fields as separate inputs. The compound field is only available in the response.
Request body
Name Type Description Required or Optional Available Version
allowSaveOnDuplicate Boolean Specifies whether to save a duplicate record (true), or not (false). The default value is false. Optional 43.0
apiName String To create a record, specify the API name of an Object from which to create the record. To update a record, use null or don’t pass this property. Required 41.0
fields Map<String, Object> Map of field names to field values.

Format data types according to these rules:

  • Address—JSON String
  • Base64—JSON String
  • Boolean—JSON Boolean, true or false
  • Currency—JSON Float
  • Date—JSON string in correct format
  • DateTime—JSON string in ISO 8601 format
  • Double—JSON Float
  • Email—JSON String
  • EncryptedString—JSON String
  • Int—JSON Number
  • Location—JSON String
  • MultiPicklist—JSON String
  • Percent—JSON Float
  • Phone—JSON String
  • Picklist—JSON String
  • Reference—JSON String.
  • String—JSON String
  • TextArea—JSON String
  • Time—JSON String in format HH:MM:SS
  • Url—JSON String

To specify the master record type, either don’t specify the recordTypeId field, or set it to null.

Required 41.0
Response Body
Record