Stitch Documentation
has moved!

Please update your bookmarks to

If you're not automatically redirected after 5 seconds, click here.

Connecting Marketo

Marketo Info
This integration was created by Stitch for Singer, an open-source, composable ETL platform. Check out & contribute to the repo on GitHub.

Marketo is currently in Open Beta. The info in this article is subject to change.

To connect Marketo to Stitch, you’ll need to do the following:

  1. Create an API Only User Role in Marketo *
  2. Create a Marketo API user for Stitch
  3. Create an API Custom Service in Marketo
  4. Whitelist the Stitch IP Addresses *
  5. Retrieve your Marketo REST API base URLs
  6. Enter the API credentials into Stitch
  7. Define the historical sync
  8. Define the Replication Frequency

* Items marked with an asterisk may not be necessary depending on how your Marketo account is configured. Refer to the sections below for more detail.

Creating an API Only User Role in Marketo

You only need to complete this step if you don’t have an API Only User Role in your Marketo account. If you do, skip ahead to the next section.

Creating an API user role.
  1. Click the Admin option.
  2. Under Admin, open the Security menu.
  3. Click Users & Roles.
  4. Click the Roles tab.
  5. Click New Role.
  6. In the Create New Role window, do the following:
    • Role Name - Enter a name for the role. If it’s specific to Stitch, make the name specific - something like "Stitch API Role."
    • Description - Enter a description.
    • Permissions - Click the checkbox next to the Access API option.
  7. Click Create.

Creating a Marketo API Only User for Stitch

Next, you’ll create an API User for Stitch. Creating a Stitch-specific user will ensure that Stitch is easily distinguishable in any logs or audits.

  1. Click the Admin option.
  2. Under Admin, open the Security menu.
  3. Click Users & Roles.
  4. In the Users tab, click Invite New User.
  5. In the INFO section, enter an email address and first and last name.
  6. Click Next.
  7. In the PERMISSIONS section, click the checkboxes next to the API User Role you created and the API Only option.
  8. Click Next.
  9. In the MESSAGE section, click the Send button to create the user.

Creating an API Custom Service in Marketo

To generate the API credentials you need to connect Stitch to Marketo, you need to create an API Custom Service and associate it with the Stitch API user.

Creating an API custom service.
  1. In Admin, open the Integration menu.
  2. Click LaunchPoint.
  3. Click New and then New Service.
  4. In the New Service window, do the following:
    • Display Name - Enter "Stitch".
    • Service - Select Custom from the dropdown.
    • Description - Enter a description. We like “Pipin’ data.”
    • Marketo API Client ID and Client Secret.API Only User - Select the Stitch user you created.
  5. Click Create.
  6. After the service is created, it’ll display in the Installed Services grid. Click the View Details link to display your API credentials.
  7. Copy your Client ID and Secret into a text editor.

Whitelisting the Stitch IP Addresses

You only need to complete this step if you have IP Restriction enabled. You can check if this setting is enabled by clicking Admin > Web Services and looking in the IP Restrictions section.

If you don’t restrict IPs, you can skip ahead to the next section.

Whitelisting the Stitch IP addresses.
  1. In the Integration menu, click Web Services.
  2. In the IP Restrictions section, click the Edit button.
  3. In the Allowed Addresses field, paste one of the IP addresses listed below and then click Add.
  4. Repeat step 4 until all the Stitch IP addresses are added.
  5. Click the Save button.
  6. Leave the Web Services page open - you’ll need it in the next step.

Retrieving Your Marketo REST API base URLs

The last thing you need to do is retrieve your Marketo REST API base URLs.

  1. On the Web Services page, scroll down to the REST API section.
  2. In this section, find the Endpoint and Identity fields.
  3. Copy these URLs into the text editor where you have your Client ID and Client Secret.

Enter the API Credentials into Stitch

  1. From the Stitch Dashboard page, click the Add an Integration button.
  2. Click the Marketo icon.
  3. Enter a name for the integration. This is the name that will display on the Stitch dashboard for the integration; it’ll also be used to create the schema in your data warehouse.

  4. For example, the name “Stitch Marketo” would create a schema called stitch_marketo in the data warehouse.
  5. In the Endpoint Base URL field, paste your Marketo REST API Endpoint URL.
  6. In the Identity Base URL field, paste your Marketo REST API Identity URL.
  7. In the OAuth Client ID field, paste your Marketo API Client ID.
  8. In the OAuth Client Secret field, paste your Marketo API Client Secret.

Defining the Historical Sync

The Sync Historical Data setting will define the starting date for your Marketo integration. This means that data equal to or newer than this date will be replicated to your data warehouse.

Change this setting if you want to sync data beyond Marketo’s default setting of 1 year. For a detailed look at historical syncs, check out the Syncing Historical SaaS Data article.

Defining the Replication Frequency

The Replication Frequency controls how often Stitch will attempt to replicate data from your Marketo integration. By default the frequency is set to 30 minutes, but you can change it to better suit your needs.

Note that the more often Marketo is set to replicate, the higher your row count will be. Even if all the tables in your Marketo integration use Incremental Replication, replicating data frequently will increase your usage.

Stitch & Replicating Marketo Data
Before setting the Replication Frequency, we recommend checking out the structure & Replication Methods for this integration’s tables. Tables that contain nested structures and/or use Full Table Replication will lead to a higher number of replicated rows.

To help prevent overages, we recommend setting the Replication Frequency to something less frequent - like 6 hours instead of 30 minutes.

For more tips on reducing your row count, check out the Reducing Your Row Count article.

After setting the Replication Frequency, click Save Integration to wrap things up.


Was this article helpful?
0 out of 0 found this helpful


Questions or suggestions? If something in our documentation is unclear, let us know in the comments!