Create

Use the Create method to create an individual or batch of objects. Multiple objects can be created with one call.

Don't use existing objects with the Create method. Adding existing objects to the Create method causes an error.

C# Syntax

Parameters

NameData TypeDescription
ObjectsAPIObject[]A collection of one or more objects to create. The objects are created in the order they have been acted upon--first in, first out. This array can hold different object types, which allows you to perform complex interactions like creating an email, creating a list, and sending the email, in one call.
OptionsCreateOptionsOptionally specifies more processing options. A CreateOptions instance is required for this parameter. However, no properties need to be defined for the instance.
RequestIDStringMarketing Cloud's unique identifier for every request. This parameter contains a string value containing an output variable of the key of the request. By default, this value is a Marketing Cloud-generated GUID.

Output

NameData TypeDescription
CreateResultArrayAn array of objects holding a list of return values. The objects are returned in the order they are created: first in, first out. This array contains one CreateResult object per input APIObject.
OverallStatusStringA string value containing the overall status of the request. Valid status values include:
  • OK - All objects were successfully created.
  • Has Error - When creating multiple APIObject objects, this status means that some of the operations failed, while some succeeded.
  • Error - All create operations failed during validation or processing.