Using the Asset API to access Programs

Marketo Employee
Marketo Employee

There's some confusion out there on one of the coolest new APIs that Marketo has recently released, the asset API. The asset API enables integration with external content repositories and really raises the bar on the API access to Marketo. It allows you to create, update and delete emails and email templates, approve and unapprove emails, create and update folders and tokens on folders, and even allows you to create, edit and delete at the program level.

Wait.. program level? What?

It's true. If you look at the Get Folder By ID endpoint you lss see that it expects an ID and a Type... and the type is Folder or Program... what that means is that where you see "folder", you can also think "program"

Screen Shot 2015-10-13 at 4.11.02 PM.png

So here's the issue. The ID that the API is looking for isnt the "program ID" as you might expect, it's the folder ID of the program, which can be slightly confusing. To get this value use the "Get Folder By Name" endpoint, passing in the program Name, and of course the type of "Program". That will get you the ID you need.

Note, this is true for Folders as well as programs!

1 Comment