REST API
Marketo exposes a REST API which allows for remote execution of many of the system’s capabilities. From creating programs to bulk lead import, there are many options which allow fine-grained control of a Marketo instance.
These APIs generally fall into two broad categories: , and . Lead Database APIs allow for retrieval of, and interaction with Marketo person records and associated object types, such as Opportunities and Companies. Asset APIs allow interaction with marketing collateral and workflow-related records.
- Daily Quota: Subscriptions are allocated 50,000 API calls per day (which resets daily at 12:00AM CST). You can increase your daily quota through your account manager.
- Rate Limit: API access per instance is limited to 100 calls per 20 seconds.
- Concurrency Limit: Maximum of ten concurrent API calls.
The size of standard calls is limited to a URI length of 8KB, and a body size of 1MB, though the body can be 10MB for our bulk APIs. If there is an error in with your call, the API will typically still return a status code of 200, but the JSON response will contain a “success” member with a value of false
, and an array of errors in the “errors” member. More on errors here.
Getting Started
The following steps require admin privileges in your Marketo instance.
For your first call to Marketo, you retrieve a lead record. To begin working with Marketo, you must obtain API credentials for making authenticated calls to your instance. Log in to your instance and go to the Admin -> Users and Roles.
Click the Roles tab, and then New Role and assign at least the “Read-Only Lead” (or “Read- Only Person”) permission to the role in the Access API group. Be sure to give it a descriptive name and click Create.
Now, back to the Users tab and click Invite New User. Give your user a descriptive name that indicates that it is an API user, and an Email Address and click Next.
Then, check the API Only option and award your user the API role that you created and click Next.
To complete the user creation process, click Send.
Next, go to the Admin menu and click LaunchPoint.
Click the New menu and select New Service. Give your service a descriptive name and select Custom from the Service dropdown menu. Give it a description, then select your new user from the API Only User dropdown menu and click Create.
Click View Details for your new service to access the Client ID and Client Secret. For now you can click the Get Token button to generate an access token which is valid for one hour. Save the token in a note for now.
Next, go to the Admin menu, then to Web Services.