---
schema_version: "1"
id: 3cbce870961d6472552aceeba99c3bcec810b44cfecfe3ddadec150929af4fe1
title: CreateObject()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/api/mc-ampscript-reference-api-create-object.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-api/mc-ampscript-reference-api-create-object.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a72019fcdaa6a7d7d9fd69d451bb3351884b8c7aeb73e41ba0abfdea73512f90
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# CreateObject()

Creates a Marketing Cloud Engagement API Object.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>❌ No</td>
  </tr>
</table>

## Syntax

```
CreateObject(objectName)
```

The `CreateObject()` function has one parameter:

- `objectName` (string): Required. The name of the new API Object.

## Usage

This example creates a Subscriber object in the Marketing Cloud Engagement API.

```
SET @subscriber = CreateObject('Subscriber')
```

An object created with `CreateObject()` only persists for one Invoke API call. If you create a Subscriber object and then update it using the `InvokeUpdate()` function, you can’t pass it to a Triggered Send.
