Cloning a Marketo Program using the Marketo REST API

John_M
Marketo Employee
Marketo Employee

Marketo is a powerful marketing automation platform that allows you to create and manage campaigns, email templates, landing pages, and programs. Cloning a program can save you time and effort by allowing you to duplicate existing programs and use them as a starting point for new campaigns. In this blog, we will discuss how to clone a Marketo program using the Marketo REST API.


Before we begin, you should have a Marketo account and a basic understanding of the Marketo REST API. You will also need to generate an access token for your Marketo instance, which will be used to authenticate your API requests.


Step 1: Get the ID of the program you want to clone

The first step is to retrieve the ID of the program you want to clone. You can do this by making a GET request to the Marketo REST API endpoint for programs, which is:


https://{{instance}}.mktorest.com/rest/v1/programs.json


Replace "{{instance}}" with your Marketo instance name. In the request, include your access token in the Authorization header.

The response will be a JSON object containing a list of all the programs in your Marketo instance, including the ID of each program. Find the program you want to clone and make a note of its ID.


Step 2: Clone the program

Once you have the ID of the program you want to clone, you can make a POST request to the Marketo REST API endpoint for cloning programs, which is:


https://{{instance}}.mktorest.com/rest/v1/programs/{{id}}/clone.json


Replace "{{instance}}" with your Marketo instance name and "{{id}}" with the ID of the program you want to clone. In the request, include your access token in the Authorization header and the name of the new program in the request body.

The response will be a JSON object containing the ID of the new program.


Step 3: Update the new program

The new program is a duplicate of the original program, but you may want to update some of its properties, such as the name or description. You can do this by making a PATCH request to the Marketo REST API endpoint for programs, which is:


https://{{instance}}.mktorest.com/rest/v1/programs/{{id}}.json


Replace "{{instance}}" with your Marketo instance name and "{{id}}" with the ID of the new program. In the request, include your access token in the Authorization header and the updated properties in the request body.

The response will be a JSON object containing the updated properties of the new program.


Conclusion

Cloning a Marketo program using the Marketo REST API is a straightforward process that can save you time and effort when creating new campaigns. By following the steps outlined in this blog, you can easily duplicate an existing program and make any necessary updates to its properties. Happy marketing!

1172
0