Create a Record (Beta)

API v59.0 and later

Use mutations to create a record. Within mutations, the RecordCreate field enables you to create all object types your Salesforce user has access to. Only objects supported by UI API are available for mutations.

To create a record, use RecordCreate with field values for the record you want to create.

A response is returned when record creation is successful. To define the fields you want to return in the response body, use the Record field.

For example, you can return the Id and selected fields from your record creation.

The response body returns the fields you request under Record.

Consider these guidelines when creating a record.

  • For compound fields, use the constituent fields. For example use FirstName and LastName instead of Name.
  • For numerical field values, such as integers or currency, use the raw values. For example, use 80000 instead of 80,000 and don't include currency symbols.
  • Sending a create request with field values that don't match the supported format returns a ValidationError. Use the appropriate format for the field, such as YYYY-MM-DD for date fields.

Send Mutation Requests